Bug 990202 - Move the test page to a new window to prevent it from navigating the test runner frame back; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 02 Apr 2014 08:53:04 -0400
changeset 176808 2c4c218a7a099cdd995cd31d9de900c1ac4d9ac2
parent 176807 f71655a1526649d8d000c44dd13039bc7938939f
child 176809 f853e8ff85eaf87876b29dfe99141da58a840e2d
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbzbarsky
bugs990202
milestone31.0a1
Bug 990202 - Move the test page to a new window to prevent it from navigating the test runner frame back; r=bzbarsky
docshell/test/file_framedhistoryframes.html
docshell/test/mochitest.ini
docshell/test/test_framedhistoryframes.html
new file mode 100644
--- /dev/null
+++ b/docshell/test/file_framedhistoryframes.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<iframe id="iframe" src="historyframes.html"></iframe>
+<script type="application/javascript">
+
+var SimpleTest = window.opener.SimpleTest;
+var is = window.opener.is;
+
+function done() {
+  window.opener.done();
+}
+
+</script>
+</body>
+</html>
--- a/docshell/test/mochitest.ini
+++ b/docshell/test/mochitest.ini
@@ -91,12 +91,13 @@ skip-if = (buildapp == 'b2g' && toolkit 
 [test_bug691547.html]
 [test_bug694612.html]
 [test_bug703855.html]
 [test_bug713825.html]
 [test_bug728939.html]
 skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
 [test_bug797909.html]
 [test_framedhistoryframes.html]
-skip-if = toolkit == 'android' #bug 784321
+skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #Bug 931116, b2g desktop specific, initial triage, and also bug 784321
+support-files = file_framedhistoryframes.html
 [test_pushState_after_document_open.html]
 [test_windowedhistoryframes.html]
 skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
--- a/docshell/test/test_framedhistoryframes.html
+++ b/docshell/test/test_framedhistoryframes.html
@@ -7,25 +7,26 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 602256</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=602256">Mozilla Bug 602256</a>
 <p id="display"></p>
 <div id="content">
-  <iframe id="iframe" src="historyframes.html"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 602256 **/
 
 SimpleTest.waitForExplicitFinish();
+var win = window.open("file_framedhistoryframes.html");
 
 function done() {
+  win.close();
   SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>