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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-enabled/console-promise-reject-and-handle.html

Issue 2150993004: [DevTools] Remove V8Debugger::consoleMessagesCount. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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="../inspector/inspector-test.js"></script>
4 <script src="../inspector/console-test.js"></script>
5 <script>
6 if (window.testRunner) {
7 testRunner.waitUntilDone();
8 testRunner.dumpAsText();
9 }
10
11 function setupPromise1()
12 {
13 var p = Promise.reject(new Error('e'));
14 window.onunhandledrejection = function(evt) {
15 console.log("onunhandledrejection1");
16 evt.preventDefault();
17 setTimeout(function() {
18 p.then(function(){}, function(){});
19 }, 10);
20 };
21 window.onrejectionhandled = function(evt) {
22 console.log("onrejectionhandled1");
23 setTimeout(setupPromise2, 0);
24 };
25 }
26
27 function setupPromise2()
28 {
29 var p = Promise.reject(new Error('e'));
30 window.onunhandledrejection = function(evt) {
31 console.log("onunhandledrejection2");
32 setTimeout(function() {
33 p.then(function(){}, function(){});
34 }, 10);
35 };
36 window.onrejectionhandled = function(evt) {
37 console.log("onrejectionhandled2");
38 setTimeout(startTest, 0);
39 };
40 function startTest()
41 {
42 if (window.testRunner)
43 testRunner.showWebInspector();
44 runTest();
45 }
46 }
47
48 function test()
49 {
50 InspectorTest.expandConsoleMessages();
51 InspectorTest.addResult("----console messages start----");
52 InspectorTest.dumpConsoleMessages();
53 InspectorTest.addResult("----console messages end----");
54 InspectorTest.completeTest();
55 }
56 </script>
57 </head>
58 <body onload="setupPromise1()">
59 <p>
60 Tests that evt.preventDefault() in window.onunhandledrejection suppresses consol e output.
61 </p>
62 </body>
63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698