Index: chrome/browser/history/android/android_provider_backend_unittest.cc |
diff --git a/chrome/browser/history/android/android_provider_backend_unittest.cc b/chrome/browser/history/android/android_provider_backend_unittest.cc |
index 24ee397d8fd5bc7d10425a259fcf73abee7b31b7..5bc1bf15bf7ee79b156335d46436fc1c7435386f 100644 |
--- a/chrome/browser/history/android/android_provider_backend_unittest.cc |
+++ b/chrome/browser/history/android/android_provider_backend_unittest.cc |
@@ -127,13 +127,14 @@ class AndroidProviderBackendTest : public testing::Test { |
TestingProfile* testing_profile = profile_manager_.CreateTestingProfile( |
chrome::kInitialProfile); |
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_); |
// Setup the database directory and files. |
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |