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 195304 2c4c218a7a099cdd995cd31d9de900c1ac4d9ac2
parent 195303 f71655a1526649d8d000c44dd13039bc7938939f
child 195305 f853e8ff85eaf87876b29dfe99141da58a840e2d
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs990202
milestone31.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 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>