| 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 import 'android.dart'; | 10 import 'android.dart'; |
| 11 import 'utils.dart'; | 11 import 'utils.dart'; |
| 12 | 12 |
| 13 /** Class describing the interface for communicating with browsers. */ | 13 /** Class describing the interface for communicating with browsers. */ |
| 14 abstract class Browser { | 14 abstract class Browser { |
| 15 // Browsers actually takes a while to cleanup after itself when closing | |
| 16 // Give it sufficient time to do that. | |
| 17 static final Duration killRepeatInternal = const Duration(seconds: 10); | |
| 18 static final int killRetries = 5; | |
| 19 StringBuffer _stdout = new StringBuffer(); | 15 StringBuffer _stdout = new StringBuffer(); |
| 20 StringBuffer _stderr = new StringBuffer(); | 16 StringBuffer _stderr = new StringBuffer(); |
| 21 StringBuffer _usageLog = new StringBuffer(); | 17 StringBuffer _usageLog = new StringBuffer(); |
| 22 // This function is called when the process is closed. | 18 // This function is called when the process is closed. |
| 23 // This is extracted to an external function so that we can do additional | 19 // This is extracted to an external function so that we can do additional |
| 24 // functionality when the process closes (cleanup and call onExit) | 20 // functionality when the process closes (cleanup and call onExit) |
| 25 Function _processClosed; | 21 Function _processClosed; |
| 26 // This is called after the process is closed, after _processClosed has | 22 // This is called after the process is closed, after _processClosed has |
| 27 // been called, but before onExit. Subclasses can use this to cleanup | 23 // been called, but before onExit. Subclasses can use this to cleanup |
| 28 // any browser specific resources (temp directories, profiles, etc) | 24 // any browser specific resources (temp directories, profiles, etc) |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 </head> | 913 </head> |
| 918 <body onload="startTesting()"> | 914 <body onload="startTesting()"> |
| 919 Dart test driver, number of tests: <div id="number"></div> | 915 Dart test driver, number of tests: <div id="number"></div> |
| 920 <iframe id="embedded_iframe"></iframe> | 916 <iframe id="embedded_iframe"></iframe> |
| 921 </body> | 917 </body> |
| 922 </html> | 918 </html> |
| 923 """; | 919 """; |
| 924 return driverContent; | 920 return driverContent; |
| 925 } | 921 } |
| 926 } | 922 } |
| OLD | NEW |