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

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

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
Index: content/public/test/browser_test_base.h
diff --git a/content/public/test/browser_test_base.h b/content/public/test/browser_test_base.h
index 952d3c9c3ebcc2106153a7696ba2868847cc5f42..414161ecdf7ea25f4fc82ce779803e66b8ed0b36 100644
--- a/content/public/test/browser_test_base.h
+++ b/content/public/test/browser_test_base.h
@@ -16,6 +16,12 @@ namespace base {
class FilePath;
}
+namespace net {
+namespace test_server {
+class EmbeddedTestServer;
+}
+}
+
namespace content {
class BrowserTestBase : public testing::Test {
@@ -64,11 +70,20 @@ class BrowserTestBase : public testing::Test {
virtual void RunTestOnMainThreadLoop() = 0;
// Returns the testing server. Guaranteed to be non-NULL.
+ // TODO(phajdan.jr): Remove test_server accessor (http://crbug.com/96594).
const net::SpawnedTestServer* test_server() const {
return test_server_.get();
}
net::SpawnedTestServer* test_server() { return test_server_.get(); }
+ // Returns the embedded test server. Guaranteed to be non-NULL.
+ const net::test_server::EmbeddedTestServer* embedded_test_server() const {
+ return embedded_test_server_.get();
+ }
+ net::test_server::EmbeddedTestServer* embedded_test_server() {
+ return embedded_test_server_.get();
+ }
+
#if defined(OS_POSIX)
// This is only needed by a test that raises SIGTERM to ensure that a specific
// codepath is taken.
@@ -96,6 +111,9 @@ class BrowserTestBase : public testing::Test {
// Testing server, started on demand.
scoped_ptr<net::SpawnedTestServer> test_server_;
+ // Embedded test server, cheap to create, started on demand.
+ scoped_ptr<net::test_server::EmbeddedTestServer> embedded_test_server_;
+
#if defined(OS_POSIX)
bool handle_sigterm_;
#endif
« no previous file with comments | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698