aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2016-03-30 11:39:58 +0100
committerStephen Blott2016-03-30 11:40:01 +0100
commit8fc46ff8b00ae82b574e3314ebc8ae6046c3215f (patch)
treea26f80160b36da83cb00a08b0018fbc2c57ea5b3 /tests
parent39adee9090fc5aadfd5dd681f91b80025084858a (diff)
downloadvimium-8fc46ff8b00ae82b574e3314ebc8ae6046c3215f.tar.bz2
Add test for SuppressAllKeyboardEvents.
Which: - uncovered a typo in 39adee9090fc5aadfd5dd681f91b80025084858a. Also: - make Mode.debug a class variable, which is more helpful while trying to debug. Specifically, you can turn debugging on or off from within the tests, for example.
Diffstat (limited to 'tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index 84942908..158112b3 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -1022,3 +1022,15 @@ context "WaitForEnter",
sendKeyboardEvents "abc"
assert.isTrue @waitForEnter.modeIsActive
assert.isFalse @isSuccess?
+
+context "SuppressAllKeyboardEvents",
+ setup ->
+ initializeModeState()
+
+ should "supress keyboard events", ->
+ sendKeyboardEvent "a"
+ assert.equal 3, pageKeyboardEventCount
+ new SuppressAllKeyboardEvents
+ sendKeyboardEvent "a"
+ assert.equal 0, pageKeyboardEventCount
+