aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dom_tests
diff options
context:
space:
mode:
authorStephen Blott2015-01-18 21:39:00 +0000
committerStephen Blott2015-01-18 21:39:00 +0000
commit9d7185b78b366abafe52faeb18ec039b242e02b9 (patch)
tree374318338309ee4de62e3e0ce1e49f5f4eabcc4a /tests/dom_tests
parent7ed25b7a757a0b3d8d8cf14c60fd8e0e0d237835 (diff)
downloadvimium-9d7185b78b366abafe52faeb18ec039b242e02b9.tar.bz2
Give focusInput a memory (fix typo).
Diffstat (limited to 'tests/dom_tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee13
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index f67ebc88..a4713a72 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -184,12 +184,10 @@ context "Input focus",
<input type='password' id='third' value='some value'/>"
document.getElementById("test-div").innerHTML = testContent
backupStackState()
- resetFocusInputFocusedElement()
tearDown ->
document.getElementById("test-div").innerHTML = ""
restoreStackState()
- resetFocusInputFocusedElement()
should "focus the right element", ->
focusInput 1
@@ -204,25 +202,16 @@ context "Input focus",
focusInput 1
handlerStack.bubbleEvent 'focus', target: document.activeElement
assert.isTrue InsertMode.permanentInstance.isActive()
- # deactivate the tabbing mode and its overlays
- handlerStack.bubbleEvent 'keydown', mockKeyboardEvent("A")
focusInput 100
handlerStack.bubbleEvent 'focus', target: document. activeElement
assert.isTrue InsertMode.permanentInstance.isActive()
- # deactivate the tabbing mode and its overlays
- handlerStack.bubbleEvent 'keydown', mockKeyboardEvent("A")
should "select the previously-focused input when count is 1", ->
focusInput 100
- assert.equal "third", document.activeElement.id
- # deactivate the tabbing mode and its overlays
- handlerStack.bubbleEvent 'keydown', mockKeyboardEvent("A")
-
+ handlerStack.bubbleEvent 'focus', target: document. activeElement
focusInput 1
assert.equal "third", document.activeElement.id
- # deactivate the tabbing mode and its overlays
- handlerStack.bubbleEvent 'keydown', mockKeyboardEvent("A")
# 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