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

Unified Diff: test/codegen/unittest.dart

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 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 | « test/codegen/sunflower/sunflower.html ('k') | test/codegen_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/unittest.dart
diff --git a/test/codegen/unittest.dart b/test/codegen/unittest.dart
index 18d0c41def6d125e6252a7b83954e8d1d7f4aa5d..2b973607985763976351df3eff67703ac58613da 100644
--- a/test/codegen/unittest.dart
+++ b/test/codegen/unittest.dart
@@ -7,27 +7,28 @@
library minitest;
import 'dart:async';
-import 'package:dom/dom.dart';
+import 'dart:js';
import 'package:matcher/matcher.dart';
export 'package:matcher/matcher.dart';
-void group(String name, void body()) => (window as dynamic).suite(name, body);
+void group(String name, void body()) => context.callMethod('suite', [name, body]);
void test(String name, body(), {String skip}) {
if (skip != null) {
print('SKIP $name: $skip');
return;
}
- (window as dynamic).test(name, (done) {
+ JsObject result = context.callMethod('test', [name, (JsFunction done) {
_finishTest(f) {
if (f is Future) {
f.then(_finishTest);
} else {
- done();
+ done.apply([]);
}
}
_finishTest(body());
- });
+ }]);
+ result['async'] = 1;
}
« no previous file with comments | « test/codegen/sunflower/sunflower.html ('k') | test/codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698