Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: sky/tests/resources/unit.dart

Issue 1215953006: Use sky_shell instead of mojo_shell for testing. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Foo Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698