CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / docshell / test / test_bug615501_2.html
blob76bc5b3f37f403e0c4a5fb20782c4e9e890c95ac
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=615501
5 -->
6 <head>
7 <title>Test for Bug 615501</title>
8 <script type="application/javascript" src="/MochiKit/packed.js"></script>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=615501">Mozilla Bug 615501</a>
15 <iframe id='iframe' src='file_bug615501.html'></iframe>
17 <script type="application/javascript;version=1.7">
19 /** Test for Bug 615501 **/
21 // This is the same as test_bug615501_1.html, except it calls replaceState
22 // instead of pushState.
24 SimpleTest.waitForExplicitFinish();
26 // Called by inner frame on DOMContentLoaded.
27 function innerDOMContentLoaded() {
28 ok(true, "Got DOMContentLoaded event.");
29 $('iframe').contentWindow.history.replaceState('', '', '');
32 // Called by inner frame on load.
33 function innerLoad() {
34 ok(true, "Got load event.");
36 // Spin the event loop a few times to give popstate a chance to fire, then
37 // declare that we're done.
38 setTimeout(function(count) {
39 if (count > 0) {
40 setTimeout(arguments.callee, 0, count-1);
42 else {
43 SimpleTest.finish();
45 }, 0, 10);
49 // Called by inner frame on popstate.
50 function innerPopstate() {
51 ok(false, "Shouldn't get a popstate.");
53 </script>
55 </body>
56 </html>