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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-uncaught-promise-in-worker.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 var worker; 6 var worker;
7 7
8 function startWorker() 8 function startWorker()
9 { 9 {
10 worker = new Worker("resources/worker-with-unhandled-promises.js"); 10 worker = new Worker("resources/worker-with-unhandled-promises.js");
11 worker.postMessage(""); 11 worker.postMessage("");
12 } 12 }
13 13
14 function test() 14 function test()
15 { 15 {
16 InspectorTest.addConsoleViewSniffer(checkConsoleMessages, true); 16 InspectorTest.addConsoleViewSniffer(checkConsoleMessages, true);
17 InspectorTest.evaluateInPage("setTimeout(startWorker, 0)"); 17 InspectorTest.evaluateInPage("setTimeout(startWorker, 0)");
18 18
19 function checkConsoleMessages() 19 function checkConsoleMessages()
20 { 20 {
21 var count = InspectorTest.consoleMessagesCount(); 21 var count = InspectorTest.consoleMessagesCount();
22 if (count === 2) 22 if (count === 2)
23 WebInspector.console.showPromise().then(expand); 23 Common.console.showPromise().then(expand);
24 } 24 }
25 25
26 function expand() 26 function expand()
27 { 27 {
28 InspectorTest.expandConsoleMessages(dump); 28 InspectorTest.expandConsoleMessages(dump);
29 } 29 }
30 30
31 function dump() 31 function dump()
32 { 32 {
33 InspectorTest.dumpConsoleMessagesIgnoreErrorStackFrames(); 33 InspectorTest.dumpConsoleMessagesIgnoreErrorStackFrames();
34 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
35 } 35 }
36 } 36 }
37 37
38 </script> 38 </script>
39 </head> 39 </head>
40 40
41 <body onload="runTest()"> 41 <body onload="runTest()">
42 <p> 42 <p>
43 Tests that uncaught promise rejections happenned in workers are logged into cons ole. 43 Tests that uncaught promise rejections happenned in workers are logged into cons ole.
44 </p> 44 </p>
45 45
46 </body> 46 </body>
47 </html> 47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698