@@ -260,38 +260,43 @@ describeWithMockConnection('ChildTargetManager', () => {
260260 } ) ;
261261
262262 describe ( 'Storage initialization' , ( ) => {
263- it ( 'should initialize storage for a top-level worker with STORAGE capability' , async ( ) => {
264- const parentTarget = createTarget ( { type : SDK . Target . Type . BROWSER } ) ;
265-
266- const getStorageKeyStub = sinon . stub ( ) . resolves ( {
267- storageKey : 'https://example.com/' as Protocol . Storage . SerializedStorageKey ,
268- getError : ( ) => undefined ,
269- } ) ;
270-
271- sinon . stub ( SDK . Target . Target . prototype , 'storageAgent' ) . returns ( {
272- invoke_getStorageKey : getStorageKeyStub ,
273- } as sinon . SinonStubbedInstance < ProtocolProxyApi . StorageApi > ) ;
274-
275- const setMainStorageKeySpy = sinon . spy ( SDK . StorageKeyManager . StorageKeyManager . prototype , 'setMainStorageKey' ) ;
276- const updateStorageKeysSpy = sinon . spy ( SDK . StorageKeyManager . StorageKeyManager . prototype , 'updateStorageKeys' ) ;
277- const setMainSecurityOriginSpy =
278- sinon . spy ( SDK . SecurityOriginManager . SecurityOriginManager . prototype , 'setMainSecurityOrigin' ) ;
279- const updateSecurityOriginsSpy =
280- sinon . spy ( SDK . SecurityOriginManager . SecurityOriginManager . prototype , 'updateSecurityOrigins' ) ;
281-
282- const childTargetManager = new SDK . ChildTargetManager . ChildTargetManager ( parentTarget ) ;
283- await childTargetManager . attachedToTarget ( {
284- sessionId : createSessionId ( ) ,
285- targetInfo : createTargetInfo ( undefined , 'service_worker' ) ,
286- waitingForDebugger : false ,
287- } ) ;
288-
289- assert . isTrue ( getStorageKeyStub . calledOnceWith ( { } ) ) ;
290- assert . isTrue ( setMainStorageKeySpy . calledOnceWith ( 'https://example.com/' ) ) ;
291- assert . isTrue ( updateStorageKeysSpy . calledOnceWith ( new Set ( [ 'https://example.com/' ] ) ) ) ;
292- assert . isTrue ( setMainSecurityOriginSpy . calledOnceWith ( 'https://example.com' , '' ) ) ;
293- assert . isTrue ( updateSecurityOriginsSpy . calledOnceWith ( new Set ( [ 'https://example.com' ] ) ) ) ;
294- } ) ;
263+ // Temporarily disabled until the root cause for the crashers in https://crbug.com/466134219 is
264+ // found and resolved.
265+ it . skip (
266+ '[crbug.com/406991275] should initialize storage for a top-level worker with STORAGE capability' , async ( ) => {
267+ const parentTarget = createTarget ( { type : SDK . Target . Type . BROWSER } ) ;
268+
269+ const getStorageKeyStub = sinon . stub ( ) . resolves ( {
270+ storageKey : 'https://example.com/' as Protocol . Storage . SerializedStorageKey ,
271+ getError : ( ) => undefined ,
272+ } ) ;
273+
274+ sinon . stub ( SDK . Target . Target . prototype , 'storageAgent' ) . returns ( {
275+ invoke_getStorageKey : getStorageKeyStub ,
276+ } as sinon . SinonStubbedInstance < ProtocolProxyApi . StorageApi > ) ;
277+
278+ const setMainStorageKeySpy =
279+ sinon . spy ( SDK . StorageKeyManager . StorageKeyManager . prototype , 'setMainStorageKey' ) ;
280+ const updateStorageKeysSpy =
281+ sinon . spy ( SDK . StorageKeyManager . StorageKeyManager . prototype , 'updateStorageKeys' ) ;
282+ const setMainSecurityOriginSpy =
283+ sinon . spy ( SDK . SecurityOriginManager . SecurityOriginManager . prototype , 'setMainSecurityOrigin' ) ;
284+ const updateSecurityOriginsSpy =
285+ sinon . spy ( SDK . SecurityOriginManager . SecurityOriginManager . prototype , 'updateSecurityOrigins' ) ;
286+
287+ const childTargetManager = new SDK . ChildTargetManager . ChildTargetManager ( parentTarget ) ;
288+ await childTargetManager . attachedToTarget ( {
289+ sessionId : createSessionId ( ) ,
290+ targetInfo : createTargetInfo ( undefined , 'service_worker' ) ,
291+ waitingForDebugger : false ,
292+ } ) ;
293+
294+ assert . isTrue ( getStorageKeyStub . calledOnceWith ( { } ) ) ;
295+ assert . isTrue ( setMainStorageKeySpy . calledOnceWith ( 'https://example.com/' ) ) ;
296+ assert . isTrue ( updateStorageKeysSpy . calledOnceWith ( new Set ( [ 'https://example.com/' ] ) ) ) ;
297+ assert . isTrue ( setMainSecurityOriginSpy . calledOnceWith ( 'https://example.com' , '' ) ) ;
298+ assert . isTrue ( updateSecurityOriginsSpy . calledOnceWith ( new Set ( [ 'https://example.com' ] ) ) ) ;
299+ } ) ;
295300
296301 it ( 'should NOT initialize storage for a frame target' , async ( ) => {
297302 const parentTarget = createTarget ( ) ;
0 commit comments