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

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

Issue 29773006: Changes to run tests on Dartium content shell on Android. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
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 4
5 library android; 5 library android;
6 6
7 import "dart:async"; 7 import "dart:async";
8 import "dart:convert" show LineSplitter, UTF8; 8 import "dart:convert" show LineSplitter, UTF8;
9 import "dart:core"; 9 import "dart:core";
10 import "dart:io"; 10 import "dart:io";
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 /** 259 /**
260 * Force to stop everything associated with [package]. 260 * Force to stop everything associated with [package].
261 */ 261 */
262 Future forceStop(String package) { 262 Future forceStop(String package) {
263 var arguments = ['shell', 'am', 'force-stop', package]; 263 var arguments = ['shell', 'am', 'force-stop', package];
264 return _adbCommand(arguments); 264 return _adbCommand(arguments);
265 } 265 }
266 266
267 /** 267 /**
268 * Set system property name to value.
269 */
270 Future setProp(String name, String value) {
271 return _adbCommand(['shell', 'setprop', name, value]);
272 }
273
274 /**
268 * Kill all background processes. 275 * Kill all background processes.
269 */ 276 */
270 Future killAll() { 277 Future killAll() {
271 var arguments = ['shell', 'am', 'kill-all']; 278 var arguments = ['shell', 'am', 'kill-all'];
272 return _adbCommand(arguments); 279 return _adbCommand(arguments);
273 } 280 }
274 281
275 Future _adbCommand(List<String> adbArgs) { 282 Future _adbCommand(List<String> adbArgs) {
276 if (_deviceId != null) { 283 if (_deviceId != null) {
277 var extendedAdbArgs = ['-s', _deviceId]; 284 var extendedAdbArgs = ['-s', _deviceId];
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 */ 322 */
316 class Intent { 323 class Intent {
317 String action; 324 String action;
318 String package; 325 String package;
319 String activity; 326 String activity;
320 String dataUri; 327 String dataUri;
321 328
322 Intent(this.action, this.package, this.activity, [this.dataUri]); 329 Intent(this.action, this.package, this.activity, [this.dataUri]);
323 } 330 }
324 331
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698