| 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'; |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 if (underTermination) return; | 618 if (underTermination) return; |
| 619 var browser; | 619 var browser; |
| 620 var new_id = id; | 620 var new_id = id; |
| 621 if (browserName == 'chromeOnAndroid') { | 621 if (browserName == 'chromeOnAndroid') { |
| 622 browser = new AndroidChrome(adbDeviceMapping[id]); | 622 browser = new AndroidChrome(adbDeviceMapping[id]); |
| 623 } else { | 623 } else { |
| 624 browserStatus.remove(id); | 624 browserStatus.remove(id); |
| 625 browser = getInstance(); | 625 browser = getInstance(); |
| 626 new_id = "BROWSER$browserIdCount"; | 626 new_id = "BROWSER$browserIdCount"; |
| 627 browserIdCount++; | 627 browserIdCount++; |
| 628 browserStatus[browser.id] = new BrowserTestingStatus(browser); | 628 browserStatus[new_id] = new BrowserTestingStatus(browser); |
| 629 } | 629 } |
| 630 browser.id = new_id; | 630 browser.id = new_id; |
| 631 browser.start(testingServer.getDriverUrl(new_id)).then((success) { | 631 browser.start(testingServer.getDriverUrl(new_id)).then((success) { |
| 632 // We may have started terminating in the mean time. | 632 // We may have started terminating in the mean time. |
| 633 if (underTermination) { | 633 if (underTermination) { |
| 634 browser.close().then((success) { | 634 browser.close().then((success) { |
| 635 // We should never hit this, print it out. | 635 // We should never hit this, print it out. |
| 636 if (!success) { | 636 if (!success) { |
| 637 print("Could not kill browser ($id) started due to timeout"); | 637 print("Could not kill browser ($id) started due to timeout"); |
| 638 } | 638 } |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 </head> | 935 </head> |
| 936 <body onload="startTesting()"> | 936 <body onload="startTesting()"> |
| 937 Dart test driver, number of tests: <div id="number"></div> | 937 Dart test driver, number of tests: <div id="number"></div> |
| 938 <iframe id="embedded_iframe"></iframe> | 938 <iframe id="embedded_iframe"></iframe> |
| 939 </body> | 939 </body> |
| 940 </html> | 940 </html> |
| 941 """; | 941 """; |
| 942 return driverContent; | 942 return driverContent; |
| 943 } | 943 } |
| 944 } | 944 } |
| OLD | NEW |