mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
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:
@@ -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');
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user