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

Unified Diff: content/public/test/browser_test_base.cc

Issue 14914010: GTTF: Convert WebContentsImplBrowserTest to use EmbeddedTestServer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | « content/public/test/browser_test_base.h ('k') | content/test/content_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_base.cc
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index e89c28cc4519bf887d99f79ee383e4528e4c1824..66918ab1679ab56a341db812b493879d2a8a6ca6 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -13,6 +13,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/test/test_utils.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
@@ -57,7 +58,10 @@ void RunTaskOnRendererThread(const base::Closure& task,
extern int BrowserMain(const MainFunctionParams&);
-BrowserTestBase::BrowserTestBase() {
+BrowserTestBase::BrowserTestBase()
+ : embedded_test_server_(
+ new net::test_server::EmbeddedTestServer(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))) {
#if defined(OS_MACOSX)
base::mac::SetOverrideAmIBundled(true);
base::PowerMonitor::AllocateSystemIOPorts();
@@ -118,6 +122,7 @@ void BrowserTestBase::ProxyRunTestOnMainThreadLoop() {
}
#endif // defined(OS_POSIX)
RunTestOnMainThreadLoop();
+ embedded_test_server_.reset();
}
void BrowserTestBase::CreateTestServer(const base::FilePath& test_server_base) {
« no previous file with comments | « content/public/test/browser_test_base.h ('k') | content/test/content_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698