Skip to content

Commit 1e6ee2c

Browse files
authored
1 parent 54ce10d commit 1e6ee2c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/vs/workbench/services/extensions/test/browser/extensionService.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ import { ExtensionManifestPropertiesService, IExtensionManifestPropertiesService
2929
import { ExtensionHostKind, ExtensionRunningLocation, IExtensionHost, IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
3030
import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
3131
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
32-
import { TestEnvironmentService, TestFileService, TestLifecycleService, TestRemoteAgentService, TestWebExtensionsScannerService, TestWorkbenchExtensionEnablementService, TestWorkbenchExtensionManagementService } from 'vs/workbench/test/browser/workbenchTestServices';
32+
import { TestEnvironmentService, TestFileService, TestLifecycleService, TestRemoteAgentService, TestUserDataProfileService, TestWebExtensionsScannerService, TestWorkbenchExtensionEnablementService, TestWorkbenchExtensionManagementService } from 'vs/workbench/test/browser/workbenchTestServices';
3333
import { TestContextService } from 'vs/workbench/test/common/workbenchTestServices';
3434
import { mock } from 'vs/base/test/common/mock';
3535
import { IExtensionHostManager } from 'vs/workbench/services/extensions/common/extensionHostManager';
3636
import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
37-
import { UserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfileService';
3837
import { IUserDataProfilesService, UserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
3938
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
4039
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
@@ -182,7 +181,7 @@ suite('ExtensionService', () => {
182181
[IEnvironmentService, TestEnvironmentService],
183182
[IWorkspaceTrustEnablementService, WorkspaceTrustEnablementService],
184183
[IUserDataProfilesService, UserDataProfilesService],
185-
[IUserDataProfileService, UserDataProfileService],
184+
[IUserDataProfileService, TestUserDataProfileService],
186185
[IUriIdentityService, UriIdentityService],
187186
]);
188187
extService = <MyTestExtensionService>instantiationService.get(IExtensionService);

src/vs/workbench/test/browser/workbenchTestServices.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ import { ExtensionIdentifier, ExtensionType, IExtension, IExtensionDescription,
160160
import { ISocketFactory } from 'vs/platform/remote/common/remoteAgentConnection';
161161
import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment';
162162
import { ILayoutOffsetInfo } from 'vs/platform/layout/browser/layoutService';
163-
import { IUserDataProfilesService, UserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
163+
import { IUserDataProfilesService, toUserDataProfile, UserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
164164
import { UserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfileService';
165165
import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
166166
import { EnablementState, IExtensionManagementServer, IScannedExtension, IWebExtensionsScannerService, IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
@@ -2006,6 +2006,14 @@ export class TestWorkbenchExtensionManagementService implements IWorkbenchExtens
20062006
async getTargetPlatform(): Promise<TargetPlatform> { return TargetPlatform.UNDEFINED; }
20072007
}
20082008

2009+
export class TestUserDataProfileService implements IUserDataProfileService {
2010+
2011+
readonly _serviceBrand: undefined;
2012+
readonly onDidChangeCurrentProfile = Event.None;
2013+
readonly currentProfile = toUserDataProfile('test', URI.file('tests').with({ scheme: 'vscode-tests' }));
2014+
async updateCurrentProfile(): Promise<void> { }
2015+
}
2016+
20092017
export class TestWebExtensionsScannerService implements IWebExtensionsScannerService {
20102018
_serviceBrand: undefined;
20112019
onDidChangeProfileExtensions = Event.None;

0 commit comments

Comments
 (0)