提交 1fbd298c 编写于 作者: B Benjamin Pasero

fix tests

上级 99304344
...@@ -19,7 +19,7 @@ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/un ...@@ -19,7 +19,7 @@ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/un
import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel'; import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel';
import { HotExitConfiguration } from 'vs/platform/files/common/files'; import { HotExitConfiguration } from 'vs/platform/files/common/files';
import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager'; import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace';
class ServiceAccessor { class ServiceAccessor {
constructor( constructor(
...@@ -380,7 +380,7 @@ suite('Files - TextFileService', () => { ...@@ -380,7 +380,7 @@ suite('Files - TextFileService', () => {
service.onConfigurationChange({ files: { hotExit: setting } }); service.onConfigurationChange({ files: { hotExit: setting } });
// Set empty workspace if required // Set empty workspace if required
if (!workspace) { if (!workspace) {
accessor.contextService.setWorkspace(null); accessor.contextService.setWorkspace(new Workspace('empty:1508317022751'));
} }
// Set multiple windows if required // Set multiple windows if required
if (multipleWindows) { if (multipleWindows) {
......
...@@ -102,12 +102,14 @@ export class TestContextService implements IWorkspaceContextService { ...@@ -102,12 +102,14 @@ export class TestContextService implements IWorkspaceContextService {
} }
public getWorkbenchState(): WorkbenchState { public getWorkbenchState(): WorkbenchState {
if (this.workspace) { if (this.workspace.configuration) {
if (this.workspace.configuration) { return WorkbenchState.WORKSPACE;
return WorkbenchState.WORKSPACE; }
}
if (this.workspace.folders.length) {
return WorkbenchState.FOLDER; return WorkbenchState.FOLDER;
} }
return WorkbenchState.EMPTY; return WorkbenchState.EMPTY;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册