chore(bidi): simplify launcher tests for Firefox (#34405)
This commit is contained in:
parent
a06600aee9
commit
34cb35859a
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -35,4 +35,3 @@ test-results
|
||||||
.cache/
|
.cache/
|
||||||
.eslintcache
|
.eslintcache
|
||||||
playwright.env
|
playwright.env
|
||||||
firefox
|
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,12 @@ it('should pass firefox user preferences', async ({ browserType, mode }) => {
|
||||||
const browser = await browserType.launch({
|
const browser = await browserType.launch({
|
||||||
firefoxUserPrefs: {
|
firefoxUserPrefs: {
|
||||||
'network.proxy.type': 1,
|
'network.proxy.type': 1,
|
||||||
'network.proxy.http': '127.0.0.1',
|
'network.proxy.ssl': '127.0.0.1',
|
||||||
'network.proxy.http_port': 3333,
|
'network.proxy.ssl_port': 3333,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
const error = await page.goto('http://example.com').catch(e => e);
|
const error = await page.goto('https://example.com').catch(e => e);
|
||||||
expect(error.message).toContain('NS_ERROR_PROXY_CONNECTION_REFUSED');
|
expect(error.message).toContain('NS_ERROR_PROXY_CONNECTION_REFUSED');
|
||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
|
@ -36,10 +36,10 @@ it('should pass firefox user preferences in persistent', async ({ mode, launchPe
|
||||||
const { page } = await launchPersistent({
|
const { page } = await launchPersistent({
|
||||||
firefoxUserPrefs: {
|
firefoxUserPrefs: {
|
||||||
'network.proxy.type': 1,
|
'network.proxy.type': 1,
|
||||||
'network.proxy.http': '127.0.0.1',
|
'network.proxy.ssl': '127.0.0.1',
|
||||||
'network.proxy.http_port': 3333,
|
'network.proxy.ssl_port': 3333,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const error = await page.goto('http://example.com').catch(e => e);
|
const error = await page.goto('https://example.com').catch(e => e);
|
||||||
expect(error.message).toContain('NS_ERROR_PROXY_CONNECTION_REFUSED');
|
expect(error.message).toContain('NS_ERROR_PROXY_CONNECTION_REFUSED');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue