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

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

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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_utils.h" 12 #include "chrome/browser/bookmarks/bookmark_utils.h"
13 #include "chrome/browser/prefs/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_tabstrip.h" 16 #include "chrome/browser/ui/browser_tabstrip.h"
17 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
18 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 18 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
19 #include "chrome/common/chrome_notification_types.h" 19 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/test_browser_window.h"
21 #include "chrome/test/base/testing_browser_process.h" 22 #include "chrome/test/base/testing_browser_process.h"
22 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
23 #include "chrome/test/base/ui_test_utils.h" 24 #include "chrome/test/base/ui_test_utils.h"
24 #include "chrome/test/base/view_event_test_base.h" 25 #include "chrome/test/base/view_event_test_base.h"
25 #include "content/public/browser/notification_service.h" 26 #include "content/public/browser/notification_service.h"
26 #include "content/public/browser/page_navigator.h" 27 #include "content/public/browser/page_navigator.h"
27 #include "content/public/test/test_browser_thread.h" 28 #include "content/public/test/test_browser_thread.h"
28 #include "grit/generated_resources.h" 29 #include "grit/generated_resources.h"
29 #include "ui/base/accessibility/accessibility_types.h" 30 #include "ui/base/accessibility/accessibility_types.h"
30 #include "ui/base/clipboard/clipboard.h" 31 #include "ui/base/clipboard/clipboard.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 169 }
169 170
170 virtual void SetUp() { 171 virtual void SetUp() {
171 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(true); 172 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(true);
172 173
173 profile_.reset(new TestingProfile()); 174 profile_.reset(new TestingProfile());
174 profile_->CreateBookmarkModel(true); 175 profile_->CreateBookmarkModel(true);
175 profile_->BlockUntilBookmarkModelLoaded(); 176 profile_->BlockUntilBookmarkModelLoaded();
176 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); 177 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
177 178
178 browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get())); 179 browser_.reset(
180 chrome::CreateBrowserWithTestWindowForProfile(profile_.get()));
179 181
180 model_ = profile_->GetBookmarkModel(); 182 model_ = profile_->GetBookmarkModel();
181 model_->ClearStore(); 183 model_->ClearStore();
182 184
183 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); 185 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL));
184 bb_view_->set_owned_by_client(); 186 bb_view_->set_owned_by_client();
185 bb_view_->SetPageNavigator(&navigator_); 187 bb_view_->SetPageNavigator(&navigator_);
186 188
187 AddTestData(CreateBigMenu()); 189 AddTestData(CreateBigMenu());
188 190
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 Done(); 1710 Done();
1709 } 1711 }
1710 }; 1712 };
1711 1713
1712 #if defined(OS_WIN) 1714 #if defined(OS_WIN)
1713 #define MAYBE_BookmarkBarViewTest19_SiblingMenu DISABLED_SiblingMenu 1715 #define MAYBE_BookmarkBarViewTest19_SiblingMenu DISABLED_SiblingMenu
1714 #else 1716 #else
1715 #define MAYBE_BookmarkBarViewTest19_SiblingMenu SiblingMenu 1717 #define MAYBE_BookmarkBarViewTest19_SiblingMenu SiblingMenu
1716 #endif 1718 #endif
1717 VIEW_TEST(BookmarkBarViewTest19, MAYBE_BookmarkBarViewTest19_SiblingMenu) 1719 VIEW_TEST(BookmarkBarViewTest19, MAYBE_BookmarkBarViewTest19_SiblingMenu)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698