Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)

* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d

* Fix vs unit tests and hygiene issue

* Fix strict null check issue
This commit is contained in:
Chris LaFreniere
2019-06-10 18:27:09 -07:00
committed by GitHub
parent ff38bc8143
commit d15a3fcc98
926 changed files with 19529 additions and 11383 deletions

View File

@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { KeyChord, KeyCode, KeyMod, Keybinding, ResolvedKeybinding, SimpleKeybinding, createKeybinding, createSimpleKeybinding } from 'vs/base/common/keyCodes';
import { IDisposable } from 'vs/base/common/lifecycle';
import { OS } from 'vs/base/common/platform';
import Severity from 'vs/base/common/severity';
import { ICommandService } from 'vs/platform/commands/common/commands';
@@ -14,9 +13,9 @@ import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingResolver';
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
import { INotification, INotificationService, IPromptChoice, IPromptOptions, NoOpNotification } from 'vs/platform/notification/common/notification';
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
import { INotification, INotificationService, IPromptChoice, IPromptOptions, NoOpNotification, IStatusMessageOptions } from 'vs/platform/notification/common/notification';
import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
function createContext(ctx: any) {
return {
@@ -35,10 +34,9 @@ suite('AbstractKeybindingService', () => {
resolver: KeybindingResolver,
contextKeyService: IContextKeyService,
commandService: ICommandService,
notificationService: INotificationService,
statusService?: IStatusbarService
notificationService: INotificationService
) {
super(contextKeyService, commandService, NullTelemetryService, notificationService, statusService);
super(contextKeyService, commandService, NullTelemetryService, notificationService);
this._resolver = resolver;
}
@@ -129,7 +127,7 @@ suite('AbstractKeybindingService', () => {
};
let notificationService: INotificationService = {
_serviceBrand: undefined,
_serviceBrand: {} as ServiceIdentifier<INotificationService>,
notify: (notification: INotification) => {
showMessageCalls.push({ sev: notification.severity, message: notification.message });
return new NoOpNotification();
@@ -148,13 +146,8 @@ suite('AbstractKeybindingService', () => {
},
prompt(severity: Severity, message: string, choices: IPromptChoice[], options?: IPromptOptions) {
throw new Error('not implemented');
}
};
let statusbarService: IStatusbarService = {
_serviceBrand: undefined,
addEntry: undefined!,
setStatusMessage: (message: string, autoDisposeAfter?: number, delayBy?: number): IDisposable => {
},
status(message: string, options?: IStatusMessageOptions) {
statusMessageCalls!.push(message);
return {
dispose: () => {
@@ -166,7 +159,7 @@ suite('AbstractKeybindingService', () => {
let resolver = new KeybindingResolver(items, []);
return new TestKeybindingService(resolver, contextKeyService, commandService, notificationService, statusbarService);
return new TestKeybindingService(resolver, contextKeyService, commandService, notificationService);
};
});