Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/workers/worker-onerror-07.html

Issue 2090953006: [Blink-Workers]Set verbosity of the external exception handler. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code changed as per the comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698