From 51fa63a5e97167b015acf7b80d673d081c2b91da Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Tue, 24 Oct 2017 18:36:23 +0100 Subject: Move NormalMode to its own content script --- tests/dom_tests/dom_tests.html | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/dom_tests') diff --git a/tests/dom_tests/dom_tests.html b/tests/dom_tests/dom_tests.html index d2e795d1..37cd43e3 100644 --- a/tests/dom_tests/dom_tests.html +++ b/tests/dom_tests/dom_tests.html @@ -49,6 +49,7 @@ + -- cgit v1.2.3 From 9847144f3493547af7eb419f11552ac18d7e9872 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sat, 28 Oct 2017 17:09:24 +0100 Subject: Remove normal mode commands from global scope --- tests/dom_tests/dom_tests.coffee | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/dom_tests') diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index a5c85606..6e422d46 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -436,29 +436,29 @@ context "Input focus", document.getElementById("test-div").innerHTML = "" should "focus the first element", -> - focusInput 1 + NormalModeCommands.focusInput 1 assert.equal "first", document.activeElement.id should "focus the nth element", -> - focusInput 100 + NormalModeCommands.focusInput 100 assert.equal "third", document.activeElement.id should "activate insert mode on the first element", -> - focusInput 1 + NormalModeCommands.focusInput 1 assert.isTrue InsertMode.permanentInstance.isActive() should "activate insert mode on the first element", -> - focusInput 100 + NormalModeCommands.focusInput 100 assert.isTrue InsertMode.permanentInstance.isActive() should "activate the most recently-selected input if the count is 1", -> - focusInput 3 - focusInput 1 + NormalModeCommands.focusInput 3 + NormalModeCommands.focusInput 1 assert.equal "third", document.activeElement.id should "not trigger insert if there are no inputs", -> document.getElementById("test-div").innerHTML = "" - focusInput 1 + NormalModeCommands.focusInput 1 assert.isFalse InsertMode.permanentInstance.isActive() # TODO: these find prev/next link tests could be refactored into unit tests which invoke a function which has @@ -479,7 +479,7 @@ context "Find prev / next links", next page """ stubSettings "nextPatterns", "next" - goNext() + NormalModeCommands.goNext() assert.equal '#second', window.location.hash should "match against non-word patterns", -> @@ -487,7 +487,7 @@ context "Find prev / next links", >> """ stubSettings "nextPatterns", ">>" - goNext() + NormalModeCommands.goNext() assert.equal '#first', window.location.hash should "favor matches with fewer words", -> @@ -496,14 +496,14 @@ context "Find prev / next links", next! """ stubSettings "nextPatterns", "next" - goNext() + NormalModeCommands.goNext() assert.equal '#second', window.location.hash should "find link relation in header", -> document.getElementById("test-div").innerHTML = """ """ - goNext() + NormalModeCommands.goNext() assert.equal '#first', window.location.hash should "favor link relation to text matching", -> @@ -511,14 +511,14 @@ context "Find prev / next links", next """ - goNext() + NormalModeCommands.goNext() assert.equal '#first', window.location.hash should "match mixed case link relation", -> document.getElementById("test-div").innerHTML = """ """ - goNext() + NormalModeCommands.goNext() assert.equal '#first', window.location.hash createLinks = (n) -> -- cgit v1.2.3