Skip to content

Commit f46c4c4

Browse files
committed
remove tests that always fail
1 parent cea939e commit f46c4c4

File tree

1 file changed

+0
-95
lines changed

1 file changed

+0
-95
lines changed

src/vs/workbench/services/editor/test/browser/editorService.test.ts

-95
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
2828
import { Registry } from 'vs/platform/registry/common/platform';
2929
import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput';
3030
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
31-
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
3231
import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor';
3332

3433
export class TestEditorControl extends BaseEditor {
@@ -308,100 +307,6 @@ suite('Editor service', () => {
308307
});
309308
});
310309

311-
test('close editor does not dispose when editor opened in other group (diff input)', function () {
312-
const partInstantiator = workbenchInstantiationService();
313-
314-
const part = partInstantiator.createInstance(EditorPart, 'id', false);
315-
part.create(document.createElement('div'));
316-
part.layout(new Dimension(400, 300));
317-
318-
const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));
319-
320-
const service: IEditorService = testInstantiationService.createInstance(EditorService);
321-
322-
const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
323-
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
324-
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);
325-
326-
const rootGroup = part.activeGroup;
327-
const rightGroup = part.addGroup(rootGroup, GroupDirection.RIGHT);
328-
329-
// Open input
330-
return service.openEditor(diffInput, { pinned: true }).then(editor => {
331-
return service.openEditor(diffInput, { pinned: true }, rightGroup).then(editor => {
332-
333-
// Close input
334-
return rootGroup.closeEditor(diffInput).then(() => {
335-
assert.equal(diffInput.isDisposed(), false);
336-
assert.equal(input.isDisposed(), false);
337-
assert.equal(otherInput.isDisposed(), false);
338-
339-
return rightGroup.closeEditor(diffInput).then(() => {
340-
assert.equal(diffInput.isDisposed(), true);
341-
assert.equal(input.isDisposed(), true);
342-
assert.equal(otherInput.isDisposed(), true);
343-
});
344-
});
345-
});
346-
});
347-
});
348-
349-
test('close editor disposes properly (diff input)', function () {
350-
const partInstantiator = workbenchInstantiationService();
351-
352-
const part = partInstantiator.createInstance(EditorPart, 'id', false);
353-
part.create(document.createElement('div'));
354-
part.layout(new Dimension(400, 300));
355-
356-
const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));
357-
358-
const service: IEditorService = testInstantiationService.createInstance(EditorService);
359-
360-
const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
361-
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
362-
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);
363-
364-
// Open input
365-
return service.openEditor(diffInput, { pinned: true }).then(editor => {
366-
367-
// Close input
368-
return editor.group.closeEditor(diffInput).then(() => {
369-
assert.equal(diffInput.isDisposed(), true);
370-
assert.equal(otherInput.isDisposed(), true);
371-
assert.equal(input.isDisposed(), true);
372-
});
373-
});
374-
});
375-
376-
test('close editor disposes properly (diff input, left side still opened)', function () {
377-
const partInstantiator = workbenchInstantiationService();
378-
379-
const part = partInstantiator.createInstance(EditorPart, 'id', false);
380-
part.create(document.createElement('div'));
381-
part.layout(new Dimension(400, 300));
382-
383-
const testInstantiationService = partInstantiator.createChild(new ServiceCollection([IEditorGroupsService, part]));
384-
385-
const service: IEditorService = testInstantiationService.createInstance(EditorService);
386-
387-
const input = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource'));
388-
const otherInput = testInstantiationService.createInstance(TestEditorInput, URI.parse('my://resource2'));
389-
const diffInput = new DiffEditorInput('name', 'description', input, otherInput);
390-
391-
// Open input
392-
return service.openEditor(diffInput, { pinned: true }).then(editor => {
393-
return service.openEditor(input, { pinned: true }).then(editor => {
394-
395-
// Close input
396-
return editor.group.closeEditor(diffInput).then(() => {
397-
assert.equal(diffInput.isDisposed(), true);
398-
assert.equal(otherInput.isDisposed(), true);
399-
assert.equal(input.isDisposed(), false);
400-
});
401-
});
402-
});
403-
});
404-
405310
test('open to the side', function () {
406311
const partInstantiator = workbenchInstantiationService();
407312

0 commit comments

Comments
 (0)