Bug 1342551 - Fix the test loading top URLs file: last site, first letter; r=Gijs
authorSvetlana Orlik <sveta.orlik.code@gmail.com>
Fri, 24 Feb 2017 15:09:52 +0300
changeset 489971 c7374c1837bc225a4171694e9ab4e907e5e66863
parent 489970 8e332422e57c39ee72bc7493875fad72f23dc640
child 489972 11e1a0367ea6403acca57560a27eabbeef8037fb
push id46964
push userbmo:mjzffr@gmail.com
push dateMon, 27 Feb 2017 13:49:06 +0000
reviewersGijs
bugs1342551
milestone54.0a1
Bug 1342551 - Fix the test loading top URLs file: last site, first letter; r=Gijs Changed testing last site as "prefill-site" to "autofill". This way it's unique. MozReview-Commit-ID: 53GZxzQQLsq
toolkit/components/places/tests/unifiedcomplete/test_prefill_sites.js
--- a/toolkit/components/places/tests/unifiedcomplete/test_prefill_sites.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_prefill_sites.js
@@ -125,18 +125,18 @@ add_task(function* test_data_file() {
   do_print("The JSON is parsed");
   let sites = yield response.json();
 
   do_print("Storage is populated");
   autocompleteObject.populatePrefillSiteStorage(sites);
 
   let lastSite = sites.pop();
   let uri = NetUtil.newURI(lastSite[0]);
-  let title = lastSite[1];
 
   do_print("Storage is populated from JSON correctly");
   yield check_autocomplete({
-    search: uri.host.slice(1), // omit 1st letter to avoid style:"autofill" result
-    matches: [ { uri, title,  style: ["prefill-site"] } ],
+    search: uri.host,
+    autofilled: stripPrefix(uri.spec),
+    completed: uri.spec,
   });
 
   yield cleanup();
 });