Skip to content

Commit

Permalink
feat(firefox): support page.browserContext() (#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Feb 9, 2019
1 parent c64e02e commit 0cf6ab6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions experimental/puppeteer-firefox/lib/Page.js
Expand Up @@ -88,6 +88,13 @@ class Page extends EventEmitter {
this._viewport = null;
}

/**
* @return {BrowserContext}
*/
browserContext() {
return this._target.browserContext();
}

_onUncaughtError(params) {
let error = new Error(params.message);
error.stack = params.stack;
Expand Down
2 changes: 1 addition & 1 deletion test/page.spec.js
Expand Up @@ -1065,7 +1065,7 @@ module.exports.addTests = function({testRunner, expect, headless, Errors, Device
});
});

describe_fails_ffox('Page.browserContext', function() {
describe('Page.browserContext', function() {
it('should return the correct browser instance', async function({page, context, browser}) {
expect(page.browserContext()).toBe(context);
});
Expand Down

0 comments on commit 0cf6ab6

Please sign in to comment.