aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/mode_key_handler.coffee2
-rw-r--r--content_scripts/vimium_frontend.coffee6
2 files changed, 5 insertions, 3 deletions
diff --git a/content_scripts/mode_key_handler.coffee b/content_scripts/mode_key_handler.coffee
index 9946dddf..f2c4a745 100644
--- a/content_scripts/mode_key_handler.coffee
+++ b/content_scripts/mode_key_handler.coffee
@@ -15,6 +15,8 @@ class KeyHandlerMode extends Mode
keydownEvents: {}
setKeyMapping: (@keyMapping) -> @reset()
setPassKeys: (@passKeys) -> @reset()
+ # Only for tests.
+ setCommandHandler: (@commandHandler) ->
# Reset the key state, optionally retaining the count provided.
reset: (@countPrefix = 0) ->
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 972911c5..2e57ee1a 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -126,11 +126,11 @@ class NormalMode extends KeyHandlerMode
else
Utils.invokeCommandString registryEntry.command for i in [0...count]
-# Only exported for tests; also, "args..." is only for the tests.
-window.initializeModes = (args...) ->
+# Only exported for tests.
+window.initializeModes = ->
# Install the permanent modes. The permanently-installed insert mode tracks focus/blur events, and
# activates/deactivates itself accordingly. normalMode is exported only for the tests.
- window.normalMode = new NormalMode args...
+ window.normalMode = new NormalMode
new InsertMode permanent: true
Scroller.init()