blob: 2461bd6ea68bf7c2607a443358aaa006012e00f5 [file] [log] [blame]
(async function(testRunner) {
const {page, session, dp} = await testRunner.startBlank(
`Verifies that receiving a set-cookie header with invalid syntax sends a Network.ResponseReceivedExtraInfo event with the blocked cookie.\n`);
await dp.Network.enable();
const setCookieInvalidSyntax = 'https://cookie.test:8443/inspector-protocol/network/resources/set-cookie-invalid-syntax.php';
const helper = (await testRunner.loadScript('resources/extra-info-helper.js'))(dp, session);
const {requestExtraInfo, responseExtraInfo} = await helper.navigateWithExtraInfo(setCookieInvalidSyntax);
testRunner.log(responseExtraInfo.params.blockedCookies, 'Invalid syntax blocked set-cookies:');
testRunner.completeTest();
})