From 61e94c77d37011f675478c95b33ccd1dcf70ca6d Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 18 Apr 2016 10:25:36 +0100 Subject: 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. --- tests/dom_tests/dom_tests.coffee | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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", -- cgit v1.2.3