Skip to content

Commit

Permalink
minimize diff, fix ff
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig committed Aug 31, 2022
1 parent 115a07c commit 4ad2279
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions packages/server/lib/browsers/firefox-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,24 +134,12 @@ async function connectToNewSpec (options, automation: Automation, browserCriClie
await navigateToUrl(options.url)
}

async function setupRemote (remotePort, automation: Automation, onError, options): Promise<BrowserCriClient> {
async function setupRemote (remotePort, automation, onError, options): Promise<BrowserCriClient> {
const browserCriClient = await BrowserCriClient.create(remotePort, 'Firefox', onError)
const pageCriClient = await browserCriClient.attachToTargetUrl('about:blank')

await CdpAutomation.create(pageCriClient.send, pageCriClient.on, browserCriClient.resetBrowserTargets, automation, options.experimentalSessionAndOrigin)

const onRequest = automation.get('onRequest')

automation.use({
onRequest (eventName, data) {
if (eventName === 'remote:debugger:protocol') {
return pageCriClient.send(data.command, data.params)
}

return onRequest?.(eventName, data)
},
})

return browserCriClient
}

Expand Down

0 comments on commit 4ad2279

Please sign in to comment.