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

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

Issue 10878003: Refactoring for merging WebSocket test server to net::TestServer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5 Created 8 years, 4 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
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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 11 matching lines...) Expand all
22 // The LocalTestServer runs an external Python-based test server in the 22 // The LocalTestServer runs an external Python-based test server in the
23 // same machine in which the LocalTestServer runs. 23 // same machine in which the LocalTestServer runs.
24 class LocalTestServer : public BaseTestServer { 24 class LocalTestServer : public BaseTestServer {
25 public: 25 public:
26 // Initialize a TestServer listening on a specific host (IP or hostname). 26 // Initialize a TestServer listening on a specific host (IP or hostname).
27 // |document_root| must be a relative path under the root tree. 27 // |document_root| must be a relative path under the root tree.
28 LocalTestServer(Type type, 28 LocalTestServer(Type type,
29 const std::string& host, 29 const std::string& host,
30 const FilePath& document_root); 30 const FilePath& document_root);
31 31
32 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. 32 // Initialize a TestServer with a specific set of SSLOptions.
33 // |document_root| must be a relative path under the root tree. 33 // |document_root| must be a relative path under the root tree.
34 LocalTestServer(const HTTPSOptions& https_options, 34 LocalTestServer(Type type,
35 const SSLOptions& ssl_options,
35 const FilePath& document_root); 36 const FilePath& document_root);
36 37
37 virtual ~LocalTestServer(); 38 virtual ~LocalTestServer();
38 39
39 bool Start() WARN_UNUSED_RESULT; 40 bool Start() WARN_UNUSED_RESULT;
40 41
41 // Stop the server started by Start(). 42 // Stop the server started by Start().
42 bool Stop(); 43 bool Stop();
43 44
44 // Modify PYTHONPATH to contain libraries we need. 45 // Modify PYTHONPATH to contain libraries we need.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 int child_fd_; 81 int child_fd_;
81 file_util::ScopedFD child_fd_closer_; 82 file_util::ScopedFD child_fd_closer_;
82 #endif 83 #endif
83 84
84 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); 85 DISALLOW_COPY_AND_ASSIGN(LocalTestServer);
85 }; 86 };
86 87
87 } // namespace net 88 } // namespace net
88 89
89 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ 90 #endif // NET_TEST_LOCAL_TEST_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698