mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-03 17:09:01 +03:00
fix(firefox): roll to 1029 and unskip passing tests (#984)
This commit is contained in:
parent
d790b4c280
commit
2e0d89e25c
@ -9,7 +9,7 @@
|
||||
"main": "index.js",
|
||||
"playwright": {
|
||||
"chromium_revision": "740847",
|
||||
"firefox_revision": "1028",
|
||||
"firefox_revision": "1029",
|
||||
"webkit_revision": "1148"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -70,7 +70,8 @@ export class RawKeyboardImpl implements input.RawKeyboard {
|
||||
code,
|
||||
key,
|
||||
repeat: autoRepeat,
|
||||
location
|
||||
location,
|
||||
text,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,7 @@ export class FFPage implements PageDelegate {
|
||||
helper.addEventListener(this._session, 'Page.workerCreated', this._onWorkerCreated.bind(this)),
|
||||
helper.addEventListener(this._session, 'Page.workerDestroyed', this._onWorkerDestroyed.bind(this)),
|
||||
helper.addEventListener(this._session, 'Page.dispatchMessageFromWorker', this._onDispatchMessageFromWorker.bind(this)),
|
||||
helper.addEventListener(this._session, 'Page.crashed', this._onCrashed.bind(this)),
|
||||
];
|
||||
}
|
||||
|
||||
@ -229,6 +230,10 @@ export class FFPage implements PageDelegate {
|
||||
worker.session.dispatchMessage(JSON.parse(event.message));
|
||||
}
|
||||
|
||||
async _onCrashed(event: Protocol.Page.crashedPayload) {
|
||||
this._page._didCrash();
|
||||
}
|
||||
|
||||
async exposeBinding(name: string, bindingFunction: string): Promise<void> {
|
||||
await this._session.send('Page.addBinding', {name: name});
|
||||
await this._session.send('Page.addScriptToEvaluateOnNewDocument', {script: bindingFunction});
|
||||
@ -424,6 +429,8 @@ export class FFPage implements PageDelegate {
|
||||
objectId: toRemoteObject(handle).objectId!,
|
||||
executionContextId: (to._delegate as FFExecutionContext)._executionContextId
|
||||
});
|
||||
if (!result.remoteObject)
|
||||
throw new Error('Unable to adopt element handle from a different document');
|
||||
return to._createHandle(result.remoteObject) as dom.ElementHandle<T>;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT})
|
||||
});
|
||||
expect(await divHandle.ownerFrame()).toBe(page.mainFrame());
|
||||
});
|
||||
it.skip(FFOX)('should work for adopted elements', async({page,server}) => {
|
||||
it('should work for adopted elements', async({page,server}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
const [popup] = await Promise.all([
|
||||
page.waitForEvent('popup').then(async popup => { await popup.waitForLoadState(); return popup; }),
|
||||
|
@ -378,7 +378,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT})
|
||||
const result = await page.evaluate(body => body.innerHTML, bodyHandle);
|
||||
expect(result.trim()).toBe('<div>Hi, I\'m frame</div>');
|
||||
});
|
||||
it.skip(FFOX)('should not allow cross-frame element handles when frames do not script each other', async({page, server}) => {
|
||||
it('should not allow cross-frame element handles when frames do not script each other', async({page, server}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
const frame = await utils.attachFrame(page, 'frame1', server.CROSS_PROCESS_PREFIX + '/empty.html');
|
||||
const bodyHandle = await frame.$('body');
|
||||
|
@ -71,7 +71,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT,
|
||||
await textarea.press('b');
|
||||
expect(await page.evaluate(() => document.querySelector('textarea').value)).toBe('a');
|
||||
});
|
||||
it.skip(FFOX)('ElementHandle.press should support |text| option', async({page, server}) => {
|
||||
it('ElementHandle.press should support |text| option', async({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/input/textarea.html');
|
||||
const textarea = await page.$('textarea');
|
||||
await textarea.press('a', {text: 'ё'});
|
||||
|
@ -112,14 +112,17 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FF
|
||||
});
|
||||
});
|
||||
|
||||
describe.skip(FFOX)('Page.Events.error', function() {
|
||||
describe('Page.Events.error', function() {
|
||||
it('should throw when page crashes', async({page}) => {
|
||||
await page.setContent(`<div>This page should crash</div>`);
|
||||
let error = null;
|
||||
page.on('error', err => error = err);
|
||||
if (CHROMIUM)
|
||||
page.goto('chrome://crash').catch(e => {});
|
||||
else if (WEBKIT)
|
||||
page._delegate._session.send('Page.crash', {}).catch(e => {});
|
||||
else if (FFOX)
|
||||
page._delegate._session.send('Page.crash', {}).catch(e => {});
|
||||
await waitEvent(page, 'error');
|
||||
expect(error.message).toBe('Page crashed!');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user