new-window-subresource-crash.html 681 B

1234567891011121314151617181920
  1. <body onload="test()">
  2. <script>
  3. function test()
  4. {
  5. var win = window.open("");
  6. var doc = win.document;
  7. var text = "<html><body><sc" + "ript src='data:text/javascript,'></scr" + "ipt></body></html>";
  8. doc.write(text);
  9. }
  10. </script>
  11. <p>This test verifies that document.writing into a newly-opened empty
  12. window does not cause crashes or assertion failures, even if it
  13. triggers subresource loads. If you have popup blocking enabled you can
  14. click the button below to test. The test only works in Safari, because
  15. it depends on behavior with resource identifiers, which are provided
  16. by the app.</p>
  17. <button onclick="test()">Crash</button>
  18. </body>