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

Side by Side Diff: tools/testing/dart/browser_controller.dart

Issue 16168005: Remove hack for android resources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 library browser; 4 library browser;
5 5
6 import "dart:async"; 6 import "dart:async";
7 import "dart:core"; 7 import "dart:core";
8 import "dart:io"; 8 import "dart:io";
9 9
10 import 'android.dart'; 10 import 'android.dart';
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 AndroidChrome(this._adbDevice); 335 AndroidChrome(this._adbDevice);
336 336
337 Future<bool> start(String url) { 337 Future<bool> start(String url) {
338 var browserIntent = new Intent( 338 var browserIntent = new Intent(
339 viewAction, browserPackage, '.BrowserActivity', url); 339 viewAction, browserPackage, '.BrowserActivity', url);
340 var chromeIntent = new Intent(viewAction, chromePackage, '.Main', url); 340 var chromeIntent = new Intent(viewAction, chromePackage, '.Main', url);
341 var firefoxIntent = new Intent(viewAction, firefoxPackage, '.App', url); 341 var firefoxIntent = new Intent(viewAction, firefoxPackage, '.App', url);
342 var turnScreenOnIntent = 342 var turnScreenOnIntent =
343 new Intent(mainAction, turnScreenOnPackage, '.Main'); 343 new Intent(mainAction, turnScreenOnPackage, '.Main');
344 344
345 // FIXME(kustermann): Remove this hack as soon as we've got a v8 mirror in
346 // golo
347 var testing_resources_dir = 345 var testing_resources_dir =
348 new Path('third_party/android_testing_resources'); 346 new Path('third_party/android_testing_resources');
349 var testing_resources_dir_tmp =
350 new Path('/tmp/android_testing_resources');
351 if (!new Directory.fromPath(testing_resources_dir).existsSync()) { 347 if (!new Directory.fromPath(testing_resources_dir).existsSync()) {
352 DebugLogger.warning("$testing_resources_dir doesn't exist, " 348 DebugLogger.error("$testing_resources_dir doesn't exist. Exiting now.");
353 "trying to use $testing_resources_dir_tmp"); 349 exit(1);
354 testing_resources_dir = testing_resources_dir_tmp;
355 if (!new Directory.fromPath(testing_resources_dir).existsSync()) {
356 DebugLogger.error("$testing_resources_dir_tmp doesn't exist either. "
357 " This is a fatal error. Exiting now.");
358 exit(1);
359 }
360 } 350 }
361 351
362 var chromeAPK = testing_resources_dir.append('com.android.chrome-1.apk'); 352 var chromeAPK = testing_resources_dir.append('com.android.chrome-1.apk');
363 var turnScreenOnAPK = testing_resources_dir.append('TurnScreenOn.apk'); 353 var turnScreenOnAPK = testing_resources_dir.append('TurnScreenOn.apk');
364 var chromeConfDir = testing_resources_dir.append('chrome_configuration'); 354 var chromeConfDir = testing_resources_dir.append('chrome_configuration');
365 var chromeConfDirRemote = new Path('/data/user/0/com.android.chrome/'); 355 var chromeConfDirRemote = new Path('/data/user/0/com.android.chrome/');
366 356
367 return _adbDevice.waitForBootCompleted().then((_) { 357 return _adbDevice.waitForBootCompleted().then((_) {
368 return _adbDevice.forceStop(chromeIntent.package); 358 return _adbDevice.forceStop(chromeIntent.package);
369 }).then((_) { 359 }).then((_) {
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 </script> 928 </script>
939 </head> 929 </head>
940 <body> 930 <body>
941 Dart test driver, number of tests: <div id="number"></div> 931 Dart test driver, number of tests: <div id="number"></div>
942 </body> 932 </body>
943 </html> 933 </html>
944 """; 934 """;
945 return driverContent; 935 return driverContent;
946 } 936 }
947 } 937 }
OLDNEW
« 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