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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 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 type="text/javascript" src="../../http/tests/inspector-protocol/resource s/inspector-protocol-test.js"></script>
4 <script>
5
6 function test()
7 {
8 var expectedMessages = 4;
9 var messages = [];
10
11 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = consoleAPICalled;
12 InspectorTest.eventHandler["Console.messageAdded"] = messageAdded;
13 InspectorTest.sendCommandOrDie("Runtime.enable", {});
14 InspectorTest.sendCommandOrDie("Console.enable", {});
15 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "console. log(42)" });
16 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "console. error('abc')" });
17
18 function consoleAPICalled(result)
19 {
20 messages.push("api call: " + result.params.args[0].value);
21 if (!(--expectedMessages))
22 done();
23 }
24
25 function messageAdded(result)
26 {
27 messages.push("console message: " + result.params.message.text);
28 if (!(--expectedMessages))
29 done();
30 }
31
32 function done()
33 {
34 messages.sort();
35 for (var message of messages)
36 InspectorTest.log(message);
37 InspectorTest.completeTest();
38 }
39 }
40 </script>
41 </head>
42 <body onLoad="runTest();">
43 Check that console.log is reported through Console domain as well.
44 </body>
45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698