Bug 1241634 - Reflow before clicking in mixedcontentblocker test r?kmckinley
MozReview-Commit-ID: 5rbeuVjaw0B
--- 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
@@ -13,9 +13,9 @@ support-files =
file_main_bug803225_websocket_wsh.py
file_server.sjs
[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