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

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

Issue 10986042: Fix the failed cases in URLFetcherFileTest on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move GetDocumentRoot to test server Created 8 years, 2 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 #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/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return false; 176 return false;
177 SetPort(test_server_port); 177 SetPort(test_server_port);
178 178
179 SetResourcePath(document_root, FilePath().AppendASCII("net") 179 SetResourcePath(document_root, FilePath().AppendASCII("net")
180 .AppendASCII("data") 180 .AppendASCII("data")
181 .AppendASCII("ssl") 181 .AppendASCII("ssl")
182 .AppendASCII("certificates")); 182 .AppendASCII("certificates"));
183 return true; 183 return true;
184 } 184 }
185 185
186 // On Android, the document root in device is not the same as the document root
187 // in host machine where test server is launched. So append DIR_SOURCE_ROOT
wtc 2012/10/23 18:28:31 1. This method should be defined between Stop() an
Shouqun Liu 2012/10/24 02:32:47 Done.
188 // here to get the actual path of document root on Android device.
189 FilePath RemoteTestServer::GetDocumentRoot() const {
190 FilePath src_dir;
191 PathService::Get(base::DIR_SOURCE_ROOT, &src_dir);
192 return src_dir.Append(document_root());
193 }
194
186 } // namespace net 195 } // namespace net
187 196
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698