Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a3866e82af3934ca8fb821fb421edd0c0e2556b6 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html |
| @@ -0,0 +1,32 @@ |
| +<html> |
| +<head> |
| +<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
| +<script> |
| + |
| +function testFunction() |
| +{ |
| + Promise.resolve().then(function(){ console.log(239); }); |
| + console.log(42); |
| + console.log(43); |
| +} |
| + |
| +function test() |
| +{ |
| + InspectorTest.sendCommandOrDie("Console.enable", {}); |
| + InspectorTest.eventHandler["Console.messageAdded"] = messageAdded; |
| + InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeout(testFunction, 0)" }); |
| + |
| + var messageCount = 3; |
|
dgozman
2016/04/30 00:07:01
If something goes wrong, this test will timeout. C
|
| + function messageAdded(result) |
| + { |
| + InspectorTest.logObject(result.params.message.parameters[0]); |
| + if (!--messageCount) |
| + InspectorTest.completeTest(); |
| + } |
| +} |
| +</script> |
| +</head> |
| +<body onLoad="runTest();"> |
| +Check that console.log doesn't run microtasks. |
| +</body> |
| +</html> |