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

Side by Side Diff: net/test/local_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 | « build/android/pylib/single_test_runner.py ('k') | net/test/remote_test_server.h » ('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_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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 static bool SetPythonPath() WARN_UNUSED_RESULT; 46 static bool SetPythonPath() WARN_UNUSED_RESULT;
47 47
48 // Returns true if successfully stored the FilePath for the directory of the 48 // Returns true if successfully stored the FilePath for the directory of the
49 // testserver python script in |*directory|. 49 // testserver python script in |*directory|.
50 static bool GetTestServerDirectory(FilePath* directory) WARN_UNUSED_RESULT; 50 static bool GetTestServerDirectory(FilePath* directory) WARN_UNUSED_RESULT;
51 51
52 // Adds the command line arguments for the Python test server to 52 // Adds the command line arguments for the Python test server to
53 // |command_line|. Returns true on success. 53 // |command_line|. Returns true on success.
54 virtual bool AddCommandLineArguments(CommandLine* command_line) const; 54 virtual bool AddCommandLineArguments(CommandLine* command_line) const;
55 55
56 // Returns the actual path of document root for test cases. This function
57 // should be called by test cases to retrieve the actual document root path.
58 FilePath GetDocumentRoot() const { return document_root(); };
59
56 private: 60 private:
57 bool Init(const FilePath& document_root); 61 bool Init(const FilePath& document_root);
58 62
59 // Launches the Python test server. Returns true on success. 63 // Launches the Python test server. Returns true on success.
60 bool LaunchPython(const FilePath& testserver_path) WARN_UNUSED_RESULT; 64 bool LaunchPython(const FilePath& testserver_path) WARN_UNUSED_RESULT;
61 65
62 // Waits for the server to start. Returns true on success. 66 // Waits for the server to start. Returns true on success.
63 bool WaitToStart() WARN_UNUSED_RESULT; 67 bool WaitToStart() WARN_UNUSED_RESULT;
64 68
65 // Handle of the Python process running the test server. 69 // Handle of the Python process running the test server.
(...skipping 15 matching lines...) Expand all
81 int child_fd_; 85 int child_fd_;
82 file_util::ScopedFD child_fd_closer_; 86 file_util::ScopedFD child_fd_closer_;
83 #endif 87 #endif
84 88
85 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); 89 DISALLOW_COPY_AND_ASSIGN(LocalTestServer);
86 }; 90 };
87 91
88 } // namespace net 92 } // namespace net
89 93
90 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ 94 #endif // NET_TEST_LOCAL_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « build/android/pylib/single_test_runner.py ('k') | net/test/remote_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698