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

Unified Diff: tests/lib/platform/isolate_test.dart

Issue 50573002: Remove dart:platform library. (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 | « tests/lib/platform/import_test.dart ('k') | tests/lib/platform/local_hostname_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/platform/isolate_test.dart
diff --git a/tests/lib/platform/isolate_test.dart b/tests/lib/platform/isolate_test.dart
deleted file mode 100644
index b53f088a7e6cdd54e583be7fc6fc10c318fae42a..0000000000000000000000000000000000000000
--- a/tests/lib/platform/isolate_test.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2013, 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.
-
-import "dart:platform" as platform;
-
-import "dart:isolate";
-import "package:unittest/unittest.dart";
-
-sendReceive(SendPort port, msg) {
- var response = new ReceivePort();
- port.send([msg, response.sendPort]);
- return response.first;
-}
-
-main() {
- test("platform in isolate", () {
- var response = new ReceivePort();
- Isolate.spawn(f, response.sendPort);
- response.first.then(expectAsync1((sendPort) {
- expect(sendReceive(sendPort, "platform.executable"),
- completion(platform.executable));
- if (platform.script != null) {
- expect(sendReceive(sendPort, "platform.script").then((s) => s.path),
- completion(endsWith('tests/lib/platform/isolate_test.dart')));
- }
- expect(sendReceive(sendPort, "platform.packageRoot"),
- completion(platform.packageRoot));
- expect(sendReceive(sendPort, "platform.executableArguments"),
- completion(platform.executableArguments));
- }));
- });
-}
-
-void f(initialReplyTo) {
- var port = new ReceivePort();
- initialReplyTo.send(port.sendPort);
- int count = 0;
- port.listen((msg) {
- var data = msg[0];
- var replyTo = msg[1];
- if (data == "platform.executable") {
- replyTo.send(platform.executable);
- }
- if (data == "platform.script") {
- replyTo.send(platform.script);
- }
- if (data == "platform.packageRoot") {
- replyTo.send(platform.packageRoot);
- }
- if (data == "platform.executableArguments") {
- replyTo.send(platform.executableArguments);
- }
- count++;
- if (count == 4) {
- port.close();
- }
- });
-}
« no previous file with comments | « tests/lib/platform/import_test.dart ('k') | tests/lib/platform/local_hostname_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698