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

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

Issue 1218633003: Make it possible to run a test in sky_shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address reviewer comments 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
« no previous file with comments | « sky/shell/testing/test_runner.cc ('k') | sky/tools/tester/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
1 import "third_party/unittest/unittest.dart"; 7 import "third_party/unittest/unittest.dart";
2 import "dart:sky.internals" as internals; 8
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 }
3 17
4 class _SkyConfig extends SimpleConfiguration { 18 class _SkyConfig extends SimpleConfiguration {
5 void onDone(bool success) { 19 void onDone(bool success) {
6 try { 20 try {
7 super.onDone(success); 21 super.onDone(success);
8 } catch (ex) { 22 } catch (ex) {
9 print(ex.toString()); 23 print(ex.toString());
10 } 24 }
11 25
12 internals.notifyTestComplete("DONE"); 26 notifyTestComplete("DONE");
13 } 27 }
14 } 28 }
15 29
16 final _singleton = new _SkyConfig(); 30 final _singleton = new _SkyConfig();
17 31
18 void initUnit() { 32 void initUnit() {
19 unittestConfiguration = _singleton; 33 unittestConfiguration = _singleton;
20 } 34 }
OLDNEW
« no previous file with comments | « sky/shell/testing/test_runner.cc ('k') | sky/tools/tester/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698