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

Side by Side Diff: test/inspector/runtime/console-log-doesnt-run-microtasks.js

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 years, 9 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 // Copyright 2016 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 print("Check that console.log doesn't run microtasks."); 5 InspectorTest.log("Check that console.log doesn't run microtasks.");
6 6
7 InspectorTest.addScript( 7 InspectorTest.addScript(
8 ` 8 `
9 function testFunction() 9 function testFunction()
10 { 10 {
11 Promise.resolve().then(function(){ console.log(239); }); 11 Promise.resolve().then(function(){ console.log(239); });
12 console.log(42); 12 console.log(42);
13 console.log(43); 13 console.log(43);
14 }`); 14 }`);
15 15
16 Protocol.Runtime.enable(); 16 Protocol.Runtime.enable();
17 Protocol.Runtime.onConsoleAPICalled(messageAdded); 17 Protocol.Runtime.onConsoleAPICalled(messageAdded);
18 Protocol.Runtime.evaluate({ "expression": "testFunction()" }); 18 Protocol.Runtime.evaluate({ "expression": "testFunction()" });
19 Protocol.Runtime.evaluate({ "expression": "setTimeout(() => console.log(\"finish ed\"), 0)" }); 19 Protocol.Runtime.evaluate({ "expression": "setTimeout(() => console.log(\"finish ed\"), 0)" });
20 20
21 function messageAdded(result) 21 function messageAdded(result)
22 { 22 {
23 InspectorTest.logObject(result.params.args[0]); 23 InspectorTest.logObject(result.params.args[0]);
24 if (result.params.args[0].value === "finished") 24 if (result.params.args[0].value === "finished")
25 InspectorTest.completeTest(); 25 InspectorTest.completeTest();
26 } 26 }
OLDNEW
« no previous file with comments | « test/inspector/runtime/console-deprecated-methods.js ('k') | test/inspector/runtime/console-messages-limits.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698