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

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

Issue 10388206: [sync] Add --port and --xmpp-port parameters to run_testserver.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 8 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 unified diff | Download patch
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_BASE_TEST_SERVER_H_ 5 #ifndef NET_TEST_BASE_TEST_SERVER_H_
6 #define NET_TEST_BASE_TEST_SERVER_H_ 6 #define NET_TEST_BASE_TEST_SERVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // whether it's available (server started) or not. 175 // whether it's available (server started) or not.
176 uint16 GetPort(); 176 uint16 GetPort();
177 177
178 // Sets |port| as the actual port used by Python based test server. 178 // Sets |port| as the actual port used by Python based test server.
179 void SetPort(uint16 port); 179 void SetPort(uint16 port);
180 180
181 // Set up internal status when the server is started. 181 // Set up internal status when the server is started.
182 bool SetupWhenServerStarted() WARN_UNUSED_RESULT; 182 bool SetupWhenServerStarted() WARN_UNUSED_RESULT;
183 183
184 // Clean up internal status when starting to stop server. 184 // Clean up internal status when starting to stop server.
185 void CleanUpWhenStoppingServer(); 185 virtual void CleanUpWhenStoppingServer();
Paweł Hajdan Jr. 2012/05/23 06:53:02 Please find a way to avoid making this virtual. On
Raghu Simha 2012/05/23 19:54:28 Done. The sync server is only started once in ev
186 186
187 // Set path of test resources. 187 // Set path of test resources.
188 void SetResourcePath(const FilePath& document_root, 188 void SetResourcePath(const FilePath& document_root,
189 const FilePath& certificates_dir); 189 const FilePath& certificates_dir);
190 190
191 // Parses the server data read from the test server. Returns true 191 // Parses the server data read from the test server. Returns true
192 // on success. 192 // on success.
193 bool ParseServerData(const std::string& server_data) WARN_UNUSED_RESULT; 193 bool ParseServerData(const std::string& server_data) WARN_UNUSED_RESULT;
194 194
195 // Generates a DictionaryValue with the arguments for launching the external 195 // Generates a DictionaryValue with the arguments for launching the external
196 // Python test server. 196 // Python test server.
197 bool GenerateArguments(base::DictionaryValue* arguments) const; 197 virtual bool GenerateArguments(base::DictionaryValue* arguments) const;
Paweł Hajdan Jr. 2012/05/23 06:53:02 Do not override this. See how LocalTestServer hand
Raghu Simha 2012/05/23 19:54:28 Done. There are two sets of arguments being strun
198 198
199 private: 199 private:
200 void Init(const std::string& host); 200 void Init(const std::string& host);
201 201
202 // Marks the root certificate of an HTTPS test server as trusted for 202 // Marks the root certificate of an HTTPS test server as trusted for
203 // the duration of tests. 203 // the duration of tests.
204 bool LoadTestRootCert() const WARN_UNUSED_RESULT; 204 bool LoadTestRootCert() const WARN_UNUSED_RESULT;
205 205
206 // Document root of the test server. 206 // Document root of the test server.
207 FilePath document_root_; 207 FilePath document_root_;
(...skipping 20 matching lines...) Expand all
228 228
229 scoped_ptr<ScopedPortException> allowed_port_; 229 scoped_ptr<ScopedPortException> allowed_port_;
230 230
231 DISALLOW_COPY_AND_ASSIGN(BaseTestServer); 231 DISALLOW_COPY_AND_ASSIGN(BaseTestServer);
232 }; 232 };
233 233
234 } // namespace net 234 } // namespace net
235 235
236 #endif // NET_TEST_BASE_TEST_SERVER_H_ 236 #endif // NET_TEST_BASE_TEST_SERVER_H_
237 237
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698