Commit aa1b321f authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

[WPT] Add Fetch API, redirect tests for webbundle subresource loading

Change-Id: I4044fbf55b82e998433c118fe0b6130ae3842966
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409253Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806889}
parent d3d65a10
......@@ -15,6 +15,18 @@
assert_equals(module.result, 'OK');
}, "Subresource loading with WebBundle");
promise_test(async () => {
const response = await fetch('http://web-platform.test:8001/root.js');
const text = await response.text();
assert_equals(text, "export * from './submodule.js';\n");
}, "Subresource loading with WebBundle (Fetch API)");
promise_test(t => {
const url =
'/common/redirect.py?location=http://web-platform.test:8001/root.js';
return promise_rejects_js(t, TypeError, import(url));
}, "Subresource loading with WebBundle shouldn't affect redirect");
promise_test(async () => {
const link = document.createElement("link");
link.rel = "webbundle";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment