feat(firefox): support page.browserContext() (#3965)

This commit is contained in:
Andrey Lushnikov 2019-02-08 18:58:40 -08:00 committed by GitHub
parent c64e02e7c2
commit 0cf6ab68e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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);
});