Remove WinJS.Promise#cancel usage (#56137)

This commit is contained in:
Christof Marti
2018-09-05 09:13:06 +02:00
parent 8539f48172
commit 5f88f89be5
4 changed files with 19 additions and 13 deletions

View File

@@ -486,12 +486,13 @@ suite('window namespace tests', () => {
test('showQuickPick, canceled by another picker', function () {
const source = new CancellationTokenSource();
const result = window.showQuickPick(['eins', 'zwei', 'drei'], { ignoreFocusOut: true }).then(result => {
source.cancel();
assert.equal(result, undefined);
});
const source = new CancellationTokenSource();
source.cancel();
window.showQuickPick(['eins', 'zwei', 'drei'], undefined, source.token);
return result;