Skip to content

Commit

Permalink
fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 committed Jun 15, 2023
1 parent be09096 commit 1f3b6d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { TestLifecycleService } from 'vs/workbench/test/browser/workbenchTestSer
import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService';
import { Color, RGBA } from 'vs/base/common/color';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';

class TestWebglAddon implements WebglAddon {
static shouldThrow = false;
Expand Down Expand Up @@ -117,6 +118,7 @@ suite('XtermTerminal', () => {
instantiationService.stub(IViewDescriptorService, viewDescriptorService);
instantiationService.stub(IContextMenuService, instantiationService.createInstance(ContextMenuService));
instantiationService.stub(ILifecycleService, new TestLifecycleService());
instantiationService.stub(IContextKeyService, new MockContextKeyService());

configHelper = instantiationService.createInstance(TerminalConfigHelper);
xterm = instantiationService.createInstance(TestXtermTerminal, Terminal, configHelper, 80, 30, { getBackgroundColor: () => undefined }, new TerminalCapabilityStore(), '', new MockContextKeyService().createKey('', true)!, true);
Expand Down Expand Up @@ -251,7 +253,7 @@ suite('XtermTerminal', () => {

// Open xterm as otherwise the webgl addon won't activate
const container = document.createElement('div');
xterm.raw.open(container);
xterm.attachToElement(container);

// Auto should activate the webgl addon
await configurationService.setUserConfiguration('terminal', { integrated: { ...defaultTerminalConfig, gpuAcceleration: 'auto' } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as assert from 'assert';
import { isWindows } from 'vs/base/common/platform';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { ContextMenuService } from 'vs/platform/contextview/browser/contextMenuService';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
Expand Down Expand Up @@ -56,6 +57,7 @@ suite('Buffer Content Tracker', () => {
instantiationService.stub(ILogService, new NullLogService());
instantiationService.stub(IContextMenuService, instantiationService.createInstance(ContextMenuService));
instantiationService.stub(ILifecycleService, new TestLifecycleService());
instantiationService.stub(IContextKeyService, new MockContextKeyService());
configHelper = instantiationService.createInstance(TerminalConfigHelper);
capabilities = new TerminalCapabilityStore();
if (!isWindows) {
Expand Down

0 comments on commit 1f3b6d6

Please sign in to comment.