dom/tests/mochitest/general/test_bug631440.html

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:4126ae190255
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=631440
5 -->
6 <head>
7 <title>Test for Bug 631440</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=631440">Mozilla Bug 631440</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
15
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
19
20 SimpleTest.waitForExplicitFinish();
21
22 var w = window.open("about:blank");
23 w.addEventListener("load", function() {
24 w.close();
25 SimpleTest.finish();
26 }, false);
27
28 try {
29 w.history.pushState(null, "title", "pushState.html");
30 ok(false, "Should have thrown a security exception");
31 }
32 catch (e) {
33 ok(true, "Should have thrown a security exception");
34 }
35
36 </script>
37 </pre>
38 </body>
39 </html>

mercurial