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

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

Issue 755263002: Add android device id to test output for failing tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo begin -> being 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 | « 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 e7012d06157e6f0bd7a74b1cef3596478d5db760..661104deea779b6ca9b48153b084b93d544c7253 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -247,6 +247,13 @@ abstract class Browser {
_testBrowserOutput = new BrowserOutput();
}
+ /**
+ * Add useful info about the browser to the _testBrowserOutput.stdout,
+ * where it will be reported for failing tests. Used to report which
+ * android device a failing test is running on.
+ */
+ void logBrowserInfoToTestBrowserOutput() { }
+
String toString();
/** Starts the browser loading the given url */
@@ -620,6 +627,11 @@ class AndroidBrowser extends Browser {
return new Future.value(true);
}
+ void logBrowserInfoToTestBrowserOutput() {
+ _testBrowserOutput.stdout.write(
+ 'Android device id: ${_adbDevice.deviceId}\n');
+ }
+
String toString() => _config.name;
}
@@ -687,6 +699,11 @@ class AndroidChrome extends Browser {
return new Future.value(true);
}
+ void logBrowserInfoToTestBrowserOutput() {
+ _testBrowserOutput.stdout.write(
+ 'Android device id: ${_adbDevice.deviceId}\n');
+ }
+
String toString() => "chromeOnAndroid";
}
@@ -1167,8 +1184,9 @@ class BrowserTestRunner {
status.currentTest.stopwatch = new Stopwatch()..start();
// Reset the test specific output information (stdout, stderr) on the
- // browser since a new test is begin started.
+ // browser, since a new test is being started.
status.browser.resetTestBrowserOutput();
+ status.browser.logBrowserInfoToTestBrowserOutput();
return test;
}
« 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