File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,15 @@ describe('registering event', () => {
100100 target : version . webSocketDebuggerUrl
101101 } ) ;
102102 // create the targets
103- await chrome . Target . createTarget ( { url : 'about:blank' } ) ;
104- await chrome . Target . createTarget ( { url : 'about:blank' } ) ;
105- // fetch the targets (two pages) and attach to each of them
106- const { targetInfos} = await chrome . Target . getTargets ( ) ;
103+ const { targetId : targetId0 } = await chrome . Target . createTarget ( { url : 'about:blank' } ) ;
104+ const { targetId : targetId1 } = await chrome . Target . createTarget ( { url : 'about:blank' } ) ;
105+ // attach to each target
107106 const { sessionId : sessionId0 } = await chrome . Target . attachToTarget ( {
108- targetId : targetInfos [ 0 ] . targetId ,
107+ targetId : targetId0 ,
109108 flatten : true
110109 } ) ;
111110 const { sessionId : sessionId1 } = await chrome . Target . attachToTarget ( {
112- targetId : targetInfos [ 1 ] . targetId ,
111+ targetId : targetId1 ,
113112 flatten : true
114113 } ) ;
115114 // enable the Page events in both of them
Original file line number Diff line number Diff line change @@ -163,11 +163,10 @@ describe('sending a command', () => {
163163 target : version . webSocketDebuggerUrl
164164 } ) ;
165165 // create the target
166- await chrome . Target . createTarget ( { url : 'about:blank' } ) ;
166+ const { targetId } = await chrome . Target . createTarget ( { url : 'about:blank' } ) ;
167167 // attach to the target
168- const { targetInfos} = await chrome . Target . getTargets ( ) ;
169168 const { sessionId} = await chrome . Target . attachToTarget ( {
170- targetId : targetInfos [ 0 ] . targetId ,
169+ targetId,
171170 flatten : true
172171 } ) ;
173172 // send a command using the sessionId
You can’t perform that action at this time.
0 commit comments