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

Side by Side Diff: base/test/test_support_android.cc

Issue 417943002: Revert of android tests: don't override DIR_MODULE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/chrome_paths.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 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "base/android/path_utils.h" 8 #include "base/android/path_utils.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 }; 134 };
135 135
136 scoped_ptr<base::MessagePump> CreateMessagePumpForUIStub() { 136 scoped_ptr<base::MessagePump> CreateMessagePumpForUIStub() {
137 return scoped_ptr<base::MessagePump>(new MessagePumpForUIStub()); 137 return scoped_ptr<base::MessagePump>(new MessagePumpForUIStub());
138 }; 138 };
139 139
140 // Provides the test path for DIR_MODULE and DIR_ANDROID_APP_DATA. 140 // Provides the test path for DIR_MODULE and DIR_ANDROID_APP_DATA.
141 bool GetTestProviderPath(int key, base::FilePath* result) { 141 bool GetTestProviderPath(int key, base::FilePath* result) {
142 switch (key) { 142 switch (key) {
143 case base::DIR_MODULE: {
144 return base::android::GetExternalStorageDirectory(result);
145 }
143 case base::DIR_ANDROID_APP_DATA: { 146 case base::DIR_ANDROID_APP_DATA: {
144 // For tests, app data is put in external storage. 147 // For tests, app data is put in external storage.
145 return base::android::GetExternalStorageDirectory(result); 148 return base::android::GetExternalStorageDirectory(result);
146 } 149 }
147 default: 150 default:
148 return false; 151 return false;
149 } 152 }
150 } 153 }
151 154
152 void InitPathProvider(int key) { 155 void InitPathProvider(int key) {
(...skipping 27 matching lines...) Expand all
180 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub)) 183 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub))
181 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override."; 184 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override.";
182 } 185 }
183 186
184 void InitAndroidTest() { 187 void InitAndroidTest() {
185 InitAndroidTestLogging(); 188 InitAndroidTestLogging();
186 InitAndroidTestPaths(); 189 InitAndroidTestPaths();
187 InitAndroidTestMessageLoop(); 190 InitAndroidTestMessageLoop();
188 } 191 }
189 } // namespace base 192 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_paths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698