From 6eb6ce0ec96f8c888f274d21eb10ce79a7bb9b99 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 16 Apr 2018 16:53:10 -0700 Subject: [PATCH] test: make sure page.goto works when subframes return 204. (#2361) References #1879. --- test/page.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/page.spec.js b/test/page.spec.js index 281723c6..b98d27d1 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -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);