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

Unified Diff: tests/html/js_interop_4_test.dart

Issue 10837088: Implement spawnDomFunction (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test Created 8 years, 4 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
« tests/html/dom_isolates_test.dart ('K') | « tests/html/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/js_interop_4_test.dart
diff --git a/tests/html/js_interop_4_test.dart b/tests/html/js_interop_4_test.dart
index 4ad3e042c17d82e1e6245ab3e601fb15349dde91..e56c99a8e9bbde96f2d8df87d995caf75df310e0 100644
--- a/tests/html/js_interop_4_test.dart
+++ b/tests/html/js_interop_4_test.dart
@@ -10,17 +10,12 @@
final testData = const [1, '2', 'true'];
-// TODO(vsm): Convert all DOM isolate tests to the new syntax.
-class TestIsolate extends Isolate {
- TestIsolate() : super();
+void testIsolate() {
+ var fun1 = window.lookupPort('fun1');
+ var result = fun1.callSync(testData);
- void main() {
- var fun1 = window.lookupPort('fun1');
- var result = fun1.callSync(testData);
-
- var fun2 = window.lookupPort('fun2');
- fun2.callSync(result);
- }
+ var fun2 = window.lookupPort('fun2');
+ fun2.callSync(result);
}
main() {
@@ -64,6 +59,6 @@ main() {
port2.receive(fun2);
window.registerPort('fun2', port2.toSendPort());
- new TestIsolate().spawn();
+ spawnDomFunction(testIsolate);
});
}
« tests/html/dom_isolates_test.dart ('K') | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698