Bug 1241634 - Reflow before clicking in mixedcontentblocker test r=mckinley
authorJonathan Hao <jhao@mozilla.com>
Fri, 25 Mar 2016 16:52:49 +0800
changeset 330458 eeec06429b37d3f174d73f57a0dd8cf36f94d787
parent 330457 b5e79510a9b0878d167de5dd725d49937bbca9ed
child 330459 3b53ecaae8f278470d5551c377d3580ff8af9d05
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmckinley
bugs1241634
milestone48.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 1241634 - Reflow before clicking in mixedcontentblocker test r=mckinley MozReview-Commit-ID: 5rbeuVjaw0B
dom/security/test/mixedcontentblocker/file_frameNavigation_grandchild.html
dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html
dom/security/test/mixedcontentblocker/mochitest.ini
--- a/dom/security/test/mixedcontentblocker/file_frameNavigation_grandchild.html
+++ b/dom/security/test/mixedcontentblocker/file_frameNavigation_grandchild.html
@@ -8,17 +8,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <meta charset="utf-8">
   <title>Tests for Mixed Content Frame Navigation</title>
 </head>
 <body>
 <iframe src="https://example.com/tests/dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html?insecurePage_navigate_grandchild" id="child"></iframe>
 
 <script>
   // For tests that require setTimeout, set the maximum polling time to 100 x 100ms = 10 seconds.
-  var MAX_COUNT = 100;
+  var MAX_COUNT = 50;
   var TIMEOUT_INTERVAL = 100;
   var counter = 0;
 
   var child = document.getElementById("child");
   function navigationStatus(child)
   {
     // When the page is navigating, it goes through about:blank and we will get a permission denied for loc.
     // Catch that specific exception and return
--- a/dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html
+++ b/dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html
@@ -16,17 +16,22 @@
     case "insecurePage_navigate_child_response":
       parent.parent.postMessage({"test": "insecurePage_navigate_child", "msg": "navigated to insecure iframe on insecure page"}, "http://mochi.test:8888");
       document.getElementById("content").innerHTML = "Navigated from secure to insecure frame on an insecure page";
       break;
 
     case "insecurePage_navigate_grandchild":
       document.getElementById("content").innerHTML =
         '<a href="http://example.com/tests/dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html?insecurePage_navigate_grandchild_response" id="link">Testing\<\/a>';
-      document.getElementById("link").click();
+      // If we don't reflow before clicking the link, the test will fail intermittently. The reason is still unknown. We'll track this issue in bug 1259715.
+      requestAnimationFrame(function() {
+        setTimeout(function() {
+          document.getElementById("link").click();
+        }, 0);
+      });
       break;
 
     case "insecurePage_navigate_grandchild_response":
       parent.parent.parent.postMessage({"test": "insecurePage_navigate_grandchild", "msg": "navigated to insecure grandchild iframe on insecure page"}, "http://mochi.test:8888");
       document.getElementById("content").innerHTML = "Navigated from secure to insecure grandchild frame on an insecure page";
       break;
 
     case "securePage_navigate_child":
--- a/dom/security/test/mixedcontentblocker/mochitest.ini
+++ b/dom/security/test/mixedcontentblocker/mochitest.ini
@@ -15,9 +15,9 @@ support-files =
   !/dom/media/test/320x240.ogv
   !/image/test/mochitest/blue.png
 
 [test_main.html]
 skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT, SSL_REQUIRED # Bug 1141029 Mulet parity with B2G Desktop for TC
 [test_bug803225.html]
 skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT, SSL_REQUIRED # Bug 1141029 Mulet parity with B2G Desktop for TC
 [test_frameNavigation.html]
-skip-if = buildapp == 'b2g' || toolkit == 'android' || (os == 'mac' || os == 'win') #TIMED_OUT, SSL_REQUIRED, OSX/Win: Bug 1241634
+skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT, SSL_REQUIRED