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

Side by Side Diff: net/test/local_test_server.h

Issue 9545019: Add "run_testserver --sync-test" for easy chromiumsync_test.py launching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert a few files Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/test/local_test_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TEST_LOCAL_TEST_SERVER_H_ 5 #ifndef NET_TEST_LOCAL_TEST_SERVER_H_
6 #define NET_TEST_LOCAL_TEST_SERVER_H_ 6 #define NET_TEST_LOCAL_TEST_SERVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 24 matching lines...) Expand all
35 LocalTestServer(const HTTPSOptions& https_options, 35 LocalTestServer(const HTTPSOptions& https_options,
36 const FilePath& document_root); 36 const FilePath& document_root);
37 37
38 ~LocalTestServer(); 38 ~LocalTestServer();
39 39
40 bool Start() WARN_UNUSED_RESULT; 40 bool Start() WARN_UNUSED_RESULT;
41 41
42 // Stop the server started by Start(). 42 // Stop the server started by Start().
43 bool Stop(); 43 bool Stop();
44 44
45 // Modify PYTHONPATH to contain libraries we need.
46 static bool SetPythonPath() WARN_UNUSED_RESULT;
47
48 // Returns true if successfully stored the FilePath for the directory of the
49 // testserver python script in |*directory|.
50 static bool GetTestServerDirectory(FilePath* directory) WARN_UNUSED_RESULT;
51
45 private: 52 private:
46 bool Init(const FilePath& document_root); 53 bool Init(const FilePath& document_root);
47 54
48 // Modify PYTHONPATH to contain libraries we need.
49 bool SetPythonPath() const WARN_UNUSED_RESULT;
50
51 // Launches the Python test server. Returns true on success. 55 // Launches the Python test server. Returns true on success.
52 bool LaunchPython(const FilePath& testserver_path) WARN_UNUSED_RESULT; 56 bool LaunchPython(const FilePath& testserver_path) WARN_UNUSED_RESULT;
53 57
54 // Waits for the server to start. Returns true on success. 58 // Waits for the server to start. Returns true on success.
55 bool WaitToStart() WARN_UNUSED_RESULT; 59 bool WaitToStart() WARN_UNUSED_RESULT;
56 60
57 // Add the command line arguments for the Python test server to 61 // Add the command line arguments for the Python test server to
58 // |command_line|. Return true on success. 62 // |command_line|. Return true on success.
59 bool AddCommandLineArguments(CommandLine* command_line) const; 63 bool AddCommandLineArguments(CommandLine* command_line) const;
60 64
(...skipping 16 matching lines...) Expand all
77 int child_fd_; 81 int child_fd_;
78 file_util::ScopedFD child_fd_closer_; 82 file_util::ScopedFD child_fd_closer_;
79 #endif 83 #endif
80 84
81 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); 85 DISALLOW_COPY_AND_ASSIGN(LocalTestServer);
82 }; 86 };
83 87
84 } // namespace net 88 } // namespace net
85 89
86 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ 90 #endif // NET_TEST_LOCAL_TEST_SERVER_H_
87
OLDNEW
« no previous file with comments | « no previous file | net/test/local_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698