From cd6f7e77887f535e88690b84ad081f7cc630306f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 21 Oct 2017 12:42:30 +0900 Subject: support shift modifier --- test/content/components/common/input.test.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test') 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 + ', () => { + let component = new InputComponent(window.document); + component.onKey((key) => { + expect(key).is.equals(''); + }); + component.onKeyDown({ key: 'Escape', shiftKey: true }); + }) + + it('press + ', () => { + let component = new InputComponent(window.document); + component.onKey((key) => { + expect(key).is.equals(''); + }); + component.onKeyDown({ key: 'Escape', ctrlKey: true }); + }) + it('does not invoke only meta keys', () => { let component = new InputComponent(window.document); component.onKey((key) => { -- cgit v1.2.3