| 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:convert" show LineSplitter, UTF8; | 7 import "dart:convert" show LineSplitter, UTF8; |
| 8 import "dart:core"; | 8 import "dart:core"; |
| 9 import "dart:io"; | 9 import "dart:io"; |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 throw "Non supported browser"; | 84 throw "Non supported browser"; |
| 85 } | 85 } |
| 86 browser._binary = executablePath; | 86 browser._binary = executablePath; |
| 87 return browser; | 87 return browser; |
| 88 } | 88 } |
| 89 | 89 |
| 90 static const List<String> SUPPORTED_BROWSERS = | 90 static const List<String> SUPPORTED_BROWSERS = |
| 91 const ['safari', 'ff', 'firefox', 'chrome', 'ie9', 'ie10', | 91 const ['safari', 'ff', 'firefox', 'chrome', 'ie9', 'ie10', |
| 92 'ie11', 'dartium']; | 92 'ie11', 'dartium']; |
| 93 | 93 |
| 94 static const List<String> BROWSERS_WITH_WINDOW_SUPPORT = const ['ie11']; | 94 static const List<String> BROWSERS_WITH_WINDOW_SUPPORT = |
| 95 const ['ie11', 'ie10']; |
| 95 | 96 |
| 96 // TODO(kustermann): add standard support for chrome on android | 97 // TODO(kustermann): add standard support for chrome on android |
| 97 static bool supportedBrowser(String name) { | 98 static bool supportedBrowser(String name) { |
| 98 return SUPPORTED_BROWSERS.contains(name); | 99 return SUPPORTED_BROWSERS.contains(name); |
| 99 } | 100 } |
| 100 | 101 |
| 101 void _logEvent(String event) { | 102 void _logEvent(String event) { |
| 102 String toLog = "$this ($id) - $event \n"; | 103 String toLog = "$this ($id) - $event \n"; |
| 103 if (debugPrint) print("usageLog: $toLog"); | 104 if (debugPrint) print("usageLog: $toLog"); |
| 104 if (logger != null) logger(toLog); | 105 if (logger != null) logger(toLog); |
| (...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 Dart test driver, number of tests: <div id="number"></div><br> | 1602 Dart test driver, number of tests: <div id="number"></div><br> |
| 1602 Currently executing: <div id="currently_executing"></div><br> | 1603 Currently executing: <div id="currently_executing"></div><br> |
| 1603 Unhandled error: <div id="unhandled_error"></div> | 1604 Unhandled error: <div id="unhandled_error"></div> |
| 1604 <iframe id="embedded_iframe"></iframe> | 1605 <iframe id="embedded_iframe"></iframe> |
| 1605 </body> | 1606 </body> |
| 1606 </html> | 1607 </html> |
| 1607 """; | 1608 """; |
| 1608 return driverContent; | 1609 return driverContent; |
| 1609 } | 1610 } |
| 1610 } | 1611 } |
| OLD | NEW |