docshell/test/navigation/test_sessionhistory.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/navigation/test_sessionhistory.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,62 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug </title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +</head>
    1.14 +<body onload="nextTest()">
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
    1.16 +<p id="display"></p>
    1.17 +<div id="content" style="display: none">
    1.18 +  
    1.19 +</div>
    1.20 +<pre id="test">
    1.21 +<script type="application/javascript">
    1.22 +
    1.23 +/** Test for Bug  **/
    1.24 +
    1.25 +var testFiles =
    1.26 +  [ "file_bug462076_1.html",         // Dynamic frames before onload
    1.27 +    "file_bug462076_2.html",         // Dynamic frames when handling onload
    1.28 +    "file_bug462076_3.html",         // Dynamic frames after onload
    1.29 +    "file_bug508537_1.html",         // Dynamic frames and forward-back
    1.30 +    "file_document_write_1.html",    // Session history + document.write
    1.31 +    "file_static_and_dynamic_1.html",// Static and dynamic frames and forward-back
    1.32 +    "file_bug534178.html",           // Session history transaction clean-up.
    1.33 +    "file_fragment_handling_during_load.html"
    1.34 +  ];
    1.35 +var testCount = 0; // Used by the test files.
    1.36 +
    1.37 +SimpleTest.waitForExplicitFinish();
    1.38 +
    1.39 +var testWindow;
    1.40 +function nextTest_() {
    1.41 +  if (testFiles.length) {
    1.42 +    testCount = 0;
    1.43 +    testWindow = window.open(testFiles.shift(), "", "width=300,height=300");
    1.44 +    testWindow.onunload = function () { } //XXX
    1.45 +  } else {
    1.46 +    SimpleTest.finish();
    1.47 +  }
    1.48 +}
    1.49 +
    1.50 +// Needed by file_document_write_1.html
    1.51 +function isTestDynamic() {
    1.52 +  var dyn = testWindow.document.getElementById("dynamic");
    1.53 +  is(dyn, null, "Should have gone back to the static page!");
    1.54 +  nextTest();
    1.55 +  testWindow.close();
    1.56 +}
    1.57 +
    1.58 +function nextTest() {
    1.59 +  setTimeout(nextTest_, 0);
    1.60 +}
    1.61 +
    1.62 +</script>
    1.63 +</pre>
    1.64 +</body>
    1.65 +</html>

mercurial