Skip to content

Commit

Permalink
[WPT] Add Fetch API, redirect tests for webbundle subresource loading
Browse files Browse the repository at this point in the history
Change-Id: I4044fbf55b82e998433c118fe0b6130ae3842966
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409253
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806889}
  • Loading branch information
hiroshige-g authored and chromium-wpt-export-bot committed Sep 15, 2020
1 parent 8326df8 commit c5c992c
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -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";
Expand Down

0 comments on commit c5c992c

Please sign in to comment.