diff options
| author | Stephen Blott | 2015-04-19 11:01:27 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-04-19 11:01:27 +0100 |
| commit | b8457c39f9ac487c25c66fffebfc176e8593eaa7 (patch) | |
| tree | a2fc05ec1ee69c54c8c79e86b9e75d85596aa969 /tests | |
| parent | 756312e9f67d73bbaf1e48cc4f9fe0439ccb7f72 (diff) | |
| parent | 0e2d65684a338f6c7a31205f34a76c6d33f46aa8 (diff) | |
| download | vimium-b8457c39f9ac487c25c66fffebfc176e8593eaa7.tar.bz2 | |
Merge branch 'remove-badges'
Conflicts:
content_scripts/vimium_frontend.coffee
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dom_tests/dom_tests.coffee | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index 4afa9d7d..f81982ac 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -495,10 +495,6 @@ context "PostFindMode", testContent = "<input type='text' id='first'/>" document.getElementById("test-div").innerHTML = testContent document.getElementById("first").focus() - # For these tests, we need to push GrabBackFocus out of the way. When it exits, it updates the badge, - # which interferes with event suppression within insert mode. This cannot happen in normal operation, - # because GrabBackFocus exits on the first keydown. - Mode.top().exit() @postFindMode = new PostFindMode tearDown -> @@ -527,55 +523,3 @@ context "PostFindMode", sendKeyboardEvent "escape" assert.isTrue @postFindMode.modeIsActive -context "Mode badges", - setup -> - initializeModeState() - testContent = "<input type='text' id='first'/>" - document.getElementById("test-div").innerHTML = testContent - - tearDown -> - document.getElementById("test-div").innerHTML = "" - - should "have no badge in normal mode", -> - Mode.updateBadge() - assert.isTrue chromeMessages[0].badge == "" - - should "have an I badge in insert mode by focus", -> - document.getElementById("first").focus() - # Focus triggers an event in the handler stack, so we check element "1", here. - assert.isTrue chromeMessages[1].badge == "I" - - should "have no badge after leaving insert mode by focus", -> - document.getElementById("first").focus() - document.getElementById("first").blur() - assert.isTrue chromeMessages[0].badge == "" - - should "have an I badge in global insert mode", -> - new InsertMode global: true - assert.isTrue chromeMessages[0].badge == "I" - - should "have no badge after leaving global insert mode", -> - mode = new InsertMode global: true - mode.exit() - assert.isTrue chromeMessages[0].badge == "" - - should "have a ? badge in PostFindMode (immediately)", -> - document.getElementById("first").focus() - new PostFindMode - assert.isTrue chromeMessages[0].badge == "?" - - should "have no badge in PostFindMode (subsequently)", -> - document.getElementById("first").focus() - new PostFindMode - sendKeyboardEvent "a" - assert.isTrue chromeMessages[0].badge == "" - - should "have no badge when disabled", -> - handlerStack.bubbleEvent "registerStateChange", - enabled: false - passKeys: "" - - document.getElementById("first").focus() - # Focus triggers an event in the handler stack, so we check element "1", here. - assert.isTrue chromeMessages[1].badge == "" - |
