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

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

Issue 408063002: android tests: don't override DIR_MODULE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: url_fixer fix 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 }
146 case base::DIR_ANDROID_APP_DATA: { 143 case base::DIR_ANDROID_APP_DATA: {
147 // For tests, app data is put in external storage. 144 // For tests, app data is put in external storage.
148 return base::android::GetExternalStorageDirectory(result); 145 return base::android::GetExternalStorageDirectory(result);
149 } 146 }
150 default: 147 default:
151 return false; 148 return false;
152 } 149 }
153 } 150 }
154 151
155 void InitPathProvider(int key) { 152 void InitPathProvider(int key) {
(...skipping 27 matching lines...) Expand all
183 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub)) 180 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub))
184 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override."; 181 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override.";
185 } 182 }
186 183
187 void InitAndroidTest() { 184 void InitAndroidTest() {
188 InitAndroidTestLogging(); 185 InitAndroidTestLogging();
189 InitAndroidTestPaths(); 186 InitAndroidTestPaths();
190 InitAndroidTestMessageLoop(); 187 InitAndroidTestMessageLoop();
191 } 188 }
192 } // namespace base 189 } // 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