| 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 | 577 |
| 578 if (status.currentTest.id != testId) { | 578 if (status.currentTest.id != testId) { |
| 579 print("Expected test id ${status.currentTest.id} for" | 579 print("Expected test id ${status.currentTest.id} for" |
| 580 "${status.currentTest.url}"); | 580 "${status.currentTest.url}"); |
| 581 print("Got test id ${testId}"); | 581 print("Got test id ${testId}"); |
| 582 print("Last test id was ${status.lastTest.id} for " | 582 print("Last test id was ${status.lastTest.id} for " |
| 583 "${status.currentTest.url}"); | 583 "${status.currentTest.url}"); |
| 584 throw("This should never happen, wrong test id"); | 584 throw("This should never happen, wrong test id"); |
| 585 } | 585 } |
| 586 testCache[testId] = status.currentTest.url; | 586 testCache[testId] = status.currentTest.url; |
| 587 DebugLogger.info("Size of output for test $testId : ${output.length}"); |
| 588 Stopwatch watch = new Stopwatch()..start(); |
| 587 status.currentTest.doneCallback(output, | 589 status.currentTest.doneCallback(output, |
| 588 status.currentTest.stopwatch.elapsed); | 590 status.currentTest.stopwatch.elapsed); |
| 591 watch.stop(); |
| 592 DebugLogger.info("Handling of test $testId took : ${watch.elapsed}"); |
| 589 status.lastTest = status.currentTest; | 593 status.lastTest = status.currentTest; |
| 590 status.currentTest = null; | 594 status.currentTest = null; |
| 591 } else { | 595 } else { |
| 592 print("\nThis is bad, should never happen, handleResult no test"); | 596 print("\nThis is bad, should never happen, handleResult no test"); |
| 593 print("URL: ${status.lastTest.url}"); | 597 print("URL: ${status.lastTest.url}"); |
| 594 print(output); | 598 print(output); |
| 595 terminate().then((_) { | 599 terminate().then((_) { |
| 596 exit(1); | 600 exit(1); |
| 597 }); | 601 }); |
| 598 } | 602 } |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 </head> | 1002 </head> |
| 999 <body onload="startTesting()"> | 1003 <body onload="startTesting()"> |
| 1000 Dart test driver, number of tests: <div id="number"></div> | 1004 Dart test driver, number of tests: <div id="number"></div> |
| 1001 <iframe id="embedded_iframe"></iframe> | 1005 <iframe id="embedded_iframe"></iframe> |
| 1002 </body> | 1006 </body> |
| 1003 </html> | 1007 </html> |
| 1004 """; | 1008 """; |
| 1005 return driverContent; | 1009 return driverContent; |
| 1006 } | 1010 } |
| 1007 } | 1011 } |
| OLD | NEW |