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

Side by Side Diff: LayoutTests/inspector/console/console-revoke-error-in-worker.html

Issue 1095943002: DevTools: [console] Logged promise rejections do not change state once handled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: for landing Created 5 years, 8 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
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script>
6
7 var worker;
8
9 function createPromise()
10 {
11 worker = new Worker("resources/worker-with-defer-handled-promise.js");
12 }
13
14 function handlePromiseRejection()
15 {
16 worker.postMessage("");
17 }
18
19 function test()
20 {
21 WebInspector.multitargetConsoleModel.addEventListener(WebInspector.ConsoleMo del.Events.MessageAdded, messageAdded);
22 WebInspector.multitargetConsoleModel.addEventListener(WebInspector.ConsoleMo del.Events.MessageUpdated, messageUpdated);
23
24 InspectorTest.addResult("Creating worker with promise");
25 InspectorTest.evaluateInPageWithTimeout("createPromise()");
26
27 function messageAdded(event)
28 {
29 InspectorTest.addResult("");
30 InspectorTest.addResult("Message added: " + event.data.level + " " + eve nt.data.type);
31 var counter = WebInspector.Main.WarningErrorCounter._instanceForTest;
32 for (var counter of counter._counters)
33 InspectorTest.addResult(" " + counter.title);
34
35 if (event.data.level === WebInspector.ConsoleMessage.MessageLevel.Error) {
36 InspectorTest.dumpConsoleClassesBrief();
37 InspectorTest.addResult("");
38 InspectorTest.addResult("Handling promise");
39 InspectorTest.evaluateInPageWithTimeout("handlePromiseRejection()");
40 }
41 }
42
43 function messageUpdated()
44 {
45 InspectorTest.dumpConsoleClassesBrief();
46 InspectorTest.completeTest();
47 }
48 }
49
50 </script>
51 </head>
52
53 <body onload="runTest()">
54 <p>Tests that console revokes lazily handled promise rejections.</p>
55
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698