Index: chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc |
diff --git a/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc b/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc |
index 84a80a3d46016b5ffe3b0a6e72064d229eb16cea..bbcc1e372c241188c79d3e3b62a30a04a028f455 100644 |
--- a/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc |
+++ b/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc |
@@ -46,13 +46,13 @@ class BookmarkModelSQLHandlerTest : public testing::Test { |
chrome::kInitialProfile); |
// Create the BookmarkModel that doesn't need to invoke load(). |
testing_profile->CreateBookmarkModel(true); |
- testing_profile->BlockUntilBookmarkModelLoaded(); |
+ bookmark_model_ = BookmarkModelFactory::GetForProfile(testing_profile); |
+ ui_test_utils::WaitForBookmarkModelToLoad(bookmark_model_); |
+ ASSERT_TRUE(bookmark_model_); |
// Get the BookmarkModel from LastUsedProfile, this is the same way that |
// how the BookmarkModelSQLHandler gets the BookmarkModel. |
Profile* profile = ProfileManager::GetLastUsedProfile(); |
ASSERT_TRUE(profile); |
- bookmark_model_ = BookmarkModelFactory::GetForProfile(profile); |
- ASSERT_TRUE(bookmark_model_); |
// Create the directory for history database. |
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |