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

Unified Diff: tests/html/js_interop_3_test.dart

Issue 50523010: Remove js_interop_3_test.dart which tests sync ports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/js_interop_3_test.dart
diff --git a/tests/html/js_interop_3_test.dart b/tests/html/js_interop_3_test.dart
deleted file mode 100644
index 4871b96d321c5736ff11b233ee3e4c91dfb897da..0000000000000000000000000000000000000000
--- a/tests/html/js_interop_3_test.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
-
-library JsInterop3Test;
-import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
-import 'dart:async';
-import 'dart:html';
-import 'dart:isolate';
-
-injectSource(code) {
- final script = new ScriptElement();
- script.type = 'text/javascript';
- script.innerHtml = code;
- document.body.append(script);
-}
-
-var jsToDart = """
- var fun1 = window.lookupPort('fun1');
- var result = fun1.callSync({'a': 'Hello', 'b': 'World', c: 42});
-
- var fun2 = window.lookupPort('fun2');
- fun2.callSync(result);
-""";
-
-main() {
- useHtmlConfiguration();
-
- test('js-to-dart', () {
- var fun1 = (message) {
- expect(message['a'], 'Hello');
- expect(message['b'], 'World');
- expect(message['c'], 42);
- expect(message.keys.length, 3);
- return 42;
- };
-
- var port1 = new ReceivePortSync();
- port1.receive(fun1);
- window.registerPort('fun1', port1.toSendPort());
-
- // TODO(vsm): Investigate why this needs to be called asynchronously.
- var done = expectAsync0(() {});
- var fun2 = (message) {
- expect(message, 42);
- Timer.run(done);
- };
-
- var port2 = new ReceivePortSync();
- port2.receive(fun2);
- window.registerPort('fun2', port2.toSendPort());
-
- injectSource(jsToDart);
- });
-}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698