aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2016-04-08 13:36:24 +0100
committerStephen Blott2016-04-08 13:36:24 +0100
commit9d7351903d0148373a2ad4c06d006e8ee0613be2 (patch)
tree0bd0437e687b04412cca2e49e3789a053fbac84d /tests
parent5704688e2ab7effef701f2ac5282b3bd4e0c53c7 (diff)
parent77ea849b0849219550c7a8caa47698a35ed2fdab (diff)
downloadvimium-9d7351903d0148373a2ad4c06d006e8ee0613be2.tar.bz2
Merge pull request #2088 from smblott-github/filtered-hints-better-typed-text-matching
Filtered hints: better typed text handling.
Diffstat (limited to 'tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index 76c09f13..75cc5da7 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -284,6 +284,18 @@ context "Filtered link hints",
sendKeyboardEvent "A"
assert.equal "1", hintMarkers[3].hintString
+ # This test is the same as above, but with an extra non-matching character.
+ should "narrow the hints and ignore typing mistakes", ->
+ hintMarkers = getHintMarkers()
+ sendKeyboardEvent "T"
+ sendKeyboardEvent "R"
+ sendKeyboardEvent "X"
+ assert.equal "none", hintMarkers[0].style.display
+ assert.equal "3", hintMarkers[1].hintString
+ assert.equal "", hintMarkers[1].style.display
+ sendKeyboardEvent "A"
+ assert.equal "1", hintMarkers[3].hintString
+
context "Image hints",
setup ->