提交 027483f1 编写于 作者: B Benjamin Pasero

fix tests

上级 537b0771
...@@ -340,7 +340,7 @@ export class FileTracker implements IWorkbenchContribution { ...@@ -340,7 +340,7 @@ export class FileTracker implements IWorkbenchContribution {
return null; return null;
} }
private handleDeleteOrMove(resource: URI, movedTo?: URI): void { public handleDeleteOrMove(resource: URI, movedTo?: URI): void {
if (this.textFileService.isDirty(resource)) { if (this.textFileService.isDirty(resource)) {
return; // never dispose dirty resources from a delete return; // never dispose dirty resources from a delete
} }
......
...@@ -164,11 +164,11 @@ suite('Files - FileEditorInput', () => { ...@@ -164,11 +164,11 @@ suite('Files - FileEditorInput', () => {
let sameOtherInput = instantiationService.createInstance(FileEditorInput, toResource('/fooss5/bar/file2.js'), 'text/javascript', void 0); let sameOtherInput = instantiationService.createInstance(FileEditorInput, toResource('/fooss5/bar/file2.js'), 'text/javascript', void 0);
return editorService.resolveEditorModel(inputToResolve).then(function (resolved) { return editorService.resolveEditorModel(inputToResolve).then(function (resolved) {
return editorService.resolveEditorModel(sameOtherInput).then(function (resolved) { return editorService.resolveEditorModel(sameOtherInput).then(function (resolved) {
(<any>tracker).handleDelete(toResource('/bar'), []); tracker.handleDeleteOrMove(toResource('/bar'), []);
assert(!inputToResolve.isDisposed()); assert(!inputToResolve.isDisposed());
assert(!sameOtherInput.isDisposed()); assert(!sameOtherInput.isDisposed());
(<any>tracker).handleDelete(toResource('/fooss5/bar/file2.js'), []); tracker.handleDeleteOrMove(toResource('/fooss5/bar/file2.js'), []);
assert(inputToResolve.isDisposed()); assert(inputToResolve.isDisposed());
assert(sameOtherInput.isDisposed()); assert(sameOtherInput.isDisposed());
...@@ -206,11 +206,11 @@ suite('Files - FileEditorInput', () => { ...@@ -206,11 +206,11 @@ suite('Files - FileEditorInput', () => {
let sameOtherInput = instantiationService.createInstance(FileEditorInput, toResource('/foo6/bar/file.js'), 'text/javascript', void 0); let sameOtherInput = instantiationService.createInstance(FileEditorInput, toResource('/foo6/bar/file.js'), 'text/javascript', void 0);
return editorService.resolveEditorModel(inputToResolve, true).then(function (resolved) { return editorService.resolveEditorModel(inputToResolve, true).then(function (resolved) {
return editorService.resolveEditorModel(sameOtherInput, true).then(function (resolved) { return editorService.resolveEditorModel(sameOtherInput, true).then(function (resolved) {
(<any>tracker).handleDelete(toResource('/bar'), []); tracker.handleDeleteOrMove(toResource('/bar'), []);
assert(!inputToResolve.isDisposed()); assert(!inputToResolve.isDisposed());
assert(!sameOtherInput.isDisposed()); assert(!sameOtherInput.isDisposed());
(<any>tracker).handleDelete(toResource('/foo6'), []); tracker.handleDeleteOrMove(toResource('/foo6'), []);
assert(inputToResolve.isDisposed()); assert(inputToResolve.isDisposed());
assert(sameOtherInput.isDisposed()); assert(sameOtherInput.isDisposed());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册