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

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: Address comments Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « 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_2_test.dart
diff --git a/tests/html/js_interop_2_test.dart b/tests/html/js_interop_2_test.dart
index 0ea183d9d1ef7aae1f075c7fc80b4c8e286c77f2..35d2f281f7d6feb58fddeff372a91e79271b03c0 100644
--- a/tests/html/js_interop_2_test.dart
+++ b/tests/html/js_interop_2_test.dart
@@ -6,7 +6,7 @@
#import('../../lib/unittest/unittest.dart');
#import('../../lib/unittest/html_config.dart');
#import('dart:html');
-#import('dart:json');
+#import('dart:isolate');
injectSource(code) {
final script = new ScriptElement();
@@ -21,7 +21,8 @@ isolateTest = """
return 'received';
}
- var port = new ReceivePortSync(test);
+ var port = new ReceivePortSync();
+ port.receive(test);
window.registerPort('test', port.toSendPort());
""";
@@ -29,13 +30,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);
+ });
}
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698