diff options
| author | Stephen Blott | 2015-04-25 09:45:55 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-04-25 09:45:55 +0100 |
| commit | b1c27ca32fd3aa365990b959f22888c1d8d802ca (patch) | |
| tree | 80cc59c7c41c7ce63e43af13c29adae777f5df4a /tests/unit_tests | |
| parent | e7ae8e0cc5aa5d4a8c7778c4a2f88b53d7cc4111 (diff) | |
| parent | 6446cf04c7b44c3d419dc450a73b60bcaf5cdf02 (diff) | |
| download | vimium-b1c27ca32fd3aa365990b959f22888c1d8d802ca.tar.bz2 | |
Merge branch 'exclusion-rules-pushState-and-hash' of https://github.com/mrmr1993/vimium into mrmr1993-exclusion-rules-pushState-and-hash
Conflicts:
content_scripts/vimium_frontend.coffee
Diffstat (limited to 'tests/unit_tests')
| -rw-r--r-- | tests/unit_tests/exclusion_test.coffee | 12 | ||||
| -rw-r--r-- | tests/unit_tests/test_chrome_stubs.coffee | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/unit_tests/exclusion_test.coffee b/tests/unit_tests/exclusion_test.coffee index 287d699d..b3ed7194 100644 --- a/tests/unit_tests/exclusion_test.coffee +++ b/tests/unit_tests/exclusion_test.coffee @@ -21,10 +21,6 @@ extend(global, require "../../background_scripts/exclusions.js") extend(global, require "../../background_scripts/commands.js") extend(global, require "../../background_scripts/main.js") -dummyTab = - tab: - incognito: false - # These tests cover only the most basic aspects of excluded URLs and passKeys. # context "Excluded URLs and pass keys", @@ -40,22 +36,22 @@ context "Excluded URLs and pass keys", ]) should "be disabled for excluded sites", -> - rule = isEnabledForUrl({ url: 'http://mail.google.com/calendar/page' }, dummyTab) + rule = isEnabledForUrl({ url: 'http://mail.google.com/calendar/page' }) assert.isFalse rule.isEnabledForUrl assert.isFalse rule.passKeys should "be disabled for excluded sites, one exclusion", -> - rule = isEnabledForUrl({ url: 'http://www.bbc.com/calendar/page' }, dummyTab) + rule = isEnabledForUrl({ url: 'http://www.bbc.com/calendar/page' }) assert.isFalse rule.isEnabledForUrl assert.isFalse rule.passKeys should "be enabled, but with pass keys", -> - rule = isEnabledForUrl({ url: 'https://www.facebook.com/something' }, dummyTab) + rule = isEnabledForUrl({ url: 'https://www.facebook.com/something' }) assert.isTrue rule.isEnabledForUrl assert.equal rule.passKeys, 'abcd' should "be enabled", -> - rule = isEnabledForUrl({ url: 'http://www.twitter.com/pages' }, dummyTab) + rule = isEnabledForUrl({ url: 'http://www.twitter.com/pages' }) assert.isTrue rule.isEnabledForUrl assert.isFalse rule.passKeys diff --git a/tests/unit_tests/test_chrome_stubs.coffee b/tests/unit_tests/test_chrome_stubs.coffee index bc50521a..60f3a890 100644 --- a/tests/unit_tests/test_chrome_stubs.coffee +++ b/tests/unit_tests/test_chrome_stubs.coffee @@ -38,6 +38,12 @@ exports.chrome = addListener: () -> true query: () -> true + webNavigation: + onHistoryStateUpdated: + addListener: () -> + onReferenceFragmentUpdated: + addListener: () -> + windows: onRemoved: addListener: () -> true |
