OLD | NEW |
1 | |
2 import "dart:sky.internals" as internals; | |
3 | |
4 import 'package:sky/mojo/shell.dart' as shell; | |
5 import 'package:mojom/sky/test_harness.mojom.dart'; | |
6 | |
7 import "third_party/unittest/unittest.dart"; | 1 import "third_party/unittest/unittest.dart"; |
8 | 2 import "harness.dart"; |
9 void notifyTestComplete(String result) { | |
10 TestHarnessProxy test_harness = new TestHarnessProxy.unbound(); | |
11 shell.requestService("mojo:sky_viewer", test_harness); | |
12 test_harness.ptr.onTestComplete(result, null); | |
13 test_harness.close(); | |
14 | |
15 internals.notifyTestComplete("DONE"); | |
16 } | |
17 | 3 |
18 class _SkyConfig extends SimpleConfiguration { | 4 class _SkyConfig extends SimpleConfiguration { |
19 void onDone(bool success) { | 5 void onDone(bool success) { |
20 try { | 6 try { |
21 super.onDone(success); | 7 super.onDone(success); |
22 } catch (ex) { | 8 } catch (ex) { |
23 print(ex.toString()); | 9 print(ex.toString()); |
24 } | 10 } |
25 | 11 |
26 notifyTestComplete("DONE"); | 12 notifyTestComplete("DONE"); |
27 } | 13 } |
28 } | 14 } |
29 | 15 |
30 final _singleton = new _SkyConfig(); | 16 final _singleton = new _SkyConfig(); |
31 | 17 |
32 void initUnit() { | 18 void initUnit() { |
33 unittestConfiguration = _singleton; | 19 unittestConfiguration = _singleton; |
34 } | 20 } |
OLD | NEW |