| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * Id of the browser | 39 * Id of the browser |
| 40 */ | 40 */ |
| 41 String id; | 41 String id; |
| 42 | 42 |
| 43 /** Callback that will be executed when the browser has closed */ | 43 /** Callback that will be executed when the browser has closed */ |
| 44 Function onClose; | 44 Function onClose; |
| 45 | 45 |
| 46 /** Print everything (stdout, stderr, usageLog) whenever we add to it */ | 46 /** Print everything (stdout, stderr, usageLog) whenever we add to it */ |
| 47 bool debugPrint = false; | 47 bool debugPrint = true; |
| 48 | 48 |
| 49 void _logEvent(String event) { | 49 void _logEvent(String event) { |
| 50 String toLog = "$this ($id) - ${new DateTime.now()}: $event \n"; | 50 String toLog = "$this ($id) - ${new DateTime.now()}: $event \n"; |
| 51 if (debugPrint) print("usageLog: $toLog"); | 51 if (debugPrint) print("usageLog: $toLog"); |
| 52 _usageLog.write(toLog); | 52 _usageLog.write(toLog); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void _addStdout(String output) { | 55 void _addStdout(String output) { |
| 56 if (debugPrint) print("stdout: $output"); | 56 if (debugPrint) print("stdout: $output"); |
| 57 _stdout.write(output); | 57 _stdout.write(output); |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 </script> | 684 </script> |
| 685 </head> | 685 </head> |
| 686 <body> | 686 <body> |
| 687 Dart test driver, number of tests: <div id="number"></div> | 687 Dart test driver, number of tests: <div id="number"></div> |
| 688 </body> | 688 </body> |
| 689 </html> | 689 </html> |
| 690 """; | 690 """; |
| 691 return driverContent; | 691 return driverContent; |
| 692 } | 692 } |
| 693 } | 693 } |
| OLD | NEW |