blob: beb7a925141f4119eeba8916cb5135a11803ef2b [file] [log] [blame]
(async function(testRunner) {
var {page, session, dp} = await testRunner.startBlank(`Check that console.log doesn't run microtasks.`);
dp.Runtime.onConsoleAPICalled(result => {
testRunner.log(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)`});
})