OLD | NEW |
---|---|
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 #include "net/test/remote_test_server.h" | 5 #include "net/test/remote_test_server.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // To reduce the running time of tests, tests may be sharded across several | 25 // To reduce the running time of tests, tests may be sharded across several |
26 // devices. This means that it may be necessary to support multiple instances | 26 // devices. This means that it may be necessary to support multiple instances |
27 // of the test server spawner and the Python test server simultaneously on the | 27 // of the test server spawner and the Python test server simultaneously on the |
28 // same host. Each pair of (test server spawner, Python test server) correspond | 28 // same host. Each pair of (test server spawner, Python test server) correspond |
29 // to a single testing device. | 29 // to a single testing device. |
30 // The mapping between the test server spawner and the individual Python test | 30 // The mapping between the test server spawner and the individual Python test |
31 // servers is written to a file on the device prior to executing any tests. | 31 // servers is written to a file on the device prior to executing any tests. |
32 const char kTestServerPortInfoFile[] = "/data/local/tmp/net-test-server-ports"; | 32 const char kTestServerPortInfoFile[] = "/sdcard/net-test-server-ports"; |
Ryan Sleevi
2012/08/30 02:49:03
Is there a reason this doesn't make use of base_pa
nilesh
2012/08/30 17:21:55
Done.
| |
33 | 33 |
34 // Please keep it sync with dictionary SERVER_TYPES in testserver.py | 34 // Please keep it sync with dictionary SERVER_TYPES in testserver.py |
35 std::string GetServerTypeString(BaseTestServer::Type type) { | 35 std::string GetServerTypeString(BaseTestServer::Type type) { |
36 switch (type) { | 36 switch (type) { |
37 case BaseTestServer::TYPE_FTP: | 37 case BaseTestServer::TYPE_FTP: |
38 return "ftp"; | 38 return "ftp"; |
39 case BaseTestServer::TYPE_GDATA: | 39 case BaseTestServer::TYPE_GDATA: |
40 case BaseTestServer::TYPE_HTTP: | 40 case BaseTestServer::TYPE_HTTP: |
41 case BaseTestServer::TYPE_HTTPS: | 41 case BaseTestServer::TYPE_HTTPS: |
42 return "http"; | 42 return "http"; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 | 165 |
166 SetResourcePath(document_root, FilePath().AppendASCII("net") | 166 SetResourcePath(document_root, FilePath().AppendASCII("net") |
167 .AppendASCII("data") | 167 .AppendASCII("data") |
168 .AppendASCII("ssl") | 168 .AppendASCII("ssl") |
169 .AppendASCII("certificates")); | 169 .AppendASCII("certificates")); |
170 return true; | 170 return true; |
171 } | 171 } |
172 | 172 |
173 } // namespace net | 173 } // namespace net |
174 | 174 |
OLD | NEW |