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

Unified Diff: chrome/test/browser_with_test_window_test.cc

Issue 6681040: Prevent memory leak for ChromeContentBrowserClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Let ContentClient own browser client. Created 9 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
« no previous file with comments | « no previous file | content/common/content_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/browser_with_test_window_test.cc
diff --git a/chrome/test/browser_with_test_window_test.cc b/chrome/test/browser_with_test_window_test.cc
index d4ef1a3a2c67a22cad99709ee64a677e3a18a0f2..b98e256b965f731b5f1131ad51ba6d04ad319fec 100644
--- a/chrome/test/browser_with_test_window_test.cc
+++ b/chrome/test/browser_with_test_window_test.cc
@@ -8,6 +8,7 @@
#include <ole2.h>
#endif // defined(OS_WIN)
+#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
@@ -18,6 +19,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/common/content_client.h"
BrowserWithTestWindowTest::BrowserWithTestWindowTest()
: ui_thread_(BrowserThread::UI, message_loop()),
@@ -35,6 +37,8 @@ void BrowserWithTestWindowTest::SetUp() {
// NOTE: I have a feeling we're going to want virtual methods for creating
// these, as such they're in SetUp instead of the constructor.
profile_.reset(new TestingProfile());
+ content::GetContentClient()->set_browser_client(
+ new chrome::ChromeContentBrowserClient());
browser_.reset(new Browser(Browser::TYPE_NORMAL, profile()));
window_.reset(new TestBrowserWindow(browser()));
browser_->set_window(window_.get());
« no previous file with comments | « no previous file | content/common/content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698