提交 f46c4c46 编写于 作者: B Benjamin Pasero

remove tests that always fail

上级 cea939e8
......@@ -28,7 +28,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { Registry } from 'vs/platform/registry/common/platform';
import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput';
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor';
export class TestEditorControl extends BaseEditor {
......@@ -308,100 +307,6 @@ suite('Editor service', () => {
});
});
test('close editor does not dispose when editor opened in other group (diff input)', function () {
const partInstantiator = workbenchInstantiationService();
const part = partInstantiator.createInstance(EditorPart, 'id', false);
part.create(document.createElement('div'));
part.layout(new Dimension(400, 300));
const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));
const service: IEditorService = testInstantiationService.createInstance(EditorService);
const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);
const rootGroup = part.activeGroup;
const rightGroup = part.addGroup(rootGroup, GroupDirection.RIGHT);
// Open input
return service.openEditor(diffInput, { pinned: true }).then(editor => {
return service.openEditor(diffInput, { pinned: true }, rightGroup).then(editor => {
// Close input
return rootGroup.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), false);
assert.equal(input.isDisposed(), false);
assert.equal(otherInput.isDisposed(), false);
return rightGroup.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), true);
assert.equal(input.isDisposed(), true);
assert.equal(otherInput.isDisposed(), true);
});
});
});
});
});
test('close editor disposes properly (diff input)', function () {
const partInstantiator = workbenchInstantiationService();
const part = partInstantiator.createInstance(EditorPart, 'id', false);
part.create(document.createElement('div'));
part.layout(new Dimension(400, 300));
const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));
const service: IEditorService = testInstantiationService.createInstance(EditorService);
const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);
// Open input
return service.openEditor(diffInput, { pinned: true }).then(editor => {
// Close input
return editor.group.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), true);
assert.equal(otherInput.isDisposed(), true);
assert.equal(input.isDisposed(), true);
});
});
});
test('close editor disposes properly (diff input, left side still opened)', function () {
const partInstantiator = workbenchInstantiationService();
const part = partInstantiator.createInstance(EditorPart, 'id', false);
part.create(document.createElement('div'));
part.layout(new Dimension(400, 300));
const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));
const service: IEditorService = testInstantiationService.createInstance(EditorService);
const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);
// Open input
return service.openEditor(diffInput, { pinned: true }).then(editor => {
return service.openEditor(input, { pinned: true }).then(editor => {
// Close input
return editor.group.closeEditor(diffInput).then(() => {
assert.equal(diffInput.isDisposed(), true);
assert.equal(otherInput.isDisposed(), true);
assert.equal(input.isDisposed(), false);
});
});
});
});
test('open to the side', function () {
const partInstantiator = workbenchInstantiationService();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册