mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(webdriver): support browser.userAgent (#12162)
This commit is contained in:
parent
45f4df0a31
commit
6b7e3c6239
@ -19,7 +19,6 @@ import {
|
|||||||
import {BrowserContextEvent} from '../api/BrowserContext.js';
|
import {BrowserContextEvent} from '../api/BrowserContext.js';
|
||||||
import type {Page} from '../api/Page.js';
|
import type {Page} from '../api/Page.js';
|
||||||
import type {Target} from '../api/Target.js';
|
import type {Target} from '../api/Target.js';
|
||||||
import {UnsupportedOperation} from '../common/Errors.js';
|
|
||||||
import {EventEmitter} from '../common/EventEmitter.js';
|
import {EventEmitter} from '../common/EventEmitter.js';
|
||||||
import {debugError} from '../common/util.js';
|
import {debugError} from '../common/util.js';
|
||||||
import type {Viewport} from '../common/Viewport.js';
|
import type {Viewport} from '../common/Viewport.js';
|
||||||
@ -133,8 +132,8 @@ export class BidiBrowser extends Browser {
|
|||||||
return !this.#browserName.toLocaleLowerCase().includes('firefox');
|
return !this.#browserName.toLocaleLowerCase().includes('firefox');
|
||||||
}
|
}
|
||||||
|
|
||||||
override userAgent(): never {
|
override async userAgent(): Promise<string> {
|
||||||
throw new UnsupportedOperation();
|
return this.#browserCore.session.capabilities.userAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#createBrowserContext(userContext: UserContext) {
|
#createBrowserContext(userContext: UserContext) {
|
||||||
|
@ -1012,20 +1012,6 @@
|
|||||||
"expectations": ["SKIP"],
|
"expectations": ["SKIP"],
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"testIdPattern": "[browser.spec] Browser specs Browser.userAgent should include Browser engine",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["chrome", "webDriverBiDi"],
|
|
||||||
"expectations": ["FAIL"],
|
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"testIdPattern": "[browser.spec] Browser specs Browser.userAgent should include Browser engine",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["firefox", "webDriverBiDi"],
|
|
||||||
"expectations": ["FAIL"],
|
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"testIdPattern": "[browsercontext.spec] BrowserContext BrowserContext.overridePermissions should deny permission when not listed",
|
"testIdPattern": "[browsercontext.spec] BrowserContext BrowserContext.overridePermissions should deny permission when not listed",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -2341,13 +2327,6 @@
|
|||||||
"expectations": ["FAIL"],
|
"expectations": ["FAIL"],
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should be able to launch Chrome",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["chrome", "webDriverBiDi"],
|
|
||||||
"expectations": ["FAIL"],
|
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should be able to launch Firefox",
|
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should be able to launch Firefox",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -3332,14 +3311,14 @@
|
|||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
"parameters": ["chrome", "headful"],
|
"parameters": ["chrome", "headful"],
|
||||||
"expectations": ["FAIL"],
|
"expectations": ["FAIL"],
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
"comment": "only works in the old headless code"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[pdf.spec] Page.pdf can print to PDF with outline",
|
"testIdPattern": "[pdf.spec] Page.pdf can print to PDF with outline",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
"parameters": ["chrome", "headless"],
|
"parameters": ["chrome", "headless"],
|
||||||
"expectations": ["FAIL"],
|
"expectations": ["FAIL"],
|
||||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
"comment": "only works in the old headless code"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[proxy.spec] request proxy in incognito browser context should proxy requests when configured at context level",
|
"testIdPattern": "[proxy.spec] request proxy in incognito browser context should proxy requests when configured at context level",
|
||||||
|
Loading…
Reference in New Issue
Block a user