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

Side by Side Diff: net/test/base_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | net/test/base_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_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 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // Set path of test resources. 199 // Set path of test resources.
200 void SetResourcePath(const FilePath& document_root, 200 void SetResourcePath(const FilePath& document_root,
201 const FilePath& certificates_dir); 201 const FilePath& certificates_dir);
202 202
203 // Parses the server data read from the test server. Returns true 203 // Parses the server data read from the test server. Returns true
204 // on success. 204 // on success.
205 bool ParseServerData(const std::string& server_data) WARN_UNUSED_RESULT; 205 bool ParseServerData(const std::string& server_data) WARN_UNUSED_RESULT;
206 206
207 // Generates a DictionaryValue with the arguments for launching the external 207 // Generates a DictionaryValue with the arguments for launching the external
208 // Python test server. 208 // Python test server.
209 bool GenerateArguments(base::DictionaryValue* arguments) const; 209 bool GenerateArguments(base::DictionaryValue* arguments) const
210 WARN_UNUSED_RESULT;
211
212 // Subclasses can override this to add arguments that are specific to their
213 // own test servers.
214 virtual bool GenerateAdditionalArguments(
215 base::DictionaryValue* arguments) const WARN_UNUSED_RESULT;
210 216
211 private: 217 private:
212 void Init(const std::string& host); 218 void Init(const std::string& host);
213 219
214 // Marks the root certificate of an HTTPS test server as trusted for 220 // Marks the root certificate of an HTTPS test server as trusted for
215 // the duration of tests. 221 // the duration of tests.
216 bool LoadTestRootCert() const WARN_UNUSED_RESULT; 222 bool LoadTestRootCert() const WARN_UNUSED_RESULT;
217 223
218 // Document root of the test server. 224 // Document root of the test server.
219 FilePath document_root_; 225 FilePath document_root_;
(...skipping 21 matching lines...) Expand all
241 247
242 scoped_ptr<ScopedPortException> allowed_port_; 248 scoped_ptr<ScopedPortException> allowed_port_;
243 249
244 DISALLOW_COPY_AND_ASSIGN(BaseTestServer); 250 DISALLOW_COPY_AND_ASSIGN(BaseTestServer);
245 }; 251 };
246 252
247 } // namespace net 253 } // namespace net
248 254
249 #endif // NET_TEST_BASE_TEST_SERVER_H_ 255 #endif // NET_TEST_BASE_TEST_SERVER_H_
250 256
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | net/test/base_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698