mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(webdriver): emit RequestServedFromCache for requests (#12104)
This commit is contained in:
parent
73f3f4e173
commit
6ba6bef1b9
@ -68,7 +68,7 @@ export class BidiHTTPRequest extends HTTPRequest {
|
||||
}
|
||||
|
||||
override resourceType(): ResourceType {
|
||||
return this.initiator().type.toLowerCase() as ResourceType;
|
||||
throw new UnsupportedOperation();
|
||||
}
|
||||
|
||||
override method(): string {
|
||||
|
@ -40,6 +40,12 @@ export class BidiHTTPResponse extends HTTPResponse {
|
||||
}
|
||||
|
||||
#initialize() {
|
||||
if (this.#data.fromCache) {
|
||||
this.#request
|
||||
.frame()
|
||||
?.page()
|
||||
.trustedEmitter.emit(PageEvent.RequestServedFromCache, this.#request);
|
||||
}
|
||||
this.#request.frame()?.page().trustedEmitter.emit(PageEvent.Response, this);
|
||||
}
|
||||
|
||||
|
@ -2645,6 +2645,12 @@
|
||||
"expectations": ["FAIL"],
|
||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[network.spec] network Network Events Page.Events.RequestServedFromCache",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[network.spec] network Network Events Page.Events.Response",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
|
Loading…
Reference in New Issue
Block a user