chore: BiDi setCacheEnabled (#10961)
This commit is contained in:
parent
a4f13b53af
commit
7b5eabcc37
@ -10,7 +10,7 @@ Toggles ignoring cache for each request based on the enabled state. By default,
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
class Page {
|
class Page {
|
||||||
setCacheEnabled(enabled?: boolean): Promise<void>;
|
abstract setCacheEnabled(enabled?: boolean): Promise<void>;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -2274,10 +2274,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
* @param enabled - sets the `enabled` state of cache
|
* @param enabled - sets the `enabled` state of cache
|
||||||
* @defaultValue `true`
|
* @defaultValue `true`
|
||||||
*/
|
*/
|
||||||
async setCacheEnabled(enabled?: boolean): Promise<void>;
|
abstract setCacheEnabled(enabled?: boolean): Promise<void>;
|
||||||
async setCacheEnabled(): Promise<void> {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
@ -744,6 +744,13 @@ export class BidiPage extends Page {
|
|||||||
override isDragInterceptionEnabled(): boolean {
|
override isDragInterceptionEnabled(): boolean {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override async setCacheEnabled(enabled?: boolean): Promise<void> {
|
||||||
|
// TODO: handle CDP-specific cases such as mprach.
|
||||||
|
await this._client().send('Network.setCacheDisabled', {
|
||||||
|
cacheDisabled: !enabled,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isConsoleLogEntry(
|
function isConsoleLogEntry(
|
||||||
|
@ -4174,5 +4174,11 @@
|
|||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
"parameters": ["cdp", "chrome", "new-headless", "tabTarget"],
|
"parameters": ["cdp", "chrome", "new-headless", "tabTarget"],
|
||||||
"expectations": ["FAIL"]
|
"expectations": ["FAIL"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[page.spec] Page Page.setCacheEnabled should enable or disable the cache based on the state passed",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "webDriverBiDi"],
|
||||||
|
"expectations": ["PASS"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user