Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2176)

Unified Diff: chrome/browser/autocomplete/history_contents_provider_unittest.cc

Issue 12929016: bookmarks: Get rid of TestingProfile::BlockUntilBookmarkModelLoaded(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_quick_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_contents_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/history_contents_provider_unittest.cc b/chrome/browser/autocomplete/history_contents_provider_unittest.cc
index 54e29d3fe7c33c9d3f4729c160e62488d3d6928d..3c8243b6e2bb1569a935281289c76b13a298a0d5 100644
--- a/chrome/browser/autocomplete/history_contents_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_contents_provider_unittest.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
+#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -229,14 +230,13 @@ TEST_F(HistoryContentsProviderTest, DeleteMatch) {
// Tests deleting starred results from history, not affecting bookmarks/matches.
TEST_F(HistoryContentsProviderTest, DeleteStarredMatch) {
profile()->CreateBookmarkModel(false);
- profile()->BlockUntilBookmarkModelLoaded();
+
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
+ ui_test_utils::WaitForBookmarkModelToLoad(model);
// Bookmark a history item.
GURL bookmark_url(test_entries[2].url);
- bookmark_utils::AddIfNotBookmarked(
- BookmarkModelFactory::GetForProfile(profile()),
- bookmark_url,
- ASCIIToUTF16("bar"));
+ bookmark_utils::AddIfNotBookmarked(model, bookmark_url, ASCIIToUTF16("bar"));
// Get the match to delete its history
AutocompleteInput input(ASCIIToUTF16("bar"), string16::npos, string16(), true,
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_quick_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698