diff options
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/test/navigation/file_bug1379762-2.html | 43 | ||||
-rw-r--r-- | docshell/test/navigation/file_document_write_1.html | 23 | ||||
-rw-r--r-- | docshell/test/navigation/mochitest.ini | 4 | ||||
-rw-r--r-- | docshell/test/navigation/test_sessionhistory.html | 10 |
4 files changed, 8 insertions, 72 deletions
diff --git a/docshell/test/navigation/file_bug1379762-2.html b/docshell/test/navigation/file_bug1379762-2.html deleted file mode 100644 index 86033cb2e..000000000 --- a/docshell/test/navigation/file_bug1379762-2.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>Bug 1379762</title> - </head> - <script type="text/just-data"> - onunload = null; // enable bfcache - ++opener.testCount; - onpageshow = function(e) { - opener.ok(!e.persisted, "Pageshow should not be coming from bfcache " + opener.testCount); - } - if (opener.testCount == 1) { - onload = function () { - setTimeout(function() { - document.write(testScript); - }, 0); - } - } else if (opener.testCount == 2) { - // Do this async, just in case. - setTimeout(function() { - history.back(); - }, 0); - } else if (opener.testCount == 3) { - // Do this async, just in case. - setTimeout(function() { - history.forward(); - }, 0); - } else if (opener.testCount == 4) { - onload = function() { - opener.nextTest(); - window.close(); - } - } - </script> - <script> - var data = document.querySelector("script[type='text/just-data']").textContent; - // Store the string that does all out work in a global variable, so we can - // get at it later. - var testScript = "<script>" + data + "</" + "script>"; - document.write(testScript); - </script> -</html> diff --git a/docshell/test/navigation/file_document_write_1.html b/docshell/test/navigation/file_document_write_1.html index e0281f7cd..169046a9b 100644 --- a/docshell/test/navigation/file_document_write_1.html +++ b/docshell/test/navigation/file_document_write_1.html @@ -1,27 +1,16 @@ <html> <head> <script> - function run() { + function start() { + var length = history.length; document.open(); document.write("<h5 id='dynamic'>document.written content</h5>"); document.close(); - window.history.go(-1); - } - - function start() { - if (++opener.testCount == 1) { - setTimeout(run, 0); - } + opener.is(history.length, length, + "document.open/close should not change history"); + opener.nextTest(); + window.close(); } - - window.addEventListener("pageshow", - function() { - ++opener.file_document_write_1_loadCount; - if (opener.file_document_write_1_loadCount == 2) { - opener.setTimeout("isTestDynamic()", 0); - } - opener.ok(opener.file_document_write_1_loadCount <= 2); - }); </script> </head> <body onload="start();"> diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini index 8cff81ad1..e2ee307e4 100644 --- a/docshell/test/navigation/mochitest.ini +++ b/docshell/test/navigation/mochitest.ini @@ -58,8 +58,8 @@ skip-if = (toolkit == 'android') || (!debug && (os == 'mac' || os == 'win')) # B [test_reserved.html] skip-if = (toolkit == 'android') || (debug && e10s) #too slow on Android 4.3 aws only; bug 1030403; bug 1263213 for debug e10s [test_sessionhistory.html] -skip-if = toolkit == 'android' #RANDOM -support-files = file_bug1379762-1.html file_bug1379762-2.html +skip-if = toolkit == 'android' #RANDOM on Android +support-files = file_bug1379762-1.html [test_sibling-matching-parent.html] [test_sibling-off-domain.html] [test_triggeringprincipal_frame_nav.html] diff --git a/docshell/test/navigation/test_sessionhistory.html b/docshell/test/navigation/test_sessionhistory.html index 10b0cbcaf..e5978acfa 100644 --- a/docshell/test/navigation/test_sessionhistory.html +++ b/docshell/test/navigation/test_sessionhistory.html @@ -33,7 +33,6 @@ var testFiles = "file_scrollRestoration.html", "file_bug1300461.html", "file_bug1379762-1.html", - "file_bug1379762-2.html", ]; var testCount = 0; // Used by the test files. @@ -51,15 +50,6 @@ function nextTest_() { } } -// Needed by file_document_write_1.html -window.file_document_write_1_loadCount = 0; -function isTestDynamic() { - var dyn = testWindow.document.getElementById("dynamic"); - is(dyn, null, "Should have gone back to the static page!"); - nextTest(); - testWindow.close(); -} - function nextTest() { setTimeout(nextTest_, 0); } |