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

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

Issue 15825004: Use the Debug log for messages from the browser controller (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/browser_controller.dart
===================================================================
--- tools/testing/dart/browser_controller.dart (revision 23290)
+++ tools/testing/dart/browser_controller.dart (working copy)
@@ -37,6 +37,8 @@
*/
Process process;
+ Function logger;
+
/**
* Id of the browser
*/
@@ -46,7 +48,7 @@
Function onClose;
/** Print everything (stdout, stderr, usageLog) whenever we add to it */
- bool debugPrint = true;
+ bool debugPrint = false;
// We use this to gracefully handle double calls to close.
bool underTermination = false;
@@ -54,6 +56,7 @@
void _logEvent(String event) {
String toLog = "$this ($id) - ${new DateTime.now()}: $event \n";
if (debugPrint) print("usageLog: $toLog");
+ if (logger != null) logger(toLog);
_usageLog.write(toLog);
}
@@ -496,6 +499,8 @@
String local_ip;
String browserName;
int maxNumBrowsers;
+ // Used to send back logs from the browser (start, stop etc)
+ Function logger;
bool underTermination = false;
@@ -714,15 +719,18 @@
}
Browser getInstance() {
+ var browser;
if (browserName == "chrome") {
- return new Chrome();
+ browser = new Chrome();
} else if (browserName == "ff") {
- return new Firefox();
+ browser = new Firefox();
} else if (browserName == "safari") {
- return new Safari();
+ browser = new Safari();
} else {
throw "Non supported browser for browser controller";
}
+ browser.logger = logger;
+ return browser;
}
}
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698