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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 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_test.cc
===================================================================
--- chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc (revision 257432)
+++ chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/bookmark_test_helpers.h"
+#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
@@ -20,6 +21,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
+#include "chrome/common/chrome_content_client.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/scoped_testing_local_state.h"
@@ -118,6 +120,11 @@
model_(NULL) {}
virtual void SetUp() OVERRIDE {
+ content_client_.reset(new ChromeContentClient);
+ content::SetContentClient(content_client_.get());
+ browser_content_client_.reset(new chrome::ChromeContentBrowserClient());
+ content::SetBrowserClientForTesting(browser_content_client_.get());
+
views::MenuController::TurnOffMenuSelectionHoldForTest();
BookmarkBarView::DisableAnimationsForTesting(true);
@@ -185,6 +192,10 @@
ViewEventTestBase::TearDown();
BookmarkBarView::DisableAnimationsForTesting(false);
+
+ browser_content_client_.reset();
+ content_client_.reset();
+ content::SetContentClient(NULL);
}
protected:
@@ -239,6 +250,8 @@
}
gfx::Size bb_view_pref_;
+ scoped_ptr<ChromeContentClient> content_client_;
+ scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_;
scoped_ptr<TestingProfile> profile_;
scoped_ptr<Browser> browser_;
scoped_ptr<ScopedTestingLocalState> local_state_;
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698