aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2016-04-18 10:25:36 +0100
committerStephen Blott2016-04-18 10:25:39 +0100
commit61e94c77d37011f675478c95b33ccd1dcf70ca6d (patch)
treef462cd2bfb2bb797c45ac5a00cbdfb75d17dfa88 /tests
parentd0d958b88776bdaff803707167ff1ada92d9b872 (diff)
downloadvimium-61e94c77d37011f675478c95b33ccd1dcf70ca6d.tar.bz2
Fix tests.
When the implementation of windowIsFocused() changed, the tests started failing. (It's not clear how I didn't spot this sooner. I've run the tests countless times - and they passed - since that change was made.
Diffstat (limited to 'tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index 75cc5da7..58fa26f9 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -83,6 +83,7 @@ createGeneralHintTests = (isFilteredMode) ->
stubSettings "filterLinkHints", isFilteredMode
stubSettings "linkHintCharacters", "ab"
stubSettings "linkHintNumbers", "12"
+ stub window, "windowIsFocused", -> true
tearDown ->
document.getElementById("test-div").innerHTML = ""
@@ -120,6 +121,7 @@ context "False positives in link-hint",
document.getElementById("test-div").innerHTML = testContent
stubSettings "filterLinkHints", true
stubSettings "linkHintNumbers", "12"
+ stub window, "windowIsFocused", -> true
tearDown ->
document.getElementById("test-div").innerHTML = ""
@@ -209,6 +211,7 @@ context "Alphabetical link hints",
initializeModeState()
stubSettings "filterLinkHints", false
stubSettings "linkHintCharacters", "ab"
+ stub window, "windowIsFocused", -> true
# Three hints will trigger double hint chars.
createLinks 3
@@ -253,6 +256,7 @@ context "Filtered link hints",
setup ->
stubSettings "filterLinkHints", true
stubSettings "linkHintNumbers", "0123456789"
+ stub window, "windowIsFocused", -> true
context "Text hints",