Bug 1118749 - Need promiseAsyncUpdates() before frecencyForUrl. r=mak, a=test-only
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Tue, 20 Jan 2015 01:13:00 -0500
changeset 242973 4501fcac9e0b
parent 242972 0b22d12d0736
child 242974 787968dadb44
push id4350
push userryanvm@gmail.com
push date2015-01-21 19:56 +0000
treeherdermozilla-beta@4501fcac9e0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1118749
milestone36.0
Bug 1118749 - Need promiseAsyncUpdates() before frecencyForUrl. r=mak, a=test-only
toolkit/components/places/tests/unifiedcomplete/test_searchEngine_host.js
--- a/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_host.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_host.js
@@ -47,17 +47,18 @@ add_task(function* test_searchEngine_aut
   // 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 promiseAddVisits(visits);
   addBookmark({ uri: uri, title: "Example bookmark" });
-  ok(frecencyForUrl(uri) > 10000, "Adeded URI should have expected high frecency");
+  yield promiseAsyncUpdates();
+  ok(frecencyForUrl(uri) > 10000, "Added URI should have expected high frecency");
 
   do_log_info("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"
   });