aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2016-03-28 06:29:50 +0100
committerStephen Blott2016-03-28 06:29:50 +0100
commit9700c9f2c315abfc1c11634a36df76eb093a4f85 (patch)
treef4d6e8f89c2a4f26c031aab523f483cf4d9ba7ac /tests
parent2a62e4811fc2360257dd99066b4caa3e95025cbf (diff)
parentd2b14cbe04acf1e03f988aa3ef8deb78c0480782 (diff)
downloadvimium-9700c9f2c315abfc1c11634a36df76eb093a4f85.tar.bz2
Merge pull request #2069 from smblott-github/global-link-hints-++
Link hints: false positives and scrollable divs
Diffstat (limited to 'tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index bc137a56..0dd6e122 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -109,6 +109,25 @@ createGeneralHintTests = (isFilteredMode) ->
createGeneralHintTests false
createGeneralHintTests true
+context "False positives in link-hint",
+
+ setup ->
+ testContent = '<span class="buttonWrapper">false positive<a>clickable</a></span>' + '<span class="buttonWrapper">clickable</span>'
+ document.getElementById("test-div").innerHTML = testContent
+ stubSettings "filterLinkHints", true
+ stubSettings "linkHintNumbers", "12"
+
+ tearDown ->
+ document.getElementById("test-div").innerHTML = ""
+
+ should "handle false positives", ->
+ linkHints = activateLinkHintsMode()
+ hintMarkers = getHintMarkers()
+ linkHints.deactivateMode()
+ assert.equal 2, hintMarkers.length
+ for hintMarker in hintMarkers
+ assert.equal "clickable", hintMarker.linkText
+
inputs = []
context "Test link hints for focusing input elements correctly",