| Index: tools/testing/dart/browser_controller.dart
|
| ===================================================================
|
| --- tools/testing/dart/browser_controller.dart (revision 24095)
|
| +++ tools/testing/dart/browser_controller.dart (working copy)
|
| @@ -234,7 +234,7 @@
|
|
|
| void _createLaunchHTML(var path, var url) {
|
| var file = new File("${path}/launch.html");
|
| - var randomFile = file.openSync(mode: FileMode.WRITE);
|
| + var randomFile = file.openSync(FileMode.WRITE);
|
| var content = '<script language="JavaScript">location = "$url"</script>';
|
| randomFile.writeStringSync(content);
|
| randomFile.close();
|
| @@ -245,7 +245,7 @@
|
| // Get the version and log that.
|
| return allowPopUps().then((success) {
|
| if (!success) {
|
| - return new Future.value(false);
|
| + return new Future.immediate(false);
|
| }
|
| return getVersion().then((version) {
|
| _logEvent("Got version: $version");
|
| @@ -281,7 +281,7 @@
|
| if (versionResult.exitCode != 0) {
|
| _logEvent("Failed to chrome get version");
|
| _logEvent("Make sure $binary is a valid program for running chrome");
|
| - return new Future.value(false);
|
| + return new Future.immediate(false);
|
| }
|
| version = versionResult.stdout;
|
| _logEvent("Got version: $version");
|
| @@ -363,7 +363,7 @@
|
| return _adbDevice.killAll().then((_) => true);
|
| });
|
| }
|
| - return new Future.value(true);
|
| + return new Future.immediate(true);
|
| }
|
|
|
| String toString() => "chromeOnAndroid";
|
| @@ -383,7 +383,7 @@
|
|
|
| Future _createPreferenceFile(var path) {
|
| var file = new File("${path.toString()}/user.js");
|
| - var randomFile = file.openSync(mode: FileMode.WRITE);
|
| + var randomFile = file.openSync(FileMode.WRITE);
|
| randomFile.writeStringSync(enablePopUp);
|
| randomFile.writeStringSync(disableDefaultCheck);
|
| randomFile.close();
|
| @@ -397,7 +397,7 @@
|
| if (versionResult.exitCode != 0) {
|
| _logEvent("Failed to firefox get version");
|
| _logEvent("Make sure $binary is a valid program for running firefox");
|
| - return new Future.value(false);
|
| + return new Future.immediate(false);
|
| }
|
| version = versionResult.stdout;
|
| _logEvent("Got version: $version");
|
| @@ -762,8 +762,8 @@
|
| DebugLogger.info("Handling request to: ${request.uri.path}");
|
| if (request.uri.path.startsWith(reportPath)) {
|
| var browserId = request.uri.path.substring(reportPath.length + 1);
|
| - var testId =
|
| - int.parse(request.uri.queryParameters["id"].split("=")[1]);
|
| + var testId = int.parse(request.queryParameters["id"].split("=")[1]);
|
| +
|
| handleReport(request, browserId, testId);
|
| // handleReport will asynchroniously fetch the data and will handle
|
| // the closing of the streams.
|
| @@ -894,6 +894,7 @@
|
| // Don't do anything, we will be killed shortly.
|
| } else {
|
| var elapsed = new Date() - start;
|
| + reportError('Done getting task at: ' + elapsed);
|
| // TODO(ricow): Do something more clever here.
|
| if (nextTask != undefined) alert('This is really bad');
|
| // The task is send to us as:
|
| @@ -901,7 +902,6 @@
|
| var split = this.responseText.split('#');
|
| var nextTask = split[0];
|
| current_id = split[1];
|
| - reportError('Done getting task : ' + elapsed);
|
| did_start = false;
|
| run(nextTask);
|
| }
|
|
|