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

Unified Diff: tools/testing/dart/browser_controller.dart

Issue 15862002: Search for android testing resources in third_party and /tmp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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: tools/testing/dart/browser_controller.dart
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 88ebb611a1338f9fd7ddd18c93fe0681ad081340..ceacebc9ed5ee2c578a5b9588a2c407f1e446a70 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -8,6 +8,7 @@ import "dart:core";
import "dart:io";
import 'android.dart';
+import 'utils.dart';
/** Class describing the interface for communicating with browsers. */
abstract class Browser {
@@ -236,14 +237,27 @@ class AndroidChrome extends Browser {
var turnScreenOnIntent =
new Intent(mainAction, turnScreenOnPackage, '.Main');
- var chromeAPK = new Path(
- 'third_party/android_testing_resources/com.android.chrome-1.apk');
- var turnScreenOnAPK = new Path(
- 'third_party/android_testing_resources/TurnScreenOn.apk');
- var chromeConfDir = new Path(
- 'third_party/android_testing_resources/chrome_configuration');
- var chromeConfDirRemote = new Path(
- '/data/user/0/com.android.chrome/');
+ // FIXME(kustermann): Remove this hack as soon as we've got a v8 mirror in
+ // golo
+ var testing_resources_dir =
+ new Path('third_party/android_testing_resources');
+ var testing_resources_dir_tmp =
+ new Path('/tmp/android_testing_resources');
+ if (!new Directory.fromPath(testing_resources_dir).existsSync()) {
+ DebugLogger.warning("$testing_resources_dir doesn't exist, "
+ "trying to use $testing_resources_dir_tmp");
+ testing_resources_dir = testing_resources_dir_tmp;
+ if (!new Directory.fromPath(testing_resources_dir).existsSync()) {
+ DebugLogger.error("$testing_resources_dir_tmp doesn't exist either. "
+ " This is a fatal error. Exiting now.");
+ exit(1);
+ }
+ }
+
+ var chromeAPK = testing_resources_dir.append('com.android.chrome-1.apk');
+ var turnScreenOnAPK = testing_resources_dir.append('TurnScreenOn.apk');
+ var chromeConfDir = testing_resources_dir.append('chrome_configuration');
+ var chromeConfDirRemote = new Path('/data/user/0/com.android.chrome/');
return _adbDevice.waitForBootCompleted().then((_) {
return _adbDevice.forceStop(chromeIntent.package);
« 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