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

Unified 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, 6 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/resources/unit.dart
diff --git a/sky/tests/resources/unit.dart b/sky/tests/resources/unit.dart
index f2a1688ed7c29a9660b3e4e4ca9b0059b7a7b85e..ad067fa6414036256afce227dd75f73c60889ecb 100644
--- a/sky/tests/resources/unit.dart
+++ b/sky/tests/resources/unit.dart
@@ -1,6 +1,20 @@
-import "third_party/unittest/unittest.dart";
+
import "dart:sky.internals" as internals;
+import 'package:sky/mojo/shell.dart' as shell;
+import 'package:mojom/sky/test_harness.mojom.dart';
+
+import "third_party/unittest/unittest.dart";
+
+void notifyTestComplete(String result) {
+ TestHarnessProxy test_harness = new TestHarnessProxy.unbound();
+ shell.requestService("mojo:sky_viewer", test_harness);
+ test_harness.ptr.onTestComplete(result, null);
+ test_harness.close();
+
+ internals.notifyTestComplete("DONE");
+}
+
class _SkyConfig extends SimpleConfiguration {
void onDone(bool success) {
try {
@@ -9,7 +23,7 @@ class _SkyConfig extends SimpleConfiguration {
print(ex.toString());
}
- internals.notifyTestComplete("DONE");
+ notifyTestComplete("DONE");
}
}
« 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