Wait to signal to the extHostTerminalService that the terminal is opened until the terminal has a name. (#58983)

Also added a change listener for title. Fixes #53057
This commit is contained in:
Alex Ross
2018-09-21 14:08:38 -07:00
committed by GitHub
parent 4cd9739394
commit 1ff175f094
7 changed files with 52 additions and 18 deletions

View File

@@ -585,16 +585,6 @@ suite('window namespace tests', () => {
});
suite('Terminal', () => {
test('createTerminal, Terminal.name', () => {
const terminal = window.createTerminal('foo');
assert.equal(terminal.name, 'foo');
assert.throws(() => {
(<any>terminal).name = 'bar';
}, 'Terminal.name should be readonly');
terminal.dispose();
});
test('sendText immediately after createTerminal should not throw', () => {
const terminal = window.createTerminal();
assert.doesNotThrow(terminal.sendText.bind(terminal, 'echo "foo"'));
@@ -708,10 +698,12 @@ suite('window namespace tests', () => {
test('onDidChangeActiveTerminal should fire when new terminals are created', (done) => {
const reg1 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => {
console.log('!!!!!!!!!!!!!!!ONE');
assert.equal(active, terminal);
assert.equal(active, window.activeTerminal);
reg1.dispose();
const reg2 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => {
console.log('!!!!!!!!!!!!!!!TWO');
assert.equal(active, undefined);
assert.equal(active, window.activeTerminal);
reg2.dispose();
@@ -721,6 +713,8 @@ suite('window namespace tests', () => {
});
const terminal = window.createTerminal();
terminal.show();
console.log('!!!!!!!!!!!!!!!THREE');
});
});
});