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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.html

Issue 2139543002: [DevTools] Report console API calls through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 testRunner.setDumpConsoleMessages(false); 6 testRunner.setDumpConsoleMessages(false);
7 7
8 function test() 8 function test()
9 { 9 {
10 InspectorTest.eventHandler["Console.messageAdded"] = messageAdded; 10 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded;
11 InspectorTest.sendCommand("Console.enable", {}); 11 InspectorTest.sendCommand("Runtime.enable", {});
12 12
13 var deprecatedMethods = [ 13 var deprecatedMethods = [
14 "console.timeline(\"42\")", 14 "console.timeline(\"42\")",
15 "console.timeline(\"42\")", 15 "console.timeline(\"42\")",
16 "console.timeline(\"42\")", // three calls should produce one warning me ssage 16 "console.timeline(\"42\")", // three calls should produce one warning me ssage
17 "console.timelineEnd(\"42\")", 17 "console.timelineEnd(\"42\")",
18 "console.markTimeline(\"42\")", 18 "console.markTimeline(\"42\")",
19 ]; 19 ];
20 InspectorTest.sendCommand("Runtime.evaluate", { expression: deprecatedMethod s.join(";") }); 20 InspectorTest.sendCommand("Runtime.evaluate", { expression: deprecatedMethod s.join(";") });
21 21
22 var messagesLeft = 3; 22 var messagesLeft = 3;
23 function messageAdded(data) 23 function messageAdded(data)
24 { 24 {
25 var text = data.params.message.text; 25 var text = data.params.args[0].value;
26 if (text.indexOf("deprecated") === -1) 26 if (text.indexOf("deprecated") === -1)
27 return; 27 return;
28 InspectorTest.log(text); 28 InspectorTest.log(text);
29 if (!--messagesLeft) 29 if (!--messagesLeft)
30 InspectorTest.completeTest(); 30 InspectorTest.completeTest();
31 } 31 }
32 } 32 }
33 </script> 33 </script>
34 </head> 34 </head>
35 <body onload="runTest()">Tests checks that deprecation messages for console.</bo dy> 35 <body onload="runTest()">Tests checks that deprecation messages for console.</bo dy>
36 </html> 36 </html>
37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698