| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 | 647 |
| 648 var timedOut = []; | 648 var timedOut = []; |
| 649 | 649 |
| 650 void handleResults(String browserId, String output, int testId) { | 650 void handleResults(String browserId, String output, int testId) { |
| 651 var status = browserStatus[browserId]; | 651 var status = browserStatus[browserId]; |
| 652 if (testCache.containsKey(testId)) { | 652 if (testCache.containsKey(testId)) { |
| 653 doubleReportingTests.add(testId); | 653 doubleReportingTests.add(testId); |
| 654 return; | 654 return; |
| 655 } | 655 } |
| 656 | 656 |
| 657 if (status.timeout) { | 657 if (status == null || status.timeout) { |
| 658 // We don't do anything, this browser is currently being killed and | 658 // We don't do anything, this browser is currently being killed and |
| 659 // replaced. | 659 // replaced. The browser here can be null if we decided to kill the |
| 660 // browser. |
| 660 } else if (status.currentTest != null) { | 661 } else if (status.currentTest != null) { |
| 661 status.currentTest.timeoutTimer.cancel(); | 662 status.currentTest.timeoutTimer.cancel(); |
| 662 status.currentTest.stopwatch.stop(); | 663 status.currentTest.stopwatch.stop(); |
| 663 | 664 |
| 664 if (status.currentTest.id != testId) { | 665 if (status.currentTest.id != testId) { |
| 665 print("Expected test id ${status.currentTest.id} for" | 666 print("Expected test id ${status.currentTest.id} for" |
| 666 "${status.currentTest.url}"); | 667 "${status.currentTest.url}"); |
| 667 print("Got test id ${testId}"); | 668 print("Got test id ${testId}"); |
| 668 print("Last test id was ${status.lastTest.id} for " | 669 print("Last test id was ${status.lastTest.id} for " |
| 669 "${status.currentTest.url}"); | 670 "${status.currentTest.url}"); |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 </head> | 1073 </head> |
| 1073 <body onload="startTesting()"> | 1074 <body onload="startTesting()"> |
| 1074 Dart test driver, number of tests: <div id="number"></div> | 1075 Dart test driver, number of tests: <div id="number"></div> |
| 1075 <iframe id="embedded_iframe"></iframe> | 1076 <iframe id="embedded_iframe"></iframe> |
| 1076 </body> | 1077 </body> |
| 1077 </html> | 1078 </html> |
| 1078 """; | 1079 """; |
| 1079 return driverContent; | 1080 return driverContent; |
| 1080 } | 1081 } |
| 1081 } | 1082 } |
| OLD | NEW |