OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 window.isOnErrorTest = true; | 5 window.isOnErrorTest = true; |
6 </script> | 6 </script> |
7 <script src="../js/resources/js-test-pre.js"></script> | 7 <script src="../js/resources/js-test-pre.js"></script> |
8 <script src="resources/onerror-test.js"></script> | 8 <script src="resources/onerror-test.js"></script> |
9 </head> | 9 </head> |
10 <body> | 10 <body> |
11 <!-- This script's body will be used to build a Blob URL to use as a Worker.
--> | 11 <!-- This script's body will be used to build a Blob URL to use as a Worker.
--> |
12 <script id="workerCode" type="text/plain"> | 12 <script id="workerCode" type="text/plain"> |
13 setTimeout(function() { | 13 var not_a_sequence = 3; |
14 throw new Error("Exception in setTimeout callback"); | 14 postMessage(2, not_a_sequence); |
15 }, 0); | |
16 </script> | 15 </script> |
17 <script> | 16 <script> |
18 description("This tests that exceptions in setTimeout triggers 'worker.o
nerror'."); | 17 description("This tests that unhandled exceptions in postMessage() are d
elivered to 'worker.onerror'."); |
19 | 18 |
20 checkErrorEventInHandler({ | 19 checkErrorEventInHandler({ |
21 message: "Uncaught Error: Exception in setTimeout callback", | 20 message: "Uncaught TypeError: Failed to execute 'postMessage' on 'Wo
rkerGlobalScope': Second argument is neither an array, nor does it have indexed
properties.", |
22 filename: "[blob: URL]", | 21 filename: "[blob: URL]", |
23 lineno: 3, | 22 lineno: 3, |
24 colno: 19, | 23 colno: 9, |
25 }); | 24 }); |
26 </script> | 25 </script> |
27 <script src="../js/resources/js-test-post.js"></script> | 26 <script src="../js/resources/js-test-post.js"></script> |
28 </body> | 27 </body> |
29 </html> | 28 </html> |
OLD | NEW |