Backed out changeset c7919e13cafb (bug 1048857) for mochitest-bc failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 27 Aug 2014 14:18:32 -0400
changeset 223436 2cab6b69b74c4f668148ffe289546bc9a65e5a7f
parent 223435 10346f72cdcbb00331d06df4958b231391d3e5bc
child 223437 d3f9fd13aefc8740529679585caab60905b9a546
child 223628 f3d15f941c583374affebb74f64b1b020b445892
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1048857
milestone34.0a1
backs outc7919e13cafbc6deebbbcf13f728eb2c3d06c4c5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset c7919e13cafb (bug 1048857) for mochitest-bc failures.
toolkit/components/places/UnifiedComplete.js
toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
toolkit/components/places/tests/unifiedcomplete/xpcshell.ini
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -452,28 +452,24 @@ function getUnfilteredSearchTokens(searc
  *
  * @param spec
  *        The text to modify.
  * @return the modified spec.
  */
 function stripPrefix(spec)
 {
   ["http://", "https://", "ftp://"].some(scheme => {
-    // Strip protocol if not directly followed by a space
-    if (spec.startsWith(scheme) && spec != scheme &&
-        spec[scheme.length] != " ") {
+    if (spec.startsWith(scheme)) {
       spec = spec.slice(scheme.length);
       return true;
     }
     return false;
   });
 
-  // Strip www. if not directly followed by a space
-  if (spec.startsWith("www.") && spec != "www." &&
-      spec[4] != " ") {
+  if (spec.startsWith("www.")) {
     spec = spec.slice(4);
   }
   return spec;
 }
 
 /**
  * Strip http and trailing separators from a spec.
  *
deleted file mode 100644
--- a/toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-add_task(function* test_protocol_trimming() {
-  for (let prot of ["http", "https", "ftp"]) {
-    let visit = {
-      // Include the protocol in the query string to ensure we get matches (see bug 1059395)
-      uri: NetUtil.newURI(prot + "://www.mozilla.org/test/?q=" + prot + encodeURIComponent("://") + "www.foo"),
-      title: "Test title",
-      transition: TRANSITION_TYPED
-    };
-    yield promiseAddVisits(visit);
-    let matches = [{uri: visit.uri, title: visit.title}];
-
-    let inputs = [
-      prot + "://",
-      prot + ":// ",
-      prot + ":// mo",
-      prot + "://mo te",
-      prot + "://www.",
-      prot + "://www. ",
-      prot + "://www. mo",
-      prot + "://www.mo te",
-      "www.",
-      "www. ",
-      "www. mo",
-      "www.mo te"
-    ];
-    for (let input of inputs) {
-      do_log_info("Searching for: " + input);
-      yield check_autocomplete({
-        search: input,
-        matches: matches
-      });
-    }
-
-    yield cleanup();
-  }
-});
-
--- a/toolkit/components/places/tests/unifiedcomplete/xpcshell.ini
+++ b/toolkit/components/places/tests/unifiedcomplete/xpcshell.ini
@@ -6,17 +6,16 @@ tail =
 [test_416214.js]
 [test_417798.js]
 [test_418257.js]
 [test_422277.js]
 [test_autocomplete_functional.js]
 [test_autocomplete_on_value_removed_479089.js]
 [test_autoFill_default_behavior.js]
 [test_avoid_middle_complete.js]
-[test_avoid_stripping_to_empty_tokens.js]
 [test_casing.js]
 [test_do_not_trim.js]
 [test_download_embed_bookmarks.js]
 [test_dupe_urls.js]
 [test_empty_search.js]
 [test_enabled.js]
 [test_escape_self.js]
 [test_ignore_protocol.js]