OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <script> |
| 8 description('Test that document.open() doesn\'t crash when being opened from a f
rame-less context.'); |
| 9 |
| 10 window.jsTestIsAsync = true; |
| 11 |
| 12 if (window.testRunner) { |
| 13 testRunner.dumpAsText(); |
| 14 testRunner.waitUntilDone(); |
| 15 testRunner.setCanOpenWindows(); |
| 16 } |
| 17 |
| 18 (function() { |
| 19 if (location.hash == "#stop") |
| 20 return; |
| 21 |
| 22 blankWindow = open(location + "#stop"); |
| 23 blankWindow.onload = function() { |
| 24 blankFunc = blankWindow.Function; |
| 25 blankWindow.eval("location = 'about:blank'"); |
| 26 setTimeout(function() { |
| 27 blankFunc( "(" + function() { targetWindow = open(); } + ")()")(); |
| 28 finishJSTest(); |
| 29 }); |
| 30 }; |
| 31 })(); |
| 32 </script> |
| 33 </body> |
| 34 </html> |
OLD | NEW |