Bug 1464759 [wpt PR 11176] - [Fetch] Mutation on navigation request, a=testonly
authorYutaka Hirano <yhirano@google.com>
Wed, 06 Jun 2018 15:56:19 +0000
changeset 806586 57b1f3a1a55206c019aa37a529067669f64d6332
parent 806585 97fd2701ad6c50d796b5f26f6fb16e7d0ef91d09
child 806587 028b553d5bbf01a6462755a80b7ae2391b53e0f6
push id112908
push userbmo:gl@mozilla.com
push dateMon, 11 Jun 2018 02:53:29 +0000
reviewerstestonly
bugs1464759, 11176
milestone62.0a1
Bug 1464759 [wpt PR 11176] - [Fetch] Mutation on navigation request, a=testonly Automatic update from web-platform-testsFetch: mode "navigate" becomes "same-origin" For https://github.com/whatwg/fetch/pull/377. -- wpt-commits: 864c62d355308cca9ab6d9c939e987cede865d5b wpt-pr: 11176
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/fetch/api/request/request-reset-attributes.https.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -559110,17 +559110,17 @@
    "0b9786a3878a361ba8ec3291216d475bd5148541",
    "testharness"
   ],
   "fetch/api/request/request-keepalive.html": [
    "e6c2afd6cef41d358016d4d021b7c3e0e1185704",
    "testharness"
   ],
   "fetch/api/request/request-reset-attributes.https.html": [
-   "132b917c77c61230f7c5e84c3c9cafe4d1f0b565",
+   "13515368aec52eaa0d0add9ec84955cb21fa5fd0",
    "testharness"
   ],
   "fetch/api/request/request-structure.html": [
    "450f8c91149638fe77bab2b65f345e6e24646c95",
    "testharness"
   ],
   "fetch/api/request/request-type-attribute-historical.html": [
    "68620f3ea16b7ae1a9f1efde1cd0bb47f1150b9f",
--- a/testing/web-platform/tests/fetch/api/request/request-reset-attributes.https.html
+++ b/testing/web-platform/tests/fetch/api/request/request-reset-attributes.https.html
@@ -28,9 +28,31 @@ promise_test(async (t) => {
       if (frame) {
         frame.remove();
       }
       if (reg) {
         await reg.unregister();
       }
     }
   }, 'Request.isReloadNavigation is reset with non-empty RequestInit');
+
+promise_test(async (t) => {
+    const scope = 'resources/hello.txt?name=mode';
+    let frame;
+    let reg;
+
+    try {
+      reg = await service_worker_unregister_and_register(t, worker, scope);
+      await wait_for_state(t, reg.installing, 'activated');
+      frame = await with_iframe(scope);
+      assert_equals(frame.contentDocument.body.textContent,
+                    'old: navigate, new: same-origin');
+    } finally {
+      if (frame) {
+        frame.remove();
+      }
+      if (reg) {
+        await reg.unregister();
+      }
+    }
+  }, 'Request.mode is reset with non-empty RequestInit when it\'s "navigate"');
+
 </script>