Skip to content

Commit

Permalink
test(cookies): cookies from headful now work in headless (#3481)
Browse files Browse the repository at this point in the history
This patch enables cookie test. The actual upstream patch
that fixed the issue:
- https://crrev.com/599696 - Headless: support cookie encryption

Fixes #921.
  • Loading branch information
aslushnikov committed Nov 2, 2018
1 parent 3596c5f commit eca3c6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/headful.spec.js
Expand Up @@ -16,9 +16,13 @@

const path = require('path');
const os = require('os');
const fs = require('fs');
const rm = require('rimraf').sync;
const {helper} = require('../lib/helper');
const utils = require('./utils');
const {waitEvent} = utils;
const puppeteer = utils.requireRoot('index.js');
const mkdtempAsync = helper.promisify(fs.mkdtemp);

const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');

Expand Down Expand Up @@ -79,7 +83,7 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions})
expect(pages).toEqual(['about:blank']);
await browser.close();
});
xit('headless should be able to read cookies written by headful', async({server}) => {
it('headless should be able to read cookies written by headful', async({server}) => {
const userDataDir = await mkdtempAsync(TMP_FOLDER);
// Write a cookie in headful chrome
const headfulBrowser = await puppeteer.launch(Object.assign({userDataDir}, headfulOptions));
Expand Down

0 comments on commit eca3c6b

Please sign in to comment.