| 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);
|
|
|