Backed out changeset 60e865d21df5 (bug 1218456)for Crashtest failures on dom/l10n/tests/mochitest/dom_localization/test_overlay.html. CLOSED TREE
authorOana Pop Rus <opoprus@mozilla.com>
Tue, 09 Jul 2019 23:46:04 +0300
changeset 481996 8fda1a51f2c980a84c535d13015568cc55dedc4e
parent 481995 005bc170af45995d2cc0099c567bc4cd0d1c16c2
child 481997 91ec3db845b6175e08d91b9318d96504caef6ce6
push id113647
push useraciure@mozilla.com
push dateWed, 10 Jul 2019 09:46:39 +0000
treeherdermozilla-inbound@f3a387c13e2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1218456
milestone70.0a1
backs out60e865d21df584c61d07fa7119196bfd2932b1c7
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 60e865d21df5 (bug 1218456)for Crashtest failures on dom/l10n/tests/mochitest/dom_localization/test_overlay.html. CLOSED TREE
dom/html/test/file_iframe_sandbox_d_if11.html
dom/html/test/file_iframe_sandbox_e_if5.html
--- a/dom/html/test/file_iframe_sandbox_d_if11.html
+++ b/dom/html/test/file_iframe_sandbox_d_if11.html
@@ -4,17 +4,28 @@
   <meta charset="utf-8">
   <title>Test for Bug 341604</title>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script src="/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <script type="application/javascript">
 
 function navigateAway() {
-  document.getElementById("anchor").click();
+  // Anchor clicks are only handled if we have a pres-context, and we may not
+  // have one yet by the time this runs, and getBoundingClientRect() won't
+  // construct it after bug 1440537.
+  //
+  // So we may need to wait a few frames to make this reliable.
+  //
+  // FIXME(emilio, bug 1218456): This dance shouldn't be needed.
+  let anchor = document.getElementById("anchor");
+  if (anchor.getBoundingClientRect().width > 0)
+    anchor.click();
+  else
+    requestAnimationFrame(navigateAway);
 }
 
 function doTest() {
   try {
     // this should fail the first time, but work the second
     window.parent.ok_wrapper(true, "a document that was loaded, navigated to another document, had 'allow-same-origin' added and then was" +
       " navigated back should be same-origin with its parent");
   } catch (e) {
--- a/dom/html/test/file_iframe_sandbox_e_if5.html
+++ b/dom/html/test/file_iframe_sandbox_e_if5.html
@@ -3,17 +3,28 @@
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 341604</title>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script src="/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <script type="application/javascript">
 function navigateAway() {
-  document.getElementById("anchor").click();
+  // Anchor clicks are only handled if we have a pres-context, and we may not
+  // have one yet by the time this runs, and getBoundingClientRect() /
+  // sendMouseEvent won't construct it after bug 1440537.
+  //
+  // So we may need to wait a few frames to make this reliable.
+  //
+  // FIXME(emilio, bug 1218456): This dance shouldn't be needed.
+  let anchor = document.getElementById("anchor");
+  if (anchor.getBoundingClientRect().width > 0)
+    anchor.click();
+  else
+    requestAnimationFrame(navigateAway);
 }
 </script>
 <body onload="navigateAway()">
   I am sandboxed with 'allow-scripts and allow-top-navigation'
 
   <a href="file_iframe_sandbox_top_navigation_pass.html" target='_top' id='anchor'>Click me</a>
 </body>
 </html>