| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 </head> | 4 </head> |
| 5 <body> | 5 <body> |
| 6 <p>Test that window.onerror and "error" event listeners from main world are | 6 <p>Test that window.onerror and "error" event listeners from main world are |
| 7 invoked for uncaught exceptions in user scripts running in isolate worlds as | 7 invoked for uncaught exceptions in scripts running in isolate worlds as |
| 8 well as for exceptions in the main world.<a href="https://bugs.webkit.org/show_b
ug.cgi?id=8519">Bug 8519.</a> | 8 well as for exceptions in the main world.<a href="https://bugs.webkit.org/show_b
ug.cgi?id=8519">Bug 8519.</a> |
| 9 </p> | 9 </p> |
| 10 <div id="console"></div> | 10 <div id="console"></div> |
| 11 <script> | 11 <script> |
| 12 | 12 |
| 13 var expectedRecordCount = 12; | 13 var expectedRecordCount = 12; |
| 14 var recordCount = 0; | 14 var recordCount = 0; |
| 15 document.getElementById("console").addEventListener("DOMNodeInserted", function(
e) { | 15 document.getElementById("console").addEventListener("DOMNodeInserted", function(
e) { |
| 16 recordCount++; | 16 recordCount++; |
| 17 if (recordCount === expectedRecordCount && window.testRunner) | 17 if (recordCount === expectedRecordCount && window.testRunner) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 throw new Error("Error in " + isolatedWorld + " load handler."); | 51 throw new Error("Error in " + isolatedWorld + " load handler."); |
| 52 }, false); | 52 }, false); |
| 53 | 53 |
| 54 | 54 |
| 55 throw new Error("Error in "+ isolatedWorld + " inline script."); | 55 throw new Error("Error in "+ isolatedWorld + " inline script."); |
| 56 } | 56 } |
| 57 | 57 |
| 58 if (window.testRunner) { | 58 if (window.testRunner) { |
| 59 testRunner.dumpAsText(); | 59 testRunner.dumpAsText(); |
| 60 testRunner.waitUntilDone(); | 60 testRunner.waitUntilDone(); |
| 61 testRunner.addUserScript("(" + exceptions + ")('user script')", false, true)
; | 61 testRunner.evaluateScriptInIsolatedWorld(1, "(" + exceptions + ")('isolated
world')"); |
| 62 } | 62 } |
| 63 | 63 |
| 64 exceptions("main world"); | 64 exceptions("main world"); |
| 65 | 65 |
| 66 </script> | 66 </script> |
| 67 </body> | 67 </body> |
| 68 </html> | 68 </html> |
| OLD | NEW |