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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 1839273002: Use /etc/hosts for URLRequestTest.FileTest on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed duplicate invocation Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 5c82c9a08cc79d6259c2f2d955104bc4b518008c..e60e6f9dfb77d67c52eeb107f616a9d3a7f24a69 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -832,7 +832,15 @@ TEST_F(URLRequestTest, DataURLImageTest) {
#if !defined(DISABLE_FILE_SUPPORT)
TEST_F(URLRequestTest, FileTest) {
base::FilePath app_path;
+
+#if defined(OS_ANDROID)
+ // Android devices are not guaranteed to be able to read /proc/self/exe
+ // Use /etc/hosts instead
+ app_path = base::FilePath("/etc/hosts");
+#else
PathService::Get(base::FILE_EXE, &app_path);
+#endif // OS_ANDROID
+
GURL app_url = FilePathToFileURL(app_path);
TestDelegate d;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698