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

Unified Diff: chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc

Issue 7892007: Add ChromeRenderViewHostTestHarness to get rid of the dependency from RVHTH to profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 9 years, 3 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/tab_contents/test_tab_contents_wrapper.cc
diff --git a/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc
index 34f298530cadf8be11aa945be60f7a623e1f3122..26fcc08bf6df0a89a227796e4ae02e097d19cbbf 100644
--- a/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc
@@ -9,7 +9,7 @@
#include "content/browser/tab_contents/test_tab_contents.h"
TabContentsWrapperTestHarness::TabContentsWrapperTestHarness()
- : RenderViewHostTestHarness() {
+ : ChromeRenderViewHostTestHarness() {
}
TabContentsWrapperTestHarness::~TabContentsWrapperTestHarness() {
@@ -29,6 +29,8 @@ void TabContentsWrapperTestHarness::SetContents(TestTabContents* contents) {
}
void TabContentsWrapperTestHarness::SetUp() {
+ if (!browser_context_.get())
+ browser_context_.reset(new TestingProfile());
SetContents(CreateTestTabContents());
}
@@ -36,10 +38,10 @@ void TabContentsWrapperTestHarness::TearDown() {
contents_wrapper_.reset();
// Make sure that we flush any messages related to TabContents destruction
- // before we destroy the profile.
+ // before we destroy the browser context.
MessageLoop::current()->RunAllPending();
- // Release the profile on the UI thread.
- message_loop_.DeleteSoon(FROM_HERE, profile_.release());
+ // Release the browser context on the UI thread.
+ message_loop_.DeleteSoon(FROM_HERE, browser_context_.release());
message_loop_.RunAllPending();
}

Powered by Google App Engine
This is Rietveld 408576698