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

Unified Diff: content/test/browser_test_base.h

Issue 10820007: Move all the layout tests that ran under browser_tests to run under content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 5 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/browser_test_base.h
===================================================================
--- content/test/browser_test_base.h (revision 148205)
+++ content/test/browser_test_base.h (working copy)
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "net/test/test_server.h"
class CommandLine;
@@ -56,8 +57,23 @@
// (RunTestOnMainThread), quits the browsers and returns.
virtual void RunTestOnMainThreadLoop() = 0;
+ // Returns the testing server. Guaranteed to be non-NULL.
+ const net::TestServer* test_server() const { return test_server_.get(); }
+ net::TestServer* test_server() { return test_server_.get(); }
+
+ // This function is meant only for classes that directly derive from this
+ // class to construct the test server in their constructor. They might need to
+ // call this after setting up the paths. Actual test cases should never call
+ // this.
+ // |test_server_base| is the path, relative to src, to give to the test HTTP
+ // server.
+ void CreateTestServer(const char* test_server_base);
+
private:
void ProxyRunTestOnMainThreadLoop();
+
+ // Testing server, started on demand.
+ scoped_ptr<net::TestServer> test_server_;
};
#endif // CONTENT_TEST_BROWSER_TEST_BASE_H_

Powered by Google App Engine
This is Rietveld 408576698