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
--- 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();
});