mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: unskip touch tests (#10955)
This commit is contained in:
parent
3f79beb71a
commit
af42663edb
@ -8,7 +8,7 @@ sidebar_label: Page.setUserAgent
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
class Page {
|
class Page {
|
||||||
setUserAgent(
|
abstract setUserAgent(
|
||||||
userAgent: string,
|
userAgent: string,
|
||||||
userAgentMetadata?: Protocol.Emulation.UserAgentMetadata
|
userAgentMetadata?: Protocol.Emulation.UserAgentMetadata
|
||||||
): Promise<void>;
|
): Promise<void>;
|
||||||
|
@ -1443,13 +1443,10 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
* page
|
* page
|
||||||
* @returns Promise which resolves when the user agent is set.
|
* @returns Promise which resolves when the user agent is set.
|
||||||
*/
|
*/
|
||||||
async setUserAgent(
|
abstract setUserAgent(
|
||||||
userAgent: string,
|
userAgent: string,
|
||||||
userAgentMetadata?: Protocol.Emulation.UserAgentMetadata
|
userAgentMetadata?: Protocol.Emulation.UserAgentMetadata
|
||||||
): Promise<void>;
|
): Promise<void>;
|
||||||
async setUserAgent(): Promise<void> {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object containing metrics as key/value pairs.
|
* Object containing metrics as key/value pairs.
|
||||||
|
@ -155,6 +155,17 @@ export class BidiPage extends Page {
|
|||||||
return this.mainFrame().context().cdpSession;
|
return this.mainFrame().context().cdpSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override async setUserAgent(
|
||||||
|
userAgent: string,
|
||||||
|
userAgentMetadata?: Protocol.Emulation.UserAgentMetadata | undefined
|
||||||
|
): Promise<void> {
|
||||||
|
// TODO: handle CDP-specific cases such as mprach.
|
||||||
|
await this._client().send('Network.setUserAgentOverride', {
|
||||||
|
userAgent: userAgent,
|
||||||
|
userAgentMetadata: userAgentMetadata,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
browsingContext: BrowsingContext,
|
browsingContext: BrowsingContext,
|
||||||
browserContext: BidiBrowserContext
|
browserContext: BidiBrowserContext
|
||||||
|
@ -1829,18 +1829,6 @@
|
|||||||
"parameters": ["cdp", "firefox"],
|
"parameters": ["cdp", "firefox"],
|
||||||
"expectations": ["SKIP"]
|
"expectations": ["SKIP"]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"testIdPattern": "[emulation.spec] Emulation Page.emulate should support clicking",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["chrome", "webDriverBiDi"],
|
|
||||||
"expectations": ["FAIL"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"testIdPattern": "[emulation.spec] Emulation Page.emulate should work",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["chrome", "webDriverBiDi"],
|
|
||||||
"expectations": ["FAIL"]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"testIdPattern": "[emulation.spec] Emulation Page.emulateCPUThrottling should change the CPU throttling rate successfully",
|
"testIdPattern": "[emulation.spec] Emulation Page.emulateCPUThrottling should change the CPU throttling rate successfully",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -3881,12 +3869,24 @@
|
|||||||
"parameters": ["cdp", "firefox"],
|
"parameters": ["cdp", "firefox"],
|
||||||
"expectations": ["SKIP"]
|
"expectations": ["SKIP"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[touchscreen.spec] Touchscreen should report touchMove",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "webDriverBiDi"],
|
||||||
|
"expectations": ["PASS"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[touchscreen.spec] Touchscreen should tap the button",
|
"testIdPattern": "[touchscreen.spec] Touchscreen should tap the button",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
"parameters": ["cdp", "firefox"],
|
"parameters": ["cdp", "firefox"],
|
||||||
"expectations": ["FAIL"]
|
"expectations": ["FAIL"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[touchscreen.spec] Touchscreen should tap the button",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "webDriverBiDi"],
|
||||||
|
"expectations": ["PASS"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[tracing.spec] Tracing should throw if tracing on two pages",
|
"testIdPattern": "[tracing.spec] Tracing should throw if tracing on two pages",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
@ -48,6 +48,7 @@ describe('TargetManager', () => {
|
|||||||
await state.close();
|
await state.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// CDP-specific test.
|
||||||
it('should handle targets', async () => {
|
it('should handle targets', async () => {
|
||||||
const {server, context, browser} = state;
|
const {server, context, browser} = state;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user