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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-line-and-column.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 InspectorTest.sendCommand("Runtime.enable", {});
9
10 addConsoleMessagePromise("console.log(239)")
11 .then(dumpMessage)
12 .then(() => addConsoleMessagePromise("var l = console.log;\n l(239)"))
13 .then(dumpMessage)
14 .then(() => InspectorTest.completeTest());
15
16 function addConsoleMessagePromise(expression)
17 {
18 var cb;
19 var p = new Promise((resolver) => cb = resolver);
20 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = (messageObject) => cb(messageObject);
21 InspectorTest.sendCommand("Runtime.evaluate", { expression: expression } );
22 return p;
23 }
24
25 function dumpMessage(messageObject)
26 {
27 var msg = messageObject.params;
28 delete msg.executionContextId;
29 delete msg.args;
30 delete msg.timestamp;
31 for (var frame of msg.stackTrace.callFrames)
32 frame.scriptId = 0;
33 InspectorTest.logObject(msg);
34 }
35 }
36
37 </script>
38 </head>
39 <body onload="runTest()">
40 </body>
41 </html>
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698