mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: introduce puppeteer-firefox (#3628)
This adds a proof-of-concept of `puppeteer-firefox`. This consists of two parts: - `//experimental/juggler` - patches to apply to Firefox. - `//experimental/puppeteer-firefox` - front-end code to be merged with Puppeteer. As things become more stable, we'll gradually move it out of the experimental folder.
This commit is contained in:
24
experimental/puppeteer-firefox/test/firefoxonly.spec.js
Normal file
24
experimental/puppeteer-firefox/test/firefoxonly.spec.js
Normal file
@@ -0,0 +1,24 @@
|
||||
module.exports.addTests = function({testRunner, expect, product}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
|
||||
describe('Firefox-specific tests', function() {
|
||||
describe('Browser.version', function() {
|
||||
it('should return whether we are in headless', async({browser}) => {
|
||||
const version = await browser.version();
|
||||
expect(version.length).toBeGreaterThan(0);
|
||||
expect(version.startsWith('Firefox/')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Browser.userAgent', function() {
|
||||
it('should include WebKit', async({browser}) => {
|
||||
const userAgent = await browser.userAgent();
|
||||
expect(userAgent.length).toBeGreaterThan(0);
|
||||
expect(userAgent).toContain('Gecko');
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user