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: test/inspector/runtime/console-api-repeated-in-console.js

Issue 2369753004: [inspector] added inspector test runner [part 5] (Closed)
Patch Set: addressed comments Created 4 years, 2 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 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 print("Check that console.log is reported through Console domain as well.");
6
7 var expectedMessages = 4;
8 var messages = [];
9
10 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = consoleAPICalled;
11 InspectorTest.eventHandler["Console.messageAdded"] = messageAdded;
12 InspectorTest.sendCommandOrDie("Runtime.enable", {});
13 InspectorTest.sendCommandOrDie("Console.enable", {});
14 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "console.log( 42)" });
15 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "console.erro r('abc')" });
16
17 function consoleAPICalled(result)
18 {
19 messages.push("api call: " + result.params.args[0].value);
20 if (!(--expectedMessages))
21 done();
22 }
23
24 function messageAdded(result)
25 {
26 messages.push("console message: " + result.params.message.text);
27 if (!(--expectedMessages))
28 done();
29 }
30
31 function done()
32 {
33 messages.sort();
34 for (var message of messages)
35 InspectorTest.log(message);
36 InspectorTest.completeTest();
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698