Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c47843e1e51f22328e39319de7a490e9926164fe |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js |
@@ -0,0 +1,19 @@ |
+(async function(testRunner) { |
+ let {page, session, dp} = await testRunner.startBlank(`Check that console.log doesn't run microtasks.`); |
+ |
+ dp.Runtime.onConsoleAPICalled(result => { |
+ testRunner.logObject(result.params.args[0]); |
+ if (result.params.args[0].value === 'finished') |
+ testRunner.completeTest(); |
+ }); |
+ |
+ dp.Runtime.enable(); |
+ dp.Runtime.evaluate({expression: ` |
+ (function testFunction() { |
+ Promise.resolve().then(function(){ console.log(239); }); |
+ console.log(42); |
+ console.log(43); |
+ })() |
+ `}); |
+ dp.Runtime.evaluate({expression: `setTimeout(() => console.log('finished'), 0)`}); |
+}) |