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

Side by Side Diff: tests/html/js_interop_4_test.dart

Issue 56153005: Remove SendPortSync and ReceivePortSync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove third_party/pkg/js and dom/Serialization.dart Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/isolate/isolate.dart ('k') | tests/isolate/browser/ports_compilation_browser_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file
4
5 library JsInterop4Test;
6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_config.dart';
8 import 'dart:async';
9 import 'dart:html';
10 import 'dart:isolate';
11
12 const testData = const [1, '2', 'true'];
13
14 main() {
15 useHtmlConfiguration();
16
17 // Test that our interop scheme also works from Dart to Dart.
18 test('dart-to-dart-same-isolate', () {
19 var fun = expectAsync1((message) {
20 expect(message, orderedEquals(testData));
21 return message.length;
22 });
23
24 var port1 = new ReceivePortSync();
25 port1.receive(fun);
26 window.registerPort('fun', port1.toSendPort());
27
28 var port2 = window.lookupPort('fun');
29 var result = port2.callSync(testData);
30 expect(result, 3);
31 });
32 }
OLDNEW
« no previous file with comments | « sdk/lib/isolate/isolate.dart ('k') | tests/isolate/browser/ports_compilation_browser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698