Bug 990202 - Move the test page to a new window to prevent it from navigating the test runner frame back. r=bzbarsky, a=test-only
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 02 Apr 2014 08:53:04 -0400
changeset 192555 80baa5d5bb1335846dbce633c1a525f8fc150ca8
parent 192554 2771311502b5c7cfcdb4139e872af589d611a8c5
child 192556 dd673979ea7219027929f5dda3215b68b89074bc
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, test-only
bugs990202
milestone30.0a2
Bug 990202 - Move the test page to a new window to prevent it from navigating the test runner frame back. r=bzbarsky, a=test-only
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
@@ -92,12 +92,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>