@@ -41,9 +41,10 @@ import { notificationServiceMock } from '../notifications/notifications_service.
4141import  {  uiSettingsServiceMock  }  from  '../ui_settings/ui_settings_service.mock' ; 
4242import  {  ChromeService  }  from  './chrome_service' ; 
4343import  {  getAppInfo  }  from  '../application/utils' ; 
44- import  {  overlayServiceMock ,  workspacesServiceMock  }  from  '../mocks' ; 
44+ import  {  coreMock ,   overlayServiceMock ,  workspacesServiceMock  }  from  '../mocks' ; 
4545import  {  HeaderVariant  }  from  './constants' ; 
4646import  {  keyboardShortcutServiceMock  }  from  '../keyboard_shortcut/keyboard_shortcut_service.mock' ; 
47+ import  {  HttpSetup  }  from  '../http' ; 
4748
4849class  FakeApp  implements  App  { 
4950  public  title : string ; 
@@ -106,7 +107,7 @@ async function start({
106107} : {  options ?: any ;  cspConfigMock ?: any ;  startDeps ?: ReturnType < typeof  defaultStartDeps >  }  =  { } )  { 
107108  const  service  =  new  ChromeService ( options ) ; 
108109
109-   service . setup ( {  uiSettings : startDeps . uiSettings  } ) ; 
110+   service . setup ( {  uiSettings : startDeps . uiSettings ,   http :  startDeps . http  } ) ; 
110111
111112  if  ( cspConfigMock )  { 
112113    startDeps . injectedMetadata . getCspConfig . mockReturnValue ( cspConfigMock ) ; 
@@ -129,6 +130,12 @@ afterAll(() => {
129130} ) ; 
130131
131132describe ( 'setup' ,  ( )  =>  { 
133+   let  http : HttpSetup ; 
134+ 
135+   beforeEach ( ( )  =>  { 
136+     const  coreSetup  =  coreMock . createSetup ( ) ; 
137+     http  =  coreSetup . http ; 
138+   } ) ; 
132139  afterEach ( ( )  =>  { 
133140    jest . restoreAllMocks ( ) ; 
134141  } ) ; 
@@ -139,7 +146,7 @@ describe('setup', () => {
139146    const  chrome  =  new  ChromeService ( {  browserSupportsCsp : true  } ) ; 
140147    const  uiSettings  =  uiSettingsServiceMock . createSetupContract ( ) ; 
141148
142-     const  chromeSetup  =  chrome . setup ( {  uiSettings } ) ; 
149+     const  chromeSetup  =  chrome . setup ( {  uiSettings,  http  } ) ; 
143150    chromeSetup . registerCollapsibleNavHeader ( renderMock ) ; 
144151
145152    const  chromeStart  =  await  chrome . start ( defaultStartDeps ( ) ) ; 
@@ -155,8 +162,7 @@ describe('setup', () => {
155162    const  renderMock  =  jest . fn ( ) . mockReturnValue ( customHeaderMock ) ; 
156163    const  chrome  =  new  ChromeService ( {  browserSupportsCsp : true  } ) ; 
157164    const  uiSettings  =  uiSettingsServiceMock . createSetupContract ( ) ; 
158- 
159-     const  chromeSetup  =  chrome . setup ( {  uiSettings } ) ; 
165+     const  chromeSetup  =  chrome . setup ( {  uiSettings,  http } ) ; 
160166    // call 1st time 
161167    chromeSetup . registerCollapsibleNavHeader ( renderMock ) ; 
162168    // call 2nd time 
@@ -176,7 +182,7 @@ describe('setup', () => {
176182      registerSearchCommand : registerSearchCommandSpy , 
177183    } ) ; 
178184
179-     chrome . setup ( {  uiSettings } ) ; 
185+     chrome . setup ( {  uiSettings,  http  } ) ; 
180186
181187    expect ( registerSearchCommandSpy ) . toHaveBeenCalledWith ( { 
182188      id : 'pagesSearch' , 
0 commit comments