aboutsummaryrefslogtreecommitdiff
path: root/test/content/components/common
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-21 12:42:30 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-21 12:50:53 +0900
commitcd6f7e77887f535e88690b84ad081f7cc630306f (patch)
tree87b6e933c76e6675ef8670d169d0468d22858be4 /test/content/components/common
parent214a5103f3e2914028206a13ba115c69a7ee07f1 (diff)
support shift modifier
Diffstat (limited to 'test/content/components/common')
-rw-r--r--test/content/components/common/input.test.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/content/components/common/input.test.js b/test/content/components/common/input.test.js
index d4f554a..912ac34 100644
--- a/test/content/components/common/input.test.js
+++ b/test/content/components/common/input.test.js
@@ -40,6 +40,30 @@ describe('InputComponent', () => {
component.onKeyDown({ key: 'a', ctrlKey: true });
})
+ it('press X', () => {
+ let component = new InputComponent(window.document);
+ component.onKey((key) => {
+ expect(key).is.equals('X');
+ });
+ component.onKeyDown({ key: 'X', shiftKey: true });
+ })
+
+ it('press <Shift> + <Esc>', () => {
+ let component = new InputComponent(window.document);
+ component.onKey((key) => {
+ expect(key).is.equals('<S-Esc>');
+ });
+ component.onKeyDown({ key: 'Escape', shiftKey: true });
+ })
+
+ it('press <Ctrl> + <Esc>', () => {
+ let component = new InputComponent(window.document);
+ component.onKey((key) => {
+ expect(key).is.equals('<C-Esc>');
+ });
+ component.onKeyDown({ key: 'Escape', ctrlKey: true });
+ })
+
it('does not invoke only meta keys', () => {
let component = new InputComponent(window.document);
component.onKey((key) => {