aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2015-01-20 06:38:02 +0000
committerStephen Blott2015-01-20 06:38:02 +0000
commit9fa664167b5aaf99069ba9298646a39853eeb067 (patch)
treec84864502656862d4c0bd41bd5da8c6bdf06c5de /tests
parente8bc7c66521ac83b1396fadee32252f71b3375db (diff)
parent7450e1cfc57231457c894d372774c391bf13ac68 (diff)
downloadvimium-9fa664167b5aaf99069ba9298646a39853eeb067.tar.bz2
Merge pull request #1438 from smblott-github/focus-input-with-memory
Give focusInput (gi) a memory
Diffstat (limited to 'tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index 33177c59..a4713a72 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -207,6 +207,12 @@ context "Input focus",
handlerStack.bubbleEvent 'focus', target: document. activeElement
assert.isTrue InsertMode.permanentInstance.isActive()
+ should "select the previously-focused input when count is 1", ->
+ focusInput 100
+ handlerStack.bubbleEvent 'focus', target: document. activeElement
+ focusInput 1
+ assert.equal "third", document.activeElement.id
+
# TODO: these find prev/next link tests could be refactored into unit tests which invoke a function which has
# a tighter contract than goNext(), since they test minor aspects of goNext()'s link matching behavior, and we
# don't need to construct external state many times over just to test that.