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 | 4 |
5 library dromaeo; | 5 library dromaeo; |
6 import '../../pkg/unittest/lib/unittest.dart'; | 6 import '../../pkg/unittest/lib/unittest.dart'; |
7 import '../../pkg/unittest/lib/html_config.dart'; | 7 import '../../pkg/unittest/lib/html_config.dart'; |
8 import '../../samples/third_party/dromaeo/Dromaeo.dart' as originalTest; | 8 import '../../samples/third_party/dromaeo/Dromaeo.dart' as originalTest; |
9 import 'dart:html'; | 9 import 'dart:html'; |
10 import 'dart:async'; | 10 import 'dart:async'; |
(...skipping 27 matching lines...) Expand all Loading... |
38 </div> | 38 </div> |
39 <ul id="tests"> | 39 <ul id="tests"> |
40 <li><a href="?dom">Smoke Tests</a></li> | 40 <li><a href="?dom">Smoke Tests</a></li> |
41 </ul> | 41 </ul> |
42 </div>'''; | 42 </div>'''; |
43 | 43 |
44 bool isDone = false; | 44 bool isDone = false; |
45 originalTest.main(); | 45 originalTest.main(); |
46 | 46 |
47 test('dromaeo runs', () { | 47 test('dromaeo runs', () { |
48 new Timer.repeating(500, expectAsyncUntil1((timer) { | 48 new Timer.repeating(new Duration(milliseconds: 500), |
| 49 expectAsyncUntil1((timer) { |
49 if (document.query('.alldone') != null) { | 50 if (document.query('.alldone') != null) { |
50 timer.cancel(); | 51 timer.cancel(); |
51 isDone = true; | 52 isDone = true; |
52 } | 53 } |
53 }, () => isDone)); | 54 }, () => isDone)); |
54 }); | 55 }); |
55 } | 56 } |
OLD | NEW |