mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: make sure page.goto works when subframes return 204. (#2361)
References #1879.
This commit is contained in:
parent
9a22f64257
commit
6eb6ce0ec9
@ -383,6 +383,13 @@ module.exports.addTests = function({testRunner, expect, puppeteer, DeviceDescrip
|
|||||||
const response = await page.goto('about:blank');
|
const response = await page.goto('about:blank');
|
||||||
expect(response).toBe(null);
|
expect(response).toBe(null);
|
||||||
});
|
});
|
||||||
|
it('should work with subframes return 204', async({page, server}) => {
|
||||||
|
server.setRoute('/frames/frame.html', (req, res) => {
|
||||||
|
res.statusCode = 204;
|
||||||
|
res.end();
|
||||||
|
});
|
||||||
|
await page.goto(server.PREFIX + '/frames/one-frame.html');
|
||||||
|
});
|
||||||
it('should navigate to empty page with domcontentloaded', async({page, server}) => {
|
it('should navigate to empty page with domcontentloaded', async({page, server}) => {
|
||||||
const response = await page.goto(server.EMPTY_PAGE, {waitUntil: 'domcontentloaded'});
|
const response = await page.goto(server.EMPTY_PAGE, {waitUntil: 'domcontentloaded'});
|
||||||
expect(response.status()).toBe(200);
|
expect(response.status()).toBe(200);
|
||||||
|
Loading…
Reference in New Issue
Block a user