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

Unified Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm

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/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm (revision 257432)
+++ chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm (working copy)
@@ -8,11 +8,14 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/mac/scoped_nsobject.h"
+#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
+#include "chrome/common/chrome_content_client.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
+#include "chrome/test/base/chrome_unit_test_suite.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/common/media_stream_request.h"
@@ -49,9 +52,23 @@
ContentSettingBubbleController* CreateBubbleController(
ContentSettingsType settingsType);
+ virtual void SetUp() OVERRIDE {
+ ChromeUnitTestSuite::InitializeProviders();
+ ChromeUnitTestSuite::InitializeResourceBundle();
+ content_client_.reset(new ChromeContentClient);
+ content::SetContentClient(content_client_.get());
+ browser_content_client_.reset(new chrome::ChromeContentBrowserClient());
+ content::SetBrowserClientForTesting(browser_content_client_.get());
+ initializer_.reset(new TestingBrowserProcessInitializer);
+ ChromeRenderViewHostTestHarness::SetUp();
+ }
+
+ scoped_ptr<ChromeContentClient> content_client_;
+ scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_;
+
// This is a unit test running in the browser_tests suite, so we must create
// the TestingBrowserProcess manually. Must be first member.
- TestingBrowserProcessInitializer initializer_;
+ scoped_ptr<TestingBrowserProcessInitializer> initializer_;
base::scoped_nsobject<NSWindow> parent_;

Powered by Google App Engine
This is Rietveld 408576698