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

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

Issue 10986042: Fix the failed cases in URLFetcherFileTest on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: refine the patch with nits fixed Created 8 years, 1 month 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
« no previous file with comments | « net/test/local_test_server.h ('k') | net/test/remote_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_REMOTE_TEST_SERVER_H_ 5 #ifndef NET_TEST_REMOTE_TEST_SERVER_H_
6 #define NET_TEST_REMOTE_TEST_SERVER_H_ 6 #define NET_TEST_REMOTE_TEST_SERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/test/base_test_server.h" 10 #include "net/test/base_test_server.h"
(...skipping 19 matching lines...) Expand all
30 const FilePath& document_root); 30 const FilePath& document_root);
31 31
32 virtual ~RemoteTestServer(); 32 virtual ~RemoteTestServer();
33 33
34 // Starts the Python test server on the host, instead of on the device. 34 // Starts the Python test server on the host, instead of on the device.
35 bool Start() WARN_UNUSED_RESULT; 35 bool Start() WARN_UNUSED_RESULT;
36 36
37 // Stops the Python test server that is running on the host machine. 37 // Stops the Python test server that is running on the host machine.
38 bool Stop(); 38 bool Stop();
39 39
40 // Returns the actual path of document root for the test cases. This function
41 // should be called by test cases to retrieve the actual document root path
42 // on the Android device, otherwise document_root() function is used to get
43 // the document root.
44 FilePath GetDocumentRoot() const;
45
40 private: 46 private:
41 bool Init(const FilePath& document_root); 47 bool Init(const FilePath& document_root);
42 48
43 // The local port used to communicate with the TestServer spawner. This is 49 // The local port used to communicate with the TestServer spawner. This is
44 // used to control the startup and shutdown of the Python TestServer running 50 // used to control the startup and shutdown of the Python TestServer running
45 // on the remote machine. On Android, this port will be redirected to the 51 // on the remote machine. On Android, this port will be redirected to the
46 // same port on the host machine. 52 // same port on the host machine.
47 int spawner_server_port_; 53 int spawner_server_port_;
48 54
49 // Helper to start and stop instances of the Python test server that runs on 55 // Helper to start and stop instances of the Python test server that runs on
50 // the host machine. 56 // the host machine.
51 scoped_ptr<SpawnerCommunicator> spawner_communicator_; 57 scoped_ptr<SpawnerCommunicator> spawner_communicator_;
52 58
53 DISALLOW_COPY_AND_ASSIGN(RemoteTestServer); 59 DISALLOW_COPY_AND_ASSIGN(RemoteTestServer);
54 }; 60 };
55 61
56 } // namespace net 62 } // namespace net
57 63
58 #endif // NET_TEST_REMOTE_TEST_SERVER_H_ 64 #endif // NET_TEST_REMOTE_TEST_SERVER_H_
59 65
OLDNEW
« no previous file with comments | « net/test/local_test_server.h ('k') | net/test/remote_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698