diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
commit | 0ddd00f1959c78ce37c14fef3c83401408fca3bf (patch) | |
tree | d408e02767c86cf8aac3acbb86722b03c77ede6f /toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js | |
parent | 20f0905b33cbb18d1caa80c55e2f552c2e18957b (diff) | |
download | UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.gz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.lz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.xz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js')
-rw-r--r-- | toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js b/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js deleted file mode 100644 index 61b9826f7..000000000 --- a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -add_task(function* test_searchEngine_autoFill() { - Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true); - Services.search.addEngineWithDetails("MySearchEngine", "", "", "", - "GET", "http://my.search.com/"); - let engine = Services.search.getEngineByName("MySearchEngine"); - do_register_cleanup(() => Services.search.removeEngine(engine)); - - // Add an uri that matches the search string with high frecency. - let uri = NetUtil.newURI("http://www.example.com/my/"); - let visits = []; - for (let i = 0; i < 100; ++i) { - visits.push({ uri, title: "Terms - SearchEngine Search" }); - } - yield PlacesTestUtils.addVisits(visits); - yield addBookmark({ uri: uri, title: "Example bookmark" }); - yield PlacesTestUtils.promiseAsyncUpdates(); - ok(frecencyForUrl(uri) > 10000, "Added URI should have expected high frecency"); - - do_print("Check search domain is autoFilled even if there's an higher frecency match"); - yield check_autocomplete({ - search: "my", - autofilled: "my.search.com", - completed: "http://my.search.com" - }); - - yield cleanup(); -}); - -add_task(function* test_searchEngine_noautoFill() { - let engineName = "engine-rel-searchform.xml"; - let engine = yield addTestEngine(engineName); - equal(engine.searchForm, "http://example.com/?search"); - - Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false); - yield PlacesTestUtils.addVisits(NetUtil.newURI("http://example.com/my/")); - - do_print("Check search domain is not autoFilled if it matches a visited domain"); - yield check_autocomplete({ - search: "example", - autofilled: "example.com/", - completed: "example.com/" - }); - - yield cleanup(); -}); - |