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

Unified Diff: content/test/content_browser_test.cc

Issue 8137012: Make an empty content browser test work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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: content/test/content_browser_test.cc
===================================================================
--- content/test/content_browser_test.cc (revision 103728)
+++ content/test/content_browser_test.cc (working copy)
@@ -7,6 +7,7 @@
#include "base/debug/stack_trace.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/message_loop.h"
+#include "content/shell/shell_main_delegate.h"
#include "content/test/test_content_client.h"
ContentBrowserTest::ContentBrowserTest() {
@@ -17,23 +18,16 @@
void ContentBrowserTest::SetUp() {
DCHECK(!content::GetContentClient());
- content_client_.reset(new TestContentClient);
- content::SetContentClient(content_client_.get());
+ shell_main_delegate_.reset(new ShellMainDelegate);
+ shell_main_delegate_->PreSandboxStartup();
- content_browser_client_.reset(new content::MockContentBrowserClient());
- content_client_->set_browser(content_browser_client_.get());
-
BrowserTestBase::SetUp();
}
void ContentBrowserTest::TearDown() {
BrowserTestBase::TearDown();
- DCHECK_EQ(content_client_.get(), content::GetContentClient());
- content::SetContentClient(NULL);
- content_client_.reset();
-
- content_browser_client_.reset();
+ shell_main_delegate_.reset();
}
#if defined(OS_POSIX)

Powered by Google App Engine
This is Rietveld 408576698