diff --git a/.cirrus.yml b/.cirrus.yml index aaaad69fe7bed..6602841149337 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -22,15 +22,6 @@ task: test_doclint_script: npm run test-doclint test_types_script: npm run test-types -task: - matrix: - - name: Firefox Juggler (node8 + linux) - container: - dockerfile: .ci/node8/Dockerfile.linux - xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24 - install_script: npm install --unsafe-perm && cd experimental/puppeteer-firefox && npm install --unsafe-perm - test_script: npm run fjunit - task: osx_instance: image: high-sierra-base diff --git a/.travis.yml b/.travis.yml index bee3a08c00737..6658abf275079 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,11 +15,13 @@ before_install: - "sysctl kernel.unprivileged_userns_clone=1" - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" + - 'if [ "$FIREFOX" = "true" ]; then pyenv shell 3.6; pip3 install --user mozdownload; fi' + - 'if [ "$FIREFOX" = "true" ]; then rm -rf $FIREFOX_HOME; mozdownload -t daily -d $FIREFOX_HOME/latest.tar.bz --log-level DEBUG; fi' + - 'if [ "$FIREFOX" = "true" ]; then cd $FIREFOX_HOME; tar -xvf latest.tar.bz; cd -; ls $FIREFOX_HOME/firefox/firefox; fi' script: - 'if [ "$NODE8" = "true" ]; then npm run lint; fi' - 'if [ "$NODE8" = "true" ]; then npm run coverage; fi' - - 'if [ "$FIREFOX" = "true" ]; then cd experimental/puppeteer-firefox && npm i && cd ../..; fi' - - 'if [ "$FIREFOX" = "true" ]; then npm run fjunit; fi' + - 'if [ "$FIREFOX" = "true" ]; then BINARY=$FIREFOX_HOME/firefox/firefox npm run funit; fi' - 'if [ "$NODE8" = "true" ]; then npm run test-doclint; fi' - 'if [ "$NODE8" = "true" ]; then npm run test-types; fi' - 'if [ "$NODE8" = "true" ]; then npm run bundle; fi' @@ -34,8 +36,9 @@ jobs: - node_js: "8.16.0" env: - FIREFOX=true - - FLAKINESS_DASHBOARD_NAME="Travis Firefox (node8 + linux)" + - FLAKINESS_DASHBOARD_NAME="Travis Firefox Nightly (node8 + linux)" - FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}" + - FIREFOX_HOME=$TRAVIS_HOME/firefox-latest before_deploy: "npm run apply-next-version" deploy: provider: npm diff --git a/lib/Launcher.js b/lib/Launcher.js index ceb57463db4f3..df89588e34f52 100644 --- a/lib/Launcher.js +++ b/lib/Launcher.js @@ -398,6 +398,9 @@ class FirefoxLauncher { else firefoxArguments.push(...args); + if (!firefoxArguments.some(argument => argument.startsWith('--remote-debugging-'))) + firefoxArguments.push('--remote-debugging-port=0'); + let temporaryUserDataDir = null; if (!firefoxArguments.includes('-profile') && !firefoxArguments.includes('--profile')) { @@ -484,7 +487,6 @@ class FirefoxLauncher { */ defaultArgs(options = {}) { const firefoxArguments = [ - '--remote-debugging-port=0', '--no-remote', '--foreground', ]; diff --git a/package.json b/package.json index 5e8bc866f5ae4..72a24b3dd0047 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ }, "scripts": { "unit": "node test/test.js", - "fjunit": "PUPPETEER_PRODUCT=juggler node test/test.js", "funit": "PUPPETEER_PRODUCT=firefox node test/test.js", "debug-unit": "node --inspect-brk test/test.js", "test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js", diff --git a/test/accessibility.spec.js b/test/accessibility.spec.js index 7576ed9b75149..754afcd22297a 100644 --- a/test/accessibility.spec.js +++ b/test/accessibility.spec.js @@ -19,7 +19,7 @@ module.exports.addTests = function({testRunner, expect, FFOX}) { const {it, fit, xit} = testRunner; const {beforeAll, beforeEach, afterAll, afterEach} = testRunner; - describe('Accessibility', function() { + describe_fails_ffox('Accessibility', function() { it('should work', async function({page}) { await page.setContent(`
@@ -310,7 +310,7 @@ module.exports.addTests = function({testRunner, expect, FFOX}) { expect(snapshot.children[0]).toEqual(golden); }); - describe_fails_ffox('root option', function() { + describe('root option', function() { it('should work a button', async({page}) => { await page.setContent(``); diff --git a/test/browser.spec.js b/test/browser.spec.js index 17cb2e2249b11..61de5889afc7a 100644 --- a/test/browser.spec.js +++ b/test/browser.spec.js @@ -23,10 +23,7 @@ module.exports.addTests = function({testRunner, expect, headless, puppeteer, CHR it('should return whether we are in headless', async({browser}) => { const version = await browser.version(); expect(version.length).toBeGreaterThan(0); - if (CHROME) - expect(version.startsWith('Headless')).toBe(headless); - else - expect(version.startsWith('Firefox/')).toBe(true); + expect(version.startsWith('Headless')).toBe(headless); }); }); diff --git a/test/browsercontext.spec.js b/test/browsercontext.spec.js index 012e8c928541b..5fc0ff698c8e7 100644 --- a/test/browsercontext.spec.js +++ b/test/browsercontext.spec.js @@ -18,11 +18,11 @@ const utils = require('./utils'); module.exports.addTests = function({testRunner, expect, puppeteer}) { const {describe, xdescribe, fdescribe} = testRunner; - const {it, fit, xit} = testRunner; + const {it, fit, xit, it_fails_ffox} = testRunner; const {beforeAll, beforeEach, afterAll, afterEach} = testRunner; describe('BrowserContext', function() { - it('should have default context', async function({browser, server}) { + it_fails_ffox('should have default context', async function({browser, server}) { expect(browser.browserContexts().length).toBe(1); const defaultContext = browser.browserContexts()[0]; expect(defaultContext.isIncognito()).toBe(false); @@ -31,7 +31,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { expect(browser.defaultBrowserContext()).toBe(defaultContext); expect(error.message).toContain('cannot be closed'); }); - it('should create new incognito context', async function({browser, server}) { + it_fails_ffox('should create new incognito context', async function({browser, server}) { expect(browser.browserContexts().length).toBe(1); const context = await browser.createIncognitoBrowserContext(); expect(context.isIncognito()).toBe(true); @@ -40,7 +40,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { await context.close(); expect(browser.browserContexts().length).toBe(1); }); - it('should close all belonging targets once closing context', async function({browser, server}) { + it_fails_ffox('should close all belonging targets once closing context', async function({browser, server}) { expect((await browser.pages()).length).toBe(1); const context = await browser.createIncognitoBrowserContext(); @@ -51,7 +51,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { await context.close(); expect((await browser.pages()).length).toBe(1); }); - it('window.open should use parent tab context', async function({browser, server}) { + it_fails_ffox('window.open should use parent tab context', async function({browser, server}) { const context = await browser.createIncognitoBrowserContext(); const page = await context.newPage(); await page.goto(server.EMPTY_PAGE); @@ -62,7 +62,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { expect(popupTarget.browserContext()).toBe(context); await context.close(); }); - it('should fire target events', async function({browser, server}) { + it_fails_ffox('should fire target events', async function({browser, server}) { const context = await browser.createIncognitoBrowserContext(); const events = []; context.on('targetcreated', target => events.push('CREATED: ' + target.url())); @@ -78,7 +78,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { ]); await context.close(); }); - it('should wait for a target', async function({browser, server}) { + it_fails_ffox('should wait for a target', async function({browser, server}) { const context = await browser.createIncognitoBrowserContext(); let resolved = false; const targetPromise = context.waitForTarget(target => target.url() === server.EMPTY_PAGE); @@ -96,7 +96,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { expect(error).toBeInstanceOf(puppeteer.errors.TimeoutError); await context.close(); }); - it('should isolate localStorage and cookies', async function({browser, server}) { + it_fails_ffox('should isolate localStorage and cookies', async function({browser, server}) { // Create two incognito contexts. const context1 = await browser.createIncognitoBrowserContext(); const context2 = await browser.createIncognitoBrowserContext(); @@ -140,7 +140,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { ]); expect(browser.browserContexts().length).toBe(1); }); - it('should work across sessions', async function({browser, server}) { + it_fails_ffox('should work across sessions', async function({browser, server}) { expect(browser.browserContexts().length).toBe(1); const context = await browser.createIncognitoBrowserContext(); expect(browser.browserContexts().length).toBe(2); diff --git a/test/click.spec.js b/test/click.spec.js index 86b8d8c039135..1ec8cf926e935 100644 --- a/test/click.spec.js +++ b/test/click.spec.js @@ -27,7 +27,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer}) { await page.click('button'); expect(await page.evaluate(() => result)).toBe('Clicked'); }); - it('should click svg', async({page, server}) => { + it_fails_ffox('should click svg', async({page, server}) => { await page.setContent(`