Backed out changeset 70ad78352bf7 (bug 1641553) for conflict while backing out bug 1641459
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 29 May 2020 10:19:54 +0200
changeset 532922 7f316459deabda891bddeac1446371f8f5ce9957
parent 532921 dd02ded0f1842d4f088892a93d0c5e28668afb45
child 532923 f64ec938dd0ec2b766436e0b65701d8945dcb2a7
push id117463
push userarchaeopteryx@coole-files.de
push dateFri, 29 May 2020 08:26:34 +0000
treeherderautoland@9dae371f2b33 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1641553, 1641459
milestone78.0a1
backs out70ad78352bf7fa4454986f2389cf99c74676173f
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
Backed out changeset 70ad78352bf7 (bug 1641553) for conflict while backing out bug 1641459
testing/web-platform/tests/cookies/samesite/form-get-blank-reload.https.html
testing/web-platform/tests/cookies/samesite/form-get-blank.https.html
testing/web-platform/tests/cookies/samesite/form-post-blank-reload.https.html
testing/web-platform/tests/cookies/samesite/form-post-blank.https.html
testing/web-platform/tests/cookies/samesite/iframe-reload.https.html
testing/web-platform/tests/cookies/samesite/iframe.document.html
testing/web-platform/tests/cookies/samesite/iframe.https.html
testing/web-platform/tests/cookies/samesite/window-open-reload.https.html
testing/web-platform/tests/cookies/samesite/window-open.https.html
--- a/testing/web-platform/tests/cookies/samesite/form-get-blank-reload.https.html
+++ b/testing/web-platform/tests/cookies/samesite/form-get-blank-reload.https.html
@@ -6,45 +6,49 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/cookies/resources/cookie-helper.sub.js"></script>
 <script>
   function create_test(origin, target, expectedStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
-          return new Promise(resolve => {
+          return new Promise((resolve, reject) => {
             var f = document.createElement('form');
             f.action = target + "/cookies/resources/postToParent.py";
             f.target = "_blank";
             f.method = "GET";
 
             // If |target| contains a `redir` parameter, extract it, and add it
             // to the form so it doesn't get dropped in the submission.
             var url = new URL(f.action);
             if (url.pathname = "/cookies/rfc6265/resources/redirectWithCORSHeaders.py") {
               var i = document.createElement("input");
               i.name = "location";
               i.value = url.searchParams.get("location");
               i.type = "hidden";
               f.appendChild(i);
             }
             var reloaded = false;
-            var msgHandler = t.step_func(e => {
-              getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+            var msgHandler = e => {
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+              } catch (e) {
+                reject(e);
+              }
 
               if (reloaded) {
                 window.removeEventListener("message", msgHandler);
                 e.source.close();
                 resolve("Popup received the cookie.");
               } else {
                 reloaded = true;
                 e.source.postMessage("reload", "*");
               }
-            });
+            };
             window.addEventListener("message", msgHandler);
             document.body.appendChild(f);
 
             f.submit();
           });
         });
     }, title);
   }
--- a/testing/web-platform/tests/cookies/samesite/form-get-blank.https.html
+++ b/testing/web-platform/tests/cookies/samesite/form-get-blank.https.html
@@ -7,40 +7,43 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/cookies/resources/cookie-helper.sub.js"></script>
 <script>
   function create_test(origin, target, expectedStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
-          return new Promise(resolve => {
+          return new Promise((resolve, reject) => {
             var f = document.createElement('form');
             f.action = target + "/cookies/resources/postToParent.py";
             f.target = "_blank";
             f.method = "GET";
 
             // If |target| contains a `redir` parameter, extract it, and add it
             // to the form so it doesn't get dropped in the submission.
             var url = new URL(f.action);
             if (url.pathname == "/cookies/resources/redirectWithCORSHeaders.py") {
               var i = document.createElement("input");
               i.name = "location";
               i.type="hidden";
               i.value = url.searchParams.get("location");
               f.appendChild(i);
             }
 
-            var msgHandler = t.step_func(e => {
+            var msgHandler = e => {
               window.removeEventListener("message", msgHandler);
               e.source.close();
-
-              getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
-              resolve("Popup received the cookie.");
-            });
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+                resolve("Popup received the cookie.");
+              } catch (e) {
+                reject(e);
+              }
+            };
             window.addEventListener("message", msgHandler);
             document.body.appendChild(f);
             f.submit();
           });
         });
     }, title);
   }
 
--- a/testing/web-platform/tests/cookies/samesite/form-post-blank-reload.https.html
+++ b/testing/web-platform/tests/cookies/samesite/form-post-blank-reload.https.html
@@ -6,35 +6,39 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/cookies/resources/cookie-helper.sub.js"></script>
 <script>
   function create_test(origin, target, expectedStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
-          return new Promise(resolve => {
+          return new Promise((resolve, reject) => {
             var f = document.createElement('form');
             f.action = target + "/cookies/resources/postToParent.py";
             f.target = "_blank";
             f.method = "POST";
 
             var reloaded = false;
-            var msgHandler = t.step_func(e => {
-              getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+            var msgHandler = e => {
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+              } catch (e) {
+                reject(e);
+              }
 
               if (reloaded) {
                 window.removeEventListener("message", msgHandler);
                 e.source.close();
                 resolve("Popup received the cookie.");
               } else {
                 reloaded = true;
                 e.source.postMessage("reload", "*");
               }
-            });
+            };
             window.addEventListener("message", msgHandler);
 
             document.body.appendChild(f);
             f.submit();
           });
         });
     }, title);
   }
--- a/testing/web-platform/tests/cookies/samesite/form-post-blank.https.html
+++ b/testing/web-platform/tests/cookies/samesite/form-post-blank.https.html
@@ -7,28 +7,32 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/cookies/resources/cookie-helper.sub.js"></script>
 <script>
   function create_test(origin, target, expectedStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
-          return new Promise(resolve => {
+          return new Promise((resolve, reject) => {
             var f = document.createElement('form');
             f.action = target + "/cookies/resources/postToParent.py";
             f.target = "_blank";
             f.method = "POST";
 
-            var msgHandler = t.step_func(e => {
+            var msgHandler = e => {
               window.removeEventListener("message", msgHandler);
               e.source.close();
-              getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
-              resolve("Popup received the cookie.");
-            });
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+                resolve("Popup received the cookie.");
+              } catch (e) {
+                reject(e);
+              }
+            };
             window.addEventListener("message", msgHandler);
             document.body.appendChild(f);
             f.submit();
           });
         });
     }, title);
   }
 
--- a/testing/web-platform/tests/cookies/samesite/iframe-reload.https.html
+++ b/testing/web-platform/tests/cookies/samesite/iframe-reload.https.html
@@ -9,32 +9,37 @@
 <!-- We're appending an <iframe> to the document's body, so execute tests after we have a body -->
 <body>
 <script>
   function create_test(origin, target, expectedStatus, expectedDomStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
-          return new Promise(resolve => {
+          return new Promise((resolve, reject) => {
             var iframe = document.createElement("iframe");
+            iframe.onerror = _ => reject("IFrame could not be loaded.");
 
             var reloaded = false;
-            var msgHandler = t.step_func(e => {
-              getSameSiteVerifier()(expectedStatus, value, e.data, expectedDomStatus);
+            var msgHandler = e => {
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, expectedDomStatus);
+              } catch (e) {
+                reject(e);
+              }
 
               if (reloaded) {
                 window.removeEventListener("message", msgHandler);
                 document.body.removeChild(iframe);
                 resolve("IFrame received the cookie.");
               } else {
                 reloaded = true;
                 e.source.postMessage("reload", "*");
               }
-            });
+            };
             window.addEventListener("message", msgHandler);
 
             iframe.src = target + "/cookies/resources/postToParent.py";
             document.body.appendChild(iframe);
           });
         });
     }, title);
   }
--- a/testing/web-platform/tests/cookies/samesite/iframe.document.html
+++ b/testing/web-platform/tests/cookies/samesite/iframe.document.html
@@ -4,31 +4,31 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/cookies/resources/cookie-helper.sub.js"></script>
 <!-- We're appending an <iframe> to the document's body, so execute tests after we have a body -->
 <body>
 <script>
   function create_test(target, expectedDomStatus, title) {
     promise_test(async t => {
-      let cookieValue = await new Promise(resolve => {
+      let cookieValue = await new Promise((resolve, reject) => {
         var iframe = document.createElement("iframe");
 
         window.onmessage = t.step_func(e => {
           if (e.source == iframe.contentWindow) {
             document.body.removeChild(iframe);
             resolve(e.data.value);
           }
         });
 
         iframe.src = target + "/cookies/samesite/resources/iframe.document.html";
         document.body.appendChild(iframe);
       });
 
-      await new Promise(resolve => {
+      await new Promise((resolve, reject) => {
         var iframe = document.createElement("iframe");
 
         window.onmessage = t.step_func(e => {
           if (e.source == iframe.contentWindow) {
             // Cleanup, then verify cookie state:
             document.body.removeChild(iframe);
 
             const cookies = e.data;
--- a/testing/web-platform/tests/cookies/samesite/iframe.https.html
+++ b/testing/web-platform/tests/cookies/samesite/iframe.https.html
@@ -9,28 +9,33 @@
 <!-- We're appending an <iframe> to the document's body, so execute tests after we have a body -->
 <body>
 <script>
   function create_test(origin, target, expectedStatus, expectedDomStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
-          return new Promise(resolve => {
+          return new Promise((resolve, reject) => {
             var iframe = document.createElement("iframe");
+            iframe.onerror = _ => reject("IFrame could not be loaded.");
 
-            var msgHandler = t.step_func(e => {
+            var msgHandler = e => {
               if (e.source == iframe.contentWindow) {
                 // Cleanup, then verify cookie state:
                 document.body.removeChild(iframe);
                 window.removeEventListener("message", msgHandler);
-                getSameSiteVerifier()(expectedStatus, value, e.data, expectedDomStatus);
-                resolve();
+                try {
+                  getSameSiteVerifier()(expectedStatus, value, e.data, expectedDomStatus);
+                  resolve();
+                } catch(e) {
+                  reject(e);
+                }
               }
-            });
+            };
             window.addEventListener("message", msgHandler);
 
             iframe.src = target + "/cookies/resources/postToParent.py";
             document.body.appendChild(iframe);
           });
         });
     }, title);
   }
--- a/testing/web-platform/tests/cookies/samesite/window-open-reload.https.html
+++ b/testing/web-platform/tests/cookies/samesite/window-open-reload.https.html
@@ -10,28 +10,32 @@
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
           return new Promise((resolve, reject) => {
             var w = window.open(origin + "/cookies/resources/postToParent.py");
 
             var reloaded = false;
-            var msgHandler = t.step_func(e => {
-              getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+            var msgHandler = e => {
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+              } catch (e) {
+                reject(e);
+              }
 
               if (reloaded) {
                 window.removeEventListener("message", msgHandler);
                 w.close();
                 resolve("Popup received the cookie.");
               } else {
                 reloaded = true;
                 w.postMessage("reload", "*");
               }
-            });
+            };
             window.addEventListener("message", msgHandler);
 
             if (!w)
               reject("Popup could not be opened (did you allow the test site in your popup blocker?).");
           });
         });
     }, title);
   }
--- a/testing/web-platform/tests/cookies/samesite/window-open.https.html
+++ b/testing/web-platform/tests/cookies/samesite/window-open.https.html
@@ -10,22 +10,26 @@
   function create_test(origin, target, expectedStatus, title) {
     promise_test(t => {
       var value = "" + Math.random();
       return resetSameSiteCookies(origin, value)
         .then(_ => {
           return new Promise((resolve, reject) => {
             var w = window.open(origin + "/cookies/resources/postToParent.py");
 
-            var msgHandler = t.step_func(e => {
+            var msgHandler = e => {
               window.removeEventListener("message", msgHandler);
               w.close();
-              getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
-              resolve("Popup received the cookie.");
-            });
+              try {
+                getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE);
+                resolve("Popup received the cookie.");
+              } catch (e) {
+                reject(e);
+              }
+            };
             window.addEventListener("message", msgHandler);
 
             if (!w)
               reject("Popup could not be opened (did you allow the test site in your popup blocker?).");
           });
         });
     }, title);
   }