Bug 1494741 [wpt PR 13245] - Factor out dynamic import credentials test, a=testonly
authorDominic Farolino <domfarolino@gmail.com>
Fri, 05 Oct 2018 14:20:28 +0000
changeset 495781 b693eaa524925987379b3c37c1a758fa89337346
parent 495780 61c153eada22c95561de91c1fdaad76caac4d626
child 495782 1c281109132c8d12358a64203e1aac6a90783257
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1494741, 13245
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1494741 [wpt PR 13245] - Factor out dynamic import credentials test, a=testonly Automatic update from web-platform-testsFactor out dynamic import credentials test (#13245) -- wpt-commits: cb69426f2f35dd8a863a55514bc6bb035280629d wpt-pr: 13245
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html
--- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html
+++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html
@@ -35,51 +35,37 @@ promise_test(t => {
     iframe.src = 'resources/credentials-iframe.sub.html';
     document.body.appendChild(iframe);
 
     return messagePromise;
   }).then(() => {
     const w = iframe.contentWindow;
 
     assert_equals(w.sameOriginNone, 'found',
-                  'Modules should be loaded without the credentials when the crossOrigin attribute is not specified and the target is same-origin');
+                  'Modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin');
     assert_equals(w.sameOriginAnonymous, 'found',
                   'Modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin');
     assert_equals(w.sameOriginUseCredentials, 'found',
                   'Modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin');
     assert_equals(w.crossOriginNone, 'not found',
                   'Modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin');
     assert_equals(w.crossOriginAnonymous, 'not found',
                   'Modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin');
     assert_equals(w.crossOriginUseCredentials, 'found',
                   'Modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin');
 
     assert_equals(w.sameOriginNoneDescendant, 'found',
-                  'Descendant modules should be loaded without the credentials when the crossOrigin attribute is not specified and the target is same-origin');
+                  'Descendant modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin');
     assert_equals(w.sameOriginAnonymousDescendant, 'found',
                   'Descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin');
     assert_equals(w.sameOriginUseCredentialsDescendant, 'found',
                   'Descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin');
     assert_equals(w.crossOriginNoneDescendant, 'not found',
-                  'Descendant modules should be loaded without the credentials when the crossOrigin attribute is not specified and the target is cross-origin');
+                  'Descendant modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin');
     assert_equals(w.crossOriginAnonymousDescendant, 'not found',
-                  'Descendant modules should be loaded without the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin');
+                  'Descendant modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin');
     assert_equals(w.crossOriginUseCredentialsDescendant, 'found',
                   'Descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin');
-
-    assert_equals(w.sameOriginNoneDynamicDescendant, 'found',
-                  'Dynamic decendent modules should be loaded without the credentials when the crossOrigin attribute is not specified and the target is same-origin');
-    assert_equals(w.sameOriginAnonymousDynamicDescendant, 'found',
-                  'Dynamic descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin');
-    assert_equals(w.sameOriginUseCredentialsDynamicDescendant, 'found',
-                  'Dynamic descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin');
-    assert_equals(w.crossOriginNoneDynamicDescendant, 'not found',
-                  'Dynamic descendant modules should be loaded without the credentials when the crossOrigin attribute is not specified and the target is cross-origin');
-    assert_equals(w.crossOriginAnonymousDynamicDescendant, 'not found',
-                  'Dynamic descendant modules should be loaded without the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin');
-    assert_equals(w.crossOriginUseCredentialsDynamicDescendant, 'found',
-                  'Dynamic descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin');
-
 });
 }, 'Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute');
 </script>
 <body>
 </body>
--- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html
+++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html
@@ -38,33 +38,13 @@ import "http://{{domains[www2]}}:{{ports
 </script>
 <script type="module" crossOrigin="anonymous">
 import "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginAnonymousDescendant&cookieName=cross";
 </script>
 <script type="module" crossOrigin="use-credentials">
 import "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginUseCredentialsDescendant&cookieName=cross";
 </script>
 
-<script type="module">
-import("./check-cookie.py?id=sameOriginNoneDynamicDescendant&cookieName=same");
-</script>
-<script type="module" crossOrigin="anonymous">
-import("./check-cookie.py?id=sameOriginAnonymousDynamicDescendant&cookieName=same");
-</script>
-<script type="module" crossOrigin="use-credentials">
-import("./check-cookie.py?id=sameOriginUseCredentialsDynamicDescendant&cookieName=same");
-</script>
-<script type="module">
-import("http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginNoneDynamicDescendant&cookieName=cross");
-</script>
-<script type="module" crossOrigin="anonymous">
-import("http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginAnonymousDynamicDescendant&cookieName=cross");
-</script>
-<script type="module" crossOrigin="use-credentials">
-import("http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginUseCredentialsDynamicDescendant&cookieName=cross");
-</script>
-
-
 <script type="text/javascript">
 window.addEventListener('load', event => {
   window.parent.postMessage({}, '*');
 });
 </script>