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

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

Issue 178223008: Replace run_selenium.py with Dart script that uses the browser controller for performance tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « tools/get_archive.py ('k') | tools/testing/dart/browser_perf_testing/lib/browser_perf_testing.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
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 462563d48b4d2e5929032901439213738c148e3a..80b97d057373a43c19e48128be5600e731e1718e 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -760,19 +760,27 @@ class BrowserTestRunner {
BrowserTestingServer testingServer;
+ /**
+ * The TestRunner takes the testingServer in as a constructor parameter in
+ * case we wish to have a testing server with different behavior (such as the
+ * case for performance testing.
+ */
BrowserTestRunner(this.globalConfiguration,
this.localIp,
this.browserName,
this.maxNumBrowsers,
- {bool this.checkedMode: false});
+ {bool this.checkedMode: false,
+ BrowserTestingServer this.testingServer});
Future<bool> start() {
// If [browserName] doesn't support opening new windows, we use new iframes
// instead.
bool useIframe =
!Browser.BROWSERS_WITH_WINDOW_SUPPORT.contains(browserName);
- testingServer = new BrowserTestingServer(
- globalConfiguration, localIp, useIframe);
+ if (testingServer == null) {
+ testingServer = new BrowserTestingServer(
+ globalConfiguration, localIp, useIframe);
+ }
return testingServer.start().then((_) {
testingServer.testDoneCallBack = handleResults;
testingServer.testStatusUpdateCallBack = handleStatusUpdate;
@@ -1159,7 +1167,7 @@ class BrowserTestingServer {
print("Textresponse $textResponse");
throw "Error returning content to browser: $error";
}
- });
+ });
}
void errorHandler(e) {
if (!underTermination) print("Error occured in httpserver: $e");
« no previous file with comments | « tools/get_archive.py ('k') | tools/testing/dart/browser_perf_testing/lib/browser_perf_testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698