feat(firefox): roll ff and ff-beta to 1442 (#29751)

This requires changes in `FFPage`.
Also fixing a new ff-specific test that introduced flakiness on the
bots.

Closes https://github.com/microsoft/playwright/pull/29750
Closes https://github.com/microsoft/playwright/pull/29724
Closes https://github.com/microsoft/playwright/pull/29681
Closes https://github.com/microsoft/playwright/pull/29678
This commit is contained in:
Dmitry Gozman 2024-02-29 14:44:45 -08:00 committed by GitHub
parent 532d8e5500
commit 0f30cdab23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 11 additions and 10 deletions

View File

@ -21,19 +21,19 @@
},
{
"name": "firefox",
"revision": "1440",
"revision": "1442",
"installByDefault": true,
"browserVersion": "123.0"
},
{
"name": "firefox-asan",
"revision": "1440",
"revision": "1442",
"installByDefault": false,
"browserVersion": "123.0"
},
{
"name": "firefox-beta",
"revision": "1440",
"revision": "1442",
"installByDefault": false,
"browserVersion": "124.0b3"
},

View File

@ -345,7 +345,7 @@ export class CRPage implements PageDelegate {
injected.setInputFiles(node, files), files);
}
async setInputFilePaths(progress: Progress, handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void> {
async setInputFilePaths(handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void> {
const frame = await handle.ownerFrame();
if (!frame)
throw new Error('Cannot set input files to detached input element');

View File

@ -643,7 +643,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
await this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {
progress.throwIfAborted(); // Avoid action that has side-effects.
if (localPaths)
await this._page._delegate.setInputFilePaths(progress, retargeted, localPaths);
await this._page._delegate.setInputFilePaths(retargeted, localPaths);
else
await this._page._delegate.setInputFiles(retargeted, filePayloads!);
});

View File

@ -543,14 +543,12 @@ export class FFPage implements PageDelegate {
injected.setInputFiles(node, files), files);
}
async setInputFilePaths(progress: Progress, handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void> {
async setInputFilePaths(handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void> {
await this._session.send('Page.setFileInputFiles', {
frameId: handle._context.frame._id,
objectId: handle._objectId,
files
});
await handle.dispatchEvent(progress.metadata, 'input');
await handle.dispatchEvent(progress.metadata, 'change');
}
async adoptElementHandle<T extends Node>(handle: dom.ElementHandle<T>, to: dom.FrameExecutionContext): Promise<dom.ElementHandle<T>> {

View File

@ -80,7 +80,7 @@ export interface PageDelegate {
getOwnerFrame(handle: dom.ElementHandle): Promise<string | null>; // Returns frameId.
getContentQuads(handle: dom.ElementHandle): Promise<types.Quad[] | null>;
setInputFiles(handle: dom.ElementHandle<HTMLInputElement>, files: types.FilePayload[]): Promise<void>;
setInputFilePaths(progress: Progress, handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void>;
setInputFilePaths(handle: dom.ElementHandle<HTMLInputElement>, files: string[]): Promise<void>;
getBoundingBox(handle: dom.ElementHandle): Promise<types.Rect | null>;
getFrameElement(frame: frames.Frame): Promise<dom.ElementHandle>;
scrollRectIntoViewIfNeeded(handle: dom.ElementHandle, rect?: types.Rect): Promise<'error:notvisible' | 'error:notconnected' | 'done'>;

View File

@ -966,7 +966,7 @@ export class WKPage implements PageDelegate {
await this._session.send('DOM.setInputFiles', { objectId, files: protocolFiles });
}
async setInputFilePaths(progress: Progress, handle: dom.ElementHandle<HTMLInputElement>, paths: string[]): Promise<void> {
async setInputFilePaths(handle: dom.ElementHandle<HTMLInputElement>, paths: string[]): Promise<void> {
const pageProxyId = this._pageProxySession.sessionId;
const objectId = handle._objectId;
await Promise.all([

View File

@ -62,6 +62,9 @@ it('should be able to click across browser contexts', async function({ browser }
]);
expect(await getClicks(page1)).toBe(CLICK_COUNT);
expect(await getClicks(page2)).toBe(CLICK_COUNT);
await page1.close();
await page2.close();
});
it('window.open should use parent tab context', async function({ browser, server }) {