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

Unified Diff: tests/html/js_interop_2_test.dart

Issue 10700101: First experimental steps towards a better story for JS interop. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: tests/html/js_interop_2_test.dart
diff --git a/tests/html/js_interop_2_test.dart b/tests/html/js_interop_2_test.dart
index 0ea183d9d1ef7aae1f075c7fc80b4c8e286c77f2..37245b2348623bad5ef9be916b6cc6da288e99ce 100644
--- a/tests/html/js_interop_2_test.dart
+++ b/tests/html/js_interop_2_test.dart
@@ -7,6 +7,7 @@
#import('../../lib/unittest/html_config.dart');
#import('dart:html');
#import('dart:json');
vsm 2012/07/04 08:52:35 Can delete this now.
+#import('dart:isolate');
injectSource(code) {
final script = new ScriptElement();
@@ -21,7 +22,8 @@ isolateTest = """
return 'received';
}
- var port = new ReceivePortSync(test);
+ var port = new ReceivePortSync();
+ port.receive(test);
window.registerPort('test', port.toSendPort());
""";
@@ -29,13 +31,13 @@ main() {
useHtmlConfiguration();
test('isolateTest', () {
- injectSource(isolateTest);
+ injectSource(isolateTest);
- var port = window.lookupPort('test');
- var result = port.call('sent');
- Expect.equals('received', result);
+ SendPortSync port = window.lookupPort('test');
+ var result = port.callSync('sent');
+ Expect.equals('received', result);
- result = port.call('ignore');
- Expect.isNull(result);
- });
+ result = port.callSync('ignore');
+ Expect.isNull(result);
+ });
}
« lib/dom/templates/html/frog/html_frog.darttemplate ('K') | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698