Skip to content

Commit 6ad4e7a

Browse files
authored
cherry-pick(release-1.12): roll Firefox to r1271 (#7075)
Cherry-Pick #7067 SHA d6831df NOTE: this cherry-pick updates only firefox-stable build revision and keeps the firefox-beta as-is since it's been rolled already. Thus, the new test is explicitly skipped on firefox-beta. Fixes #7015
1 parent e13965e commit 6ad4e7a

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

browsers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
{
1010
"name": "firefox",
11-
"revision": "1269",
11+
"revision": "1271",
1212
"installByDefault": true
1313
},
1414
{

src/server/firefox/protocol.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ export module Protocol {
276276
reducedMotion: ("reduce"|"no-preference")|null;
277277
};
278278
export type setReducedMotionReturnValue = void;
279+
export type setForcedColorsParameters = {
280+
browserContextId?: string;
281+
forcedColors: ("active"|"none")|null;
282+
};
283+
export type setForcedColorsReturnValue = void;
279284
export type setVideoRecordingOptionsParameters = {
280285
browserContextId?: string;
281286
dir: string;
@@ -486,6 +491,7 @@ export module Protocol {
486491
type?: ("screen"|"print"|"");
487492
colorScheme?: ("dark"|"light"|"no-preference");
488493
reducedMotion?: ("reduce"|"no-preference");
494+
forcedColors?: ("active"|"none");
489495
};
490496
export type setEmulatedMediaReturnValue = void;
491497
export type setCacheDisabledParameters = {
@@ -1066,6 +1072,7 @@ export module Protocol {
10661072
"Browser.setOnlineOverride": Browser.setOnlineOverrideParameters;
10671073
"Browser.setColorScheme": Browser.setColorSchemeParameters;
10681074
"Browser.setReducedMotion": Browser.setReducedMotionParameters;
1075+
"Browser.setForcedColors": Browser.setForcedColorsParameters;
10691076
"Browser.setVideoRecordingOptions": Browser.setVideoRecordingOptionsParameters;
10701077
"Page.close": Page.closeParameters;
10711078
"Page.setFileInputFiles": Page.setFileInputFilesParameters;
@@ -1141,6 +1148,7 @@ export module Protocol {
11411148
"Browser.setOnlineOverride": Browser.setOnlineOverrideReturnValue;
11421149
"Browser.setColorScheme": Browser.setColorSchemeReturnValue;
11431150
"Browser.setReducedMotion": Browser.setReducedMotionReturnValue;
1151+
"Browser.setForcedColors": Browser.setForcedColorsReturnValue;
11441152
"Browser.setVideoRecordingOptions": Browser.setVideoRecordingOptionsReturnValue;
11451153
"Page.close": Page.closeReturnValue;
11461154
"Page.setFileInputFiles": Page.setFileInputFilesReturnValue;

tests/page/page-evaluate.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ it('should not use Array.prototype.toJSON when evaluating', async ({ page, brows
556556
expect(result).toEqual([1,2,3]);
557557
});
558558

559+
it('should not add a toJSON property to newly created Arrays after evaluation', async ({ page, browserName, channel }) => {
560+
it.fixme(browserName === 'firefox' && channel === 'firefox-beta')
561+
await page.evaluate(() => []);
562+
const hasToJSONProperty = await page.evaluate(() => "toJSON" in []);
563+
expect(hasToJSONProperty).toEqual(false);
564+
});
565+
559566
it('should not use toJSON in jsonValue', async ({ page }) => {
560567
const resultHandle = await page.evaluateHandle(() => ({ toJSON: () => 'string', data: 'data' }));
561568
expect(await resultHandle.jsonValue()).toEqual({ data: 'data', toJSON: {} });

0 commit comments

Comments
 (0)