提交 41691474 编写于 作者: P Peng Lyu

Fix kb unit test

上级 cc8c1758
...@@ -153,6 +153,10 @@ export class BrowserKeyboardMapperFactoryBase { ...@@ -153,6 +153,10 @@ export class BrowserKeyboardMapperFactoryBase {
return this._activeKeymapInfo && keymap && this._activeKeymapInfo.fuzzyEqual(keymap); return this._activeKeymapInfo && keymap && this._activeKeymapInfo.fuzzyEqual(keymap);
} }
setUSKeyboardLayout() {
this._activeKeymapInfo = this.getUSStandardLayout();
}
setActiveKeyMapping(keymap: IKeyboardMapping | null) { setActiveKeyMapping(keymap: IKeyboardMapping | null) {
let matchedKeyboardLayout = this.getMatchedKeymapInfo(keymap); let matchedKeyboardLayout = this.getMatchedKeymapInfo(keymap);
if (matchedKeyboardLayout) { if (matchedKeyboardLayout) {
......
...@@ -110,7 +110,7 @@ suite('keyboard layout loader', () => { ...@@ -110,7 +110,7 @@ suite('keyboard layout loader', () => {
}, },
}), true); }), true);
TestKeyboardMapperFactory.INSTANCE.setActiveKeyMapping(null); TestKeyboardMapperFactory.INSTANCE.setUSKeyboardLayout();
assert.equal(TestKeyboardMapperFactory.INSTANCE.activeKeyboardLayout!.isUSStandard, true); assert.equal(TestKeyboardMapperFactory.INSTANCE.activeKeyboardLayout!.isUSStandard, true);
}); });
...@@ -130,7 +130,7 @@ suite('keyboard layout loader', () => { ...@@ -130,7 +130,7 @@ suite('keyboard layout loader', () => {
}, },
}), true); }), true);
TestKeyboardMapperFactory.INSTANCE.setActiveKeyMapping(null); TestKeyboardMapperFactory.INSTANCE.setUSKeyboardLayout();
assert.equal(TestKeyboardMapperFactory.INSTANCE.activeKeyboardLayout!.isUSStandard, true); assert.equal(TestKeyboardMapperFactory.INSTANCE.activeKeyboardLayout!.isUSStandard, true);
}); });
}); });
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册