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

Unified Diff: net/test/local_test_server.h

Issue 10073033: Run safebrowsing_service_test through the net testserver code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
« no previous file with comments | « net/test/local_sync_test_server.cc ('k') | net/test/local_test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/local_test_server.h
diff --git a/net/test/local_test_server.h b/net/test/local_test_server.h
index 26636687ccc34718344caa5f58d4d5ba231e7d2a..bf2579c0d3ea788b4684efbca1c99b0dff3fb175 100644
--- a/net/test/local_test_server.h
+++ b/net/test/local_test_server.h
@@ -43,15 +43,26 @@ class LocalTestServer : public BaseTestServer {
bool Stop();
// Modify PYTHONPATH to contain libraries we need.
- static bool SetPythonPath() WARN_UNUSED_RESULT;
+ virtual bool SetPythonPath() const WARN_UNUSED_RESULT;
+
+ // This is a static version so that RunSyncTest in run_testserver.py can use
+ // it.
+ // TODO(mattm): We should refactor that so this isn't necessary.
+ static bool SetPythonPathStatic() WARN_UNUSED_RESULT;
// Returns true if successfully stored the FilePath for the directory of the
// testserver python script in |*directory|.
static bool GetTestServerDirectory(FilePath* directory) WARN_UNUSED_RESULT;
+ // Returns true if successfully stored the FilePath for the testserver python
+ // script in |*testserver_path|.
+ virtual bool GetTestServerPath(FilePath* testserver_path) const
+ WARN_UNUSED_RESULT;
+
// Adds the command line arguments for the Python test server to
// |command_line|. Returns true on success.
- virtual bool AddCommandLineArguments(CommandLine* command_line) const;
+ virtual bool AddCommandLineArguments(CommandLine* command_line) const
+ WARN_UNUSED_RESULT;
private:
bool Init(const FilePath& document_root);
@@ -62,6 +73,11 @@ class LocalTestServer : public BaseTestServer {
// Waits for the server to start. Returns true on success.
bool WaitToStart() WARN_UNUSED_RESULT;
+ // Adds the Python command line arguments and test server path to
+ // |command_line|.
+ void AddPythonArguments(const FilePath& testserver_path,
+ CommandLine* command_line) const;
+
// Handle of the Python process running the test server.
base::ProcessHandle process_handle_;
« no previous file with comments | « net/test/local_sync_test_server.cc ('k') | net/test/local_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698