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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc

Issue 10827047: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
11 #include "chrome/browser/bookmarks/bookmark_model.h" 11 #include "chrome/browser/bookmarks/bookmark_model.h"
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
12 #include "chrome/browser/bookmarks/bookmark_utils.h" 13 #include "chrome/browser/bookmarks/bookmark_utils.h"
13 #include "chrome/browser/prefs/pref_service.h" 14 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_tabstrip.h" 17 #include "chrome/browser/ui/browser_tabstrip.h"
17 #include "chrome/browser/ui/browser_window.h" 18 #include "chrome/browser/ui/browser_window.h"
18 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 19 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
19 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/test_browser_window.h" 22 #include "chrome/test/base/test_browser_window.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(true); 173 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(true);
173 174
174 profile_.reset(new TestingProfile()); 175 profile_.reset(new TestingProfile());
175 profile_->CreateBookmarkModel(true); 176 profile_->CreateBookmarkModel(true);
176 profile_->BlockUntilBookmarkModelLoaded(); 177 profile_->BlockUntilBookmarkModelLoaded();
177 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); 178 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
178 179
179 browser_.reset( 180 browser_.reset(
180 chrome::CreateBrowserWithTestWindowForProfile(profile_.get())); 181 chrome::CreateBrowserWithTestWindowForProfile(profile_.get()));
181 182
182 model_ = profile_->GetBookmarkModel(); 183 model_ = BookmarkModelFactory::GetForProfile(profile_.get());
183 model_->ClearStore(); 184 model_->ClearStore();
184 185
185 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); 186 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL));
186 bb_view_->set_owned_by_client(); 187 bb_view_->set_owned_by_client();
187 bb_view_->SetPageNavigator(&navigator_); 188 bb_view_->SetPageNavigator(&navigator_);
188 189
189 AddTestData(CreateBigMenu()); 190 AddTestData(CreateBigMenu());
190 191
191 // Calculate the preferred size so that one button doesn't fit, which 192 // Calculate the preferred size so that one button doesn't fit, which
192 // triggers the overflow button to appear. 193 // triggers the overflow button to appear.
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 Done(); 1711 Done();
1711 } 1712 }
1712 }; 1713 };
1713 1714
1714 #if defined(OS_WIN) 1715 #if defined(OS_WIN)
1715 #define MAYBE_BookmarkBarViewTest19_SiblingMenu DISABLED_SiblingMenu 1716 #define MAYBE_BookmarkBarViewTest19_SiblingMenu DISABLED_SiblingMenu
1716 #else 1717 #else
1717 #define MAYBE_BookmarkBarViewTest19_SiblingMenu SiblingMenu 1718 #define MAYBE_BookmarkBarViewTest19_SiblingMenu SiblingMenu
1718 #endif 1719 #endif
1719 VIEW_TEST(BookmarkBarViewTest19, MAYBE_BookmarkBarViewTest19_SiblingMenu) 1720 VIEW_TEST(BookmarkBarViewTest19, MAYBE_BookmarkBarViewTest19_SiblingMenu)
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698