| OLD | NEW |
| (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 doesn't run microtasks."); | |
| 6 | |
| 7 InspectorTest.evaluateInPage( | |
| 8 ` | |
| 9 function testFunction() | |
| 10 { | |
| 11 Promise.resolve().then(function(){ console.log(239); }); | |
| 12 console.log(42); | |
| 13 console.log(43); | |
| 14 }`); | |
| 15 | |
| 16 InspectorTest.sendCommandOrDie("Runtime.enable", {}); | |
| 17 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded; | |
| 18 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "testFunction
()" }); | |
| 19 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeout((
) => console.log(\"finished\"), 0)" }); | |
| 20 | |
| 21 function messageAdded(result) | |
| 22 { | |
| 23 InspectorTest.logObject(result.params.args[0]); | |
| 24 if (result.params.args[0].value === "finished") | |
| 25 InspectorTest.completeTest(); | |
| 26 } | |
| OLD | NEW |