docshell/test/test_pushState_after_document_open.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=957479
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 957479</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    13   /** Test for Bug 957479 **/
    14   SimpleTest.waitForExplicitFinish();
    15   // Child needs to invoke us, otherwise our onload will fire before the child
    16   // has done the write/close bit.
    17   onmessage = function doTest() {
    18     is(frames[0].location.pathname, "/tests/docshell/test/file_pushState_after_document_open.html", "Should have the right path here");
    19     is(frames[0].location.hash, "", "Should have the right hash here");
    20     frames[0].history.pushState({}, '', frames[0].document.URL + "#foopy");
    21     is(frames[0].location.pathname, "/tests/docshell/test/file_pushState_after_document_open.html", "Pathname should not have changed");
    22     is(frames[0].location.hash, "#foopy", "Hash should have changed");
    23     SimpleTest.finish();
    24   }
    26   </script>
    27 </head>
    28 <body>
    29 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=957479">Mozilla Bug 957479</a>
    30 <p id="display"></p>
    31 <div id="content" style="display: none">
    32 <iframe src="file_pushState_after_document_open.html"></iframe>
    33 </div>
    34 <pre id="test">
    35 </pre>
    36 </body>
    37 </html>

mercurial