diff --git a/package.json b/package.json index 1483882b14978..3479fcffac16f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "playwright": { "chromium_revision": "740289", "firefox_revision": "1028", - "webkit_revision": "1141" + "webkit_revision": "1143" }, "scripts": { "ctest": "cross-env BROWSER=chromium node test/test.js", diff --git a/src/webkit/wkPage.ts b/src/webkit/wkPage.ts index 2b8ee55719b0c..dc11ae65b60fe 100644 --- a/src/webkit/wkPage.ts +++ b/src/webkit/wkPage.ts @@ -68,6 +68,7 @@ export class WKPage implements PageDelegate { private async _initializePageProxySession() { const promises: Promise[] = [ this._pageProxySession.send('Dialog.enable'), + this._pageProxySession.send('Emulation.setActiveAndFocused', { active: true }), this.authenticate(this._page._state.credentials) ]; const contextOptions = this._page.context()._options; diff --git a/test/emulation.spec.js b/test/emulation.spec.js index 468b713faf0d7..330592eec9224 100644 --- a/test/emulation.spec.js +++ b/test/emulation.spec.js @@ -18,7 +18,7 @@ /** * @type {PageTestSuite} */ -module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) { +module.exports.describe = function({testRunner, expect, playwright, headless, FFOX, CHROMIUM, WEBKIT}) { const {describe, xdescribe, fdescribe} = testRunner; const {it, fit, xit, dit} = testRunner; const {beforeAll, beforeEach, afterAll, afterEach} = testRunner; @@ -221,4 +221,9 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI }); }); + describe('focus', function() { + it.skip(!headless)('should think that it is focused by default', async({page}) => { + expect(await page.evaluate('document.hasFocus()')).toBe(true); + }); + }); };