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

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

Issue 752173002: Add android device id to test output in test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « tests/lib/lib.status ('k') | 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 e7012d06157e6f0bd7a74b1cef3596478d5db760..e12cdd6ecb83832191dbaffe75e6e70c948bcf5f 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -249,6 +249,12 @@ abstract class Browser {
String toString();
+ /**
+ * Identifies the device the browser is running on.
+ * Used for testing on android devices.
+ */
+ String get deviceIdMessage => "";
+
/** Starts the browser loading the given url */
Future<bool> start(String url);
}
@@ -621,6 +627,9 @@ class AndroidBrowser extends Browser {
}
String toString() => _config.name;
+
+ String get deviceIdMessage =>
+ 'Android device id: ${_adbDevice.deviceId}\n';
}
@@ -688,6 +697,9 @@ class AndroidChrome extends Browser {
}
String toString() => "chromeOnAndroid";
+
+ String get deviceIdMessage =>
+ 'Android device id: ${_adbDevice.deviceId}\n';
}
@@ -988,7 +1000,7 @@ class BrowserTestRunner {
var browserTestOutput = new BrowserTestOutput(
status.currentTest.delayUntilTestStarted,
status.currentTest.stopwatch.elapsed,
- output,
+ status.browser.deviceIdMessage + output,
status.browser.testBrowserOutput);
status.currentTest.doneCallback(browserTestOutput);
@@ -1040,6 +1052,7 @@ class BrowserTestRunner {
status.timeout = true;
timedOut.add(status.currentTest.url);
var id = status.browser.id;
+ String deviceMessage = status.browser.deviceIdMessage;
status.currentTest.stopwatch.stop();
status.browser.close().then((_) {
@@ -1054,7 +1067,7 @@ class BrowserTestRunner {
var browserTestOutput = new BrowserTestOutput(
status.currentTest.delayUntilTestStarted,
status.currentTest.stopwatch.elapsed,
- lastKnownMessage,
+ deviceMessage + lastKnownMessage,
status.browser.testBrowserOutput,
didTimeout: true);
status.currentTest.doneCallback(browserTestOutput);
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698