blob: 65aa2e1d5d9311e8765dacb0aef0a3fac062201b [file] [log] [blame]
(async function(testRunner) {
const {page, session, dp} = await testRunner.startBlank(
'Tests that Page.addScriptToEvaluateOnLoad is executed with disabled javascript');
await dp.Page.enable();
await dp.Emulation.setScriptExecutionDisabled({value: true});
await dp.Page.addScriptToEvaluateOnNewDocument({source: `window.FOO = 42;`});
await session.navigate('../resources/blank.html');
testRunner.log(await session.evaluate('window.FOO'));
testRunner.completeTest();
})