test_bug631440.html (835B)
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 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 24 try { 25 w.history.pushState(null, "title", "pushState.html"); 26 ok(false, "Should have thrown a security exception"); 27 } 28 catch (e) { 29 ok(true, "Should have thrown a security exception"); 30 } 31 32 w.close(); 33 SimpleTest.finish(); 34 35 </script> 36 </pre> 37 </body> 38 </html>