test: make sure headful browser closes with beforeuload page (#3751)
This was fixed upstream at https://crrev.com/618425 Fixes #3673
This commit is contained in:
parent
4c48b77503
commit
16fc28bf06
@ -121,6 +121,15 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions})
|
|||||||
]);
|
]);
|
||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
it('should close browser with beforeunload page', async({server}) => {
|
||||||
|
const browser = await puppeteer.launch(headfulOptions);
|
||||||
|
const page = await browser.newPage();
|
||||||
|
await page.goto(server.PREFIX + '/beforeunload.html');
|
||||||
|
// We have to interact with a page so that 'beforeunload' handlers
|
||||||
|
// fire.
|
||||||
|
await page.click('body');
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user