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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_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
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
index 58f14eaaa77f61a37b2440e8bd9f98b39a58ecd0..7ad63798689bd4ee601705802aeafd0e34cfbacc 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
@@ -12,6 +12,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/browser_with_test_window_test.h"
+#include "chrome/test/base/ui_test_utils.h"
#include "ui/views/controls/button/text_button.h"
typedef BrowserWithTestWindowTest BookmarkBarViewTest;
@@ -19,7 +20,7 @@ typedef BrowserWithTestWindowTest BookmarkBarViewTest;
// Verify that the apps shortcut is never visible without instant extended.
TEST_F(BookmarkBarViewTest, NoAppsShortcutWithoutInstantExtended) {
profile()->CreateBookmarkModel(true);
- profile()->BlockUntilBookmarkModelLoaded();
+ ui_test_utils::WaitForBookmarkModelToLoad(profile());
BookmarkBarView bookmark_bar_view(browser(), NULL);
bookmark_bar_view.set_owned_by_client();
EXPECT_FALSE(bookmark_bar_view.apps_page_shortcut_->visible());
@@ -56,7 +57,7 @@ class BookmarkBarViewInstantExtendedTest : public BrowserWithTestWindowTest {
// button properly follows the pref value.
TEST_F(BookmarkBarViewInstantExtendedTest, AppsShortcutVisibility) {
profile()->CreateBookmarkModel(true);
- profile()->BlockUntilBookmarkModelLoaded();
+ ui_test_utils::WaitForBookmarkModelToLoad(profile());
BookmarkBarView bookmark_bar_view(browser(), NULL);
bookmark_bar_view.set_owned_by_client();
browser()->profile()->GetPrefs()->SetBoolean(

Powered by Google App Engine
This is Rietveld 408576698