Skip to content

Commit

Permalink
fix: remove CDP-specific preferences from defaults for Firefox (#11477)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Dec 5, 2023
1 parent 0305981 commit f8c9469
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
6 changes: 0 additions & 6 deletions packages/browsers/src/browser-data/firefox.ts
Expand Up @@ -220,12 +220,6 @@ function defaultProfilePreferences(
// Make sure opening about:addons will not hit the network
'extensions.webservice.discoverURL': `http://${server}/dummy/discoveryURL`,

// Temporarily force disable BFCache in parent (https://bit.ly/bug-1732263)
'fission.bfcacheInParent': false,

// Force all web content to use a single content process
'fission.webContentIsolationStrategy': 0,

// Allow the application to have focus even it runs in the background
'focusmanager.testmode': true,
// Disable useragent updates
Expand Down
16 changes: 15 additions & 1 deletion packages/puppeteer-core/src/node/FirefoxLauncher.ts
Expand Up @@ -113,7 +113,21 @@ export class FirefoxLauncher extends ProductLauncher {

await createProfile(SupportedBrowsers.FIREFOX, {
path: userDataDir,
preferences: extraPrefsFirefox,
preferences: {
...extraPrefsFirefox,
...(options.protocol === 'cdp'
? {
// Temporarily force disable BFCache in parent (https://bit.ly/bug-1732263)
'fission.bfcacheInParent': false,
}
: {}),
// Force all web content to use a single content process. TODO: remove
// this once Firefox supports mouse event dispatch from the main frame
// context. Once this happens, webContentIsolationStrategy should only
// be set for CDP. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=1773393
'fission.webContentIsolationStrategy': 0,
},
});

let firefoxExecutable: string;
Expand Down
12 changes: 12 additions & 0 deletions test/TestExpectations.json
Expand Up @@ -2765,12 +2765,24 @@
"parameters": ["cdp", "firefox"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[oopif.spec] OOPIF clickablePoint, boundingBox, boxModel should work for elements inside OOPIFs",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should keep track of a frames OOP state",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should provide access to elements",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support lazy OOP frames",
"platforms": ["darwin", "linux", "win32"],
Expand Down

0 comments on commit f8c9469

Please sign in to comment.