diff --git a/src/vs/base/node/encoding.ts b/src/vs/base/node/encoding.ts index 2d8347ee26113eba2c77e8bb9a08e608e02dc42b..23af39292d9831f0060f80ddc7f54d46c3ac05c3 100644 --- a/src/vs/base/node/encoding.ts +++ b/src/vs/base/node/encoding.ts @@ -95,7 +95,7 @@ export function detectEncodingByBOM(file: string): TPromise { return stream.readExactlyByFile(file, 3).then(({ buffer, bytesRead }) => detectEncodingByBOMFromBuffer(buffer, bytesRead)); } -const MINIMUM_THRESHOLD = 0.2; // TODO@Ben Decide how much this should be. +const MINIMUM_THRESHOLD = 0.2; jschardet.Constants.MINIMUM_THRESHOLD = MINIMUM_THRESHOLD; const IGNORE_ENCODINGS = ['ascii', 'utf-8', 'utf-16', 'utf-32']; diff --git a/src/vs/base/parts/ipc/test/node/ipc.test.ts b/src/vs/base/parts/ipc/test/node/ipc.test.ts index d010ddbd133bb69bb3badf943544c7e22dd748fe..bd9c57671ae75da1a711e07dda31e48d6edb720e 100644 --- a/src/vs/base/parts/ipc/test/node/ipc.test.ts +++ b/src/vs/base/parts/ipc/test/node/ipc.test.ts @@ -25,7 +25,7 @@ suite('IPC', () => { test('createChannel', () => { if (process.env['VSCODE_PID']) { - return undefined; // TODO@Ben find out why test fails when run from within VS Code + return undefined; // this test fails when run from within VS Code } const client = createClient(); @@ -42,7 +42,7 @@ suite('IPC', () => { test('cancellation', () => { if (process.env['VSCODE_PID']) { - return undefined; // TODO@Ben find out why test fails when run from within VS Code + return undefined; // this test fails when run from within VS Code } const client = createClient(); @@ -62,7 +62,7 @@ suite('IPC', () => { test('events', () => { if (process.env['VSCODE_PID']) { - return undefined; // TODO@Ben find out why test fails when run from within VS Code + return undefined; // this test fails when run from within VS Code } const client = createClient(); @@ -88,7 +88,7 @@ suite('IPC', () => { test('event dispose', () => { if (process.env['VSCODE_PID']) { - return undefined; // TODO@Ben find out why test fails when run from within VS Code + return undefined; // this test fails when run from within VS Code } const client = createClient(); diff --git a/src/vs/base/test/node/port.test.ts b/src/vs/base/test/node/port.test.ts index c83e29d2dcd63fc2c15c72bca233e89db7f88d69..24906c66662fff2de3634bf63034394aa7d867ec 100644 --- a/src/vs/base/test/node/port.test.ts +++ b/src/vs/base/test/node/port.test.ts @@ -14,7 +14,7 @@ suite('Ports', () => { this.timeout(1000 * 10); // higher timeout for this test if (process.env['VSCODE_PID']) { - return done(); // TODO@Ben find out why test fails when run from within VS Code + return done(); // this test fails when run from within VS Code } // get an initial freeport >= 7000 diff --git a/src/vs/base/test/node/processes/processes.test.ts b/src/vs/base/test/node/processes/processes.test.ts index 77278a62d6487f47d9f21f6bb23bd30c23b9f719..18066e2f03d45cb344872ce031c8df0ceb3bb748 100644 --- a/src/vs/base/test/node/processes/processes.test.ts +++ b/src/vs/base/test/node/processes/processes.test.ts @@ -27,7 +27,7 @@ function fork(id: string): cp.ChildProcess { suite('Processes', () => { test('buffered sending - simple data', function (done: () => void) { if (process.env['VSCODE_PID']) { - return done(); // TODO@Ben find out why test fails when run from within VS Code + return done(); // this test fails when run from within VS Code } const child = fork('vs/base/test/node/processes/fixtures/fork'); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 7421effa0af75f08820897a57456e24ee7168e36..a22256153154b7f455f80e07df9abd984ea0bc1d 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -102,7 +102,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise { return connect(environmentService.mainIPCHandle, 'main').then( client => { - // Tests from CLI require to be the only instance currently (TODO@Ben support multiple instances and output) + // Tests from CLI require to be the only instance currently if (environmentService.extensionTestsPath && !environmentService.debugExtensionHost.break) { const msg = 'Running extension tests from the command line is currently only supported if no other instance of Code is running.'; console.error(msg); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 20a170e9de2d1fe333c34cae2a66770efa848d09..474662606e5f077d0e8cd347fa0c7a366fc0377b 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -516,9 +516,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { collector.addRule(`.monaco-shell { color: ${windowForeground}; }`); } - // TODO@Ben the workbench background color is not really surfacing anywhere but on Windows - // not setting it will cause many part of the worbench to not use subpixel-antialiasing causing - // these parts to look fuzzy on higher resolution displays. + // We need to set the workbench background color so that on Windows we get subpixel-antialiasing. let workbenchBackground: string; switch (theme.type) { case 'dark': diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts index 725cb7a5a167dde72e63b251896c2f9413783e3a..9a86c171ae6ac0238df42b0c55cc4f23cccc361a 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts @@ -120,22 +120,6 @@ export class WalkThroughInput extends EditorInput { } return this.promise; - - // TODO: replicate above? - // return this.promise.then(ref => { - // const model = ref.object; - - // if (!(model instanceof ResourceEditorModel)) { - // ref.dispose(); - // this.promise = null; - // return TPromise.wrapError(`Unexpected model for ResourceInput: ${this.resource}`); // TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose() - // } - - // // TODO@Joao this should never happen - // model.onDispose(() => this.dispose()); - - // return model; - // }); } matches(otherInput: any): boolean { diff --git a/src/vs/workbench/services/textfile/test/textFileEditorModel.test.ts b/src/vs/workbench/services/textfile/test/textFileEditorModel.test.ts index 2c6135e09ee259e6858ef2f646fdef6e9ec42077..ee60658f08c0c05b6897fa456366b6ea0d98a579 100644 --- a/src/vs/workbench/services/textfile/test/textFileEditorModel.test.ts +++ b/src/vs/workbench/services/textfile/test/textFileEditorModel.test.ts @@ -228,35 +228,6 @@ suite('Files - TextFileEditorModel', () => { }, error => onError(error, done)); }); - test('Auto Save triggered when model changes', function (done) { - let eventCounter = 0; - const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index.txt'), 'utf8'); - - (model).autoSaveAfterMillies = 10; - (model).autoSaveAfterMilliesEnabled = true; - - model.onDidStateChange(e => { - if (e === StateChange.DIRTY || e === StateChange.SAVED) { - eventCounter++; - } - }); - - model.load().done(() => { - model.textEditorModel.setValue('foo'); - - return TPromise.timeout(200).then(() => { - assert.ok(!model.isDirty()); - assert.equal(eventCounter, 2); - - model.dispose(); - - assert.ok(!accessor.modelService.getModel(model.getResource())); - - done(); - }); - }, error => onError(error, done)); - }); - test('save() and isDirty() - proper with check for mtimes', function (done) { const input1 = createFileInput(instantiationService, toResource.call(this, '/path/index_async2.txt')); const input2 = createFileInput(instantiationService, toResource.call(this, '/path/index_async.txt')); @@ -375,26 +346,6 @@ suite('Files - TextFileEditorModel', () => { }, error => onError(error, done)); }); - // TODO@Ben unreliable test - // test('Orphaned models - state and event', function (done) { - // const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8'); - - // const unbind = model.onDidStateChange(e => { - // if (e === StateChange.ORPHANED_CHANGE) { - // unbind.dispose(); - // done(); - // } - // }); - - // accessor.fileService.fireFileChanges(new FileChangesEvent([{ resource: model.getResource(), type: FileChangeType.DELETED }])); - // return TPromise.timeout(110).then(() => { - // assert.ok(model.hasState(ModelState.ORPHAN)); - - // accessor.fileService.fireFileChanges(new FileChangesEvent([{ resource: model.getResource(), type: FileChangeType.ADDED }])); - // assert.ok(!model.hasState(ModelState.ORPHAN)); - // }); - // }); - test('SaveSequentializer - pending basics', function (done) { const sequentializer = new SaveSequentializer();