Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / stateobjects / state-api-on-detached-frame-crash.html
blob8d5e471aa361b122032304fcb8c863e4dceb6a30
1 <html>
2 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 function runTest()
9 var ifr = frames[0];
10 document.body.removeChild(document.getElementsByTagName("iframe")[0])
11 try {
12 ifr.history.replaceState("foo", "bar");
13 } catch (e) {
14 // Ignore, expected
16 try {
17 ifr.history.pushState("fu", "barred");
18 } catch (e) {
19 // Ignore, expected
21 document.getElementById("log").textContent = "PASSED";
24 </script>
25 <body onload="runTest();">
26 Tests that calling <code>pushState</code> or <code>replaceState</code> on a detached frame doesn't crash.
27 <iframe src="about:blank">
28 </iframe>
29 <pre id="log"></pre>
30 </body>
31 </html>