| OLD | NEW |
| (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 testFunction() | |
| 7 { | |
| 8 Promise.resolve().then(function(){ console.log(239); }); | |
| 9 console.log(42); | |
| 10 console.log(43); | |
| 11 } | |
| 12 | |
| 13 function test() | |
| 14 { | |
| 15 InspectorTest.sendCommandOrDie("Runtime.enable", {}); | |
| 16 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded; | |
| 17 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "testFunc
tion()" }); | |
| 18 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeo
ut(() => console.log(\"finished\"), 0)" }); | |
| 19 | |
| 20 function messageAdded(result) | |
| 21 { | |
| 22 InspectorTest.logObject(result.params.args[0]); | |
| 23 if (result.params.args[0].value === "finished") | |
| 24 InspectorTest.completeTest(); | |
| 25 } | |
| 26 } | |
| 27 </script> | |
| 28 </head> | |
| 29 <body onLoad="runTest();"> | |
| 30 Check that console.log doesn't run microtasks. | |
| 31 </body> | |
| 32 </html> | |
| OLD | NEW |