Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd3021b6

Browse files
lubieowoceztanner
authored andcommitted
update playwright interface
partial cherry-pick from#64604, needed for#67734
1 parent5e6f511 commitd3021b6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎test/lib/browsers/base.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exporttypeEvent='request'
1+
exporttypeEvent='request'|'response'
22

33
/**
44
* This is the base Browser interface all browser

‎test/lib/browsers/playwright.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export class Playwright extends BrowserInterface {
4949
privateactiveTrace?:string
5050
privateeventCallbacks:Record<Event,Set<(...args:any[])=>void>>={
5151
request:newSet(),
52+
response:newSet(),
5253
}
5354
privateasyncinitContextTracing(url:string,context:BrowserContext){
5455
if(!tracePlaywright){
@@ -233,6 +234,9 @@ export class Playwright extends BrowserInterface {
233234
page.on('request',(req)=>{
234235
this.eventCallbacks.request.forEach((cb)=>cb(req))
235236
})
237+
page.on('response',(res)=>{
238+
this.eventCallbacks.response.forEach((cb)=>cb(res))
239+
})
236240

237241
if(opts?.disableCache){
238242
// TODO: this doesn't seem to work (dev tools does not check the box as expected)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp