test: make sure page.goto works when subframes return 204. (#2361)

References #1879.
This commit is contained in:
Andrey Lushnikov 2018-04-16 16:53:10 -07:00 committed by GitHub
parent 9a22f64257
commit 6eb6ce0ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,6 +383,13 @@ module.exports.addTests = function({testRunner, expect, puppeteer, DeviceDescrip
const response = await page.goto('about:blank');
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}) => {
const response = await page.goto(server.EMPTY_PAGE, {waitUntil: 'domcontentloaded'});
expect(response.status()).toBe(200);