Skip to content

Commit

Permalink
test: make sure headful browser closes with beforeuload page (#3751)
Browse files Browse the repository at this point in the history
This was fixed upstream at https://crrev.com/618425

Fixes #3673
  • Loading branch information
aslushnikov committed Jan 10, 2019
1 parent 4c48b77 commit 16fc28b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/headful.spec.js
Expand Up @@ -121,6 +121,15 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions})
]);
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();
});
});
};

0 comments on commit 16fc28b

Please sign in to comment.