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="../../resources/js-test.js"></script> | 7 <script src="../../resources/js-test.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 onerror = function(message, filename, lineno, colno, error) { | 13 onerror = function(message, filename, lineno, colno, error) { |
14 postMessage({ | 14 postMessage({ |
15 message: message, | 15 message: message, |
16 filename: filename, | 16 filename: filename, |
17 lineno: lineno, | 17 lineno: lineno, |
18 colno: colno, | 18 colno: colno, |
19 error: error | 19 error: error |
20 }); | 20 }); |
21 setTimeout(function () { postMessage({ done: true }); }, 0); | 21 setTimeout(function () { postMessage({ done: true }); }, 100); |
22 return true; | 22 return true; |
23 } | 23 } |
24 | 24 |
25 foo.bar = 0; | 25 foo.bar = 0; |
26 </script> | 26 </script> |
27 <script> | 27 <script> |
28 description("Handling an error in the worker should suppress the page-le
vel onerror handler."); | 28 description("Handling an error in the worker should suppress the page-le
vel onerror handler."); |
29 | 29 |
30 checkPostMessage({ | 30 checkPostMessage({ |
31 message: "Uncaught ReferenceError: foo is not defined", | 31 message: "Uncaught ReferenceError: foo is not defined", |
32 filename: "[blob: URL]", | 32 filename: "[blob: URL]", |
33 lineno: 14, | 33 lineno: 14, |
34 colno: 9, | 34 colno: 9, |
35 }); | 35 }); |
36 | 36 |
37 errorEventHandlerShouldNotFire(); | 37 errorEventHandlerShouldFire(); |
38 </script> | 38 </script> |
39 </body> | 39 </body> |
40 </html> | 40 </html> |
41 | 41 |
OLD | NEW |