@@ -11,7 +11,6 @@ import * as os from 'os';
1111import { URI } from 'vs/base/common/uri' ;
1212import { Registry } from 'vs/platform/registry/common/platform' ;
1313import { IEnvironmentService } from 'vs/platform/environment/common/environment' ;
14- import { parseArgs , OPTIONS } from 'vs/platform/environment/node/argv' ;
1514import * as pfs from 'vs/base/node/pfs' ;
1615import * as uuid from 'vs/base/common/uuid' ;
1716import { IConfigurationRegistry , Extensions as ConfigurationExtensions , ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry' ;
@@ -21,7 +20,7 @@ import { ConfigurationEditingErrorCode } from 'vs/workbench/services/configurati
2120import { IFileService } from 'vs/platform/files/common/files' ;
2221import { IWorkspaceContextService , WorkbenchState , IWorkspaceFoldersChangeEvent } from 'vs/platform/workspace/common/workspace' ;
2322import { ConfigurationTarget , IConfigurationService , IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration' ;
24- import { workbenchInstantiationService , TestTextFileService , RemoteFileSystemProvider } from 'vs/workbench/test/workbenchTestServices' ;
23+ import { workbenchInstantiationService , TestTextFileService , RemoteFileSystemProvider , TestWindowConfiguration } from 'vs/workbench/test/workbenchTestServices' ;
2524import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock' ;
2625import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles' ;
2726import { ITextModelService } from 'vs/editor/common/services/resolverService' ;
@@ -32,7 +31,6 @@ import { createHash } from 'crypto';
3231import { Schemas } from 'vs/base/common/network' ;
3332import { originalFSPath } from 'vs/base/common/resources' ;
3433import { isLinux } from 'vs/base/common/platform' ;
35- import { IWindowConfiguration } from 'vs/platform/windows/common/windows' ;
3634import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl' ;
3735import { RemoteAuthorityResolverService } from 'vs/platform/remote/electron-browser/remoteAuthorityResolverService' ;
3836import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService' ;
@@ -52,7 +50,7 @@ import { timeout } from 'vs/base/common/async';
5250class TestEnvironmentService extends NativeWorkbenchEnvironmentService {
5351
5452 constructor ( private _appSettingsHome : URI ) {
55- super ( parseArgs ( process . argv , OPTIONS ) as IWindowConfiguration , process . execPath , 0 ) ;
53+ super ( TestWindowConfiguration , TestWindowConfiguration . execPath , TestWindowConfiguration . windowId ) ;
5654 }
5755
5856 get appSettingsHome ( ) { return this . _appSettingsHome ; }
@@ -110,7 +108,7 @@ suite('WorkspaceContextService - Folder', () => {
110108 const diskFileSystemProvider = new DiskFileSystemProvider ( new NullLogService ( ) ) ;
111109 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
112110 fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , new DiskFileSystemProvider ( new NullLogService ( ) ) , environmentService ) ) ;
113- workspaceContextService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , new RemoteAgentService ( < IWindowConfiguration > { } , environmentService , new RemoteAuthorityResolverService ( ) , new SignService ( undefined ) , new NullLogService ( ) ) ) ;
111+ workspaceContextService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , new RemoteAgentService ( TestWindowConfiguration , environmentService , new RemoteAuthorityResolverService ( ) , new SignService ( undefined ) , new NullLogService ( ) ) ) ;
114112 return ( < WorkspaceService > workspaceContextService ) . initialize ( convertToWorkspacePayload ( URI . file ( folderDir ) ) ) ;
115113 } ) ;
116114 } ) ;
0 commit comments