Bug 1041262 - Disable autofilling of search engines to avoid failures in unified complete tests when searchengines is in the platform directory. r=mak, a=test-only
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Tue, 09 Sep 2014 10:48:28 +0100
changeset 216692 320e081cac62
parent 216691 d2d97af8ecdd
child 216693 31a06334affd
push id3879
push userryanvm@gmail.com
push date2014-09-09 23:54 +0000
treeherdermozilla-beta@320e081cac62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1041262
milestone33.0
Bug 1041262 - Disable autofilling of search engines to avoid failures in unified complete tests when searchengines is in the platform directory. r=mak, a=test-only
toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
toolkit/components/places/tests/unifiedcomplete/test_417798.js
toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js
toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js
--- a/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
+++ b/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
@@ -20,16 +20,17 @@ let (commonFile = do_get_file("../head_c
 function run_test() {
   run_next_test();
 }
 
 function* cleanup() {
   Services.prefs.clearUserPref("browser.urlbar.autocomplete.enabled");
   Services.prefs.clearUserPref("browser.urlbar.autoFill");
   Services.prefs.clearUserPref("browser.urlbar.autoFill.typed");
+  Services.prefs.clearUserPref("browser.urlbar.autoFill.searchEngines");
   remove_all_bookmarks();
   yield promiseClearHistory();
 }
 do_register_cleanup(cleanup);
 
 /**
  * @param aSearches
  *        Array of AutoCompleteSearch names.
--- a/toolkit/components/places/tests/unifiedcomplete/test_417798.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_417798.js
@@ -3,16 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Test for bug 417798 to make sure javascript: URIs don't show up unless the
  * user searches for javascript: explicitly.
  */
 
 add_task(function* test_javascript_match() {
+  Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
+
   let uri1 = NetUtil.newURI("http://abc/def");
   let uri2 = NetUtil.newURI("javascript:5");
   yield promiseAddVisits([ { uri: uri1, title: "Title with javascript:" } ]);
   addBookmark({ uri: uri2,
                 title: "Title with javascript:" });
 
   do_log_info("Match non-javascript: with plain search");
   yield check_autocomplete({
--- a/toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js
@@ -3,16 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Test bug 451760 which allows matching only at the beginning of urls or
  * titles to simulate Firefox 2 functionality.
  */
 
 add_task(function* test_match_beginning() {
+  Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
+
   let uri1 = NetUtil.newURI("http://x.com/y");
   let uri2 = NetUtil.newURI("https://y.com/x");
   yield promiseAddVisits([ { uri: uri1, title: "a b" },
                            { uri: uri2, title: "b a" } ]);
 
   do_log_info("Match at the beginning of titles");
   Services.prefs.setIntPref("browser.urlbar.matchBehavior", 3);
   yield check_autocomplete({
--- a/toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js
@@ -13,16 +13,18 @@
  * match," so leverage "must match" pref for checking word boundary logic and
  * make sure "can match" matches anywhere.
  */
 
 let katakana = ["\u30a8", "\u30c9"]; // E, Do
 let ideograph = ["\u4efb", "\u5929", "\u5802"]; // Nin Ten Do
 
 add_task(function* test_escape() {
+  Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
+
   let uri1 = NetUtil.newURI("http://matchme/");
   let uri2 = NetUtil.newURI("http://dontmatchme/");
   let uri3 = NetUtil.newURI("http://title/1");
   let uri4 = NetUtil.newURI("http://title/2");
   let uri5 = NetUtil.newURI("http://tag/1");
   let uri6 = NetUtil.newURI("http://tag/2");
   let uri7 = NetUtil.newURI("http://crazytitle/");
   let uri8 = NetUtil.newURI("http://katakana/");