| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 library browser; | 4 library browser; |
| 5 | 5 |
| 6 import "dart:async"; | 6 import "dart:async"; |
| 7 import "dart:core"; | 7 import "dart:core"; |
| 8 import "dart:io"; | 8 import "dart:io"; |
| 9 | 9 |
| 10 | 10 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 _logEvent("Make sure $binary is a valid program for running chrome"); | 195 _logEvent("Make sure $binary is a valid program for running chrome"); |
| 196 return new Future.immediate(false); | 196 return new Future.immediate(false); |
| 197 } | 197 } |
| 198 version = versionResult.stdout; | 198 version = versionResult.stdout; |
| 199 _logEvent("Got version: $version"); | 199 _logEvent("Got version: $version"); |
| 200 | 200 |
| 201 return new Directory('').createTemp().then((userDir) { | 201 return new Directory('').createTemp().then((userDir) { |
| 202 _cleanup = () { userDir.delete(recursive: true); }; | 202 _cleanup = () { userDir.delete(recursive: true); }; |
| 203 var args = ["--user-data-dir=${userDir.path}", url, | 203 var args = ["--user-data-dir=${userDir.path}", url, |
| 204 "--disable-extensions", "--disable-popup-blocking", | 204 "--disable-extensions", "--disable-popup-blocking", |
| 205 "--bwsi"]; | 205 "--bwsi", "--no-default-browser-check"]; |
| 206 return startBrowser(binary, args); | 206 return startBrowser(binary, args); |
| 207 | 207 |
| 208 }); | 208 }); |
| 209 }).catchError((e) { | 209 }).catchError((e) { |
| 210 _logEvent("Running $binary --version failed with $e"); | 210 _logEvent("Running $binary --version failed with $e"); |
| 211 return false; | 211 return false; |
| 212 }); | 212 }); |
| 213 } | 213 } |
| 214 | 214 |
| 215 String toString() => "Chrome"; | 215 String toString() => "Chrome"; |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 </script> | 688 </script> |
| 689 </head> | 689 </head> |
| 690 <body> | 690 <body> |
| 691 Dart test driver, number of tests: <div id="number"></div> | 691 Dart test driver, number of tests: <div id="number"></div> |
| 692 </body> | 692 </body> |
| 693 </html> | 693 </html> |
| 694 """; | 694 """; |
| 695 return driverContent; | 695 return driverContent; |
| 696 } | 696 } |
| 697 } | 697 } |
| OLD | NEW |