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

Side by Side Diff: runtime/tests/vm/dart/data_uri_spawn_test.dart

Issue 1028453002: Support percent encoded data URIs in the standalone embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/tests/vm/dart/data_uri_import_test.dart ('k') | tools/testing/dart/multitest.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) 2015, 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 import "dart:isolate";
6 import "package:unittest/unittest.dart";
7
8 Uri toDartDataUri(String source) {
9 return Uri.parse("data:application/dart;charset=utf-8,"
10 "${Uri.encodeComponent(source)}");
11 }
12
13 main() {
14 test('Simple response', () {
15 String source = """
16 import "dart:isolate";
17 main(List args, SendPort replyPort) {
18 print('Child running');
19 replyPort.send(42);
20 }
21 """;
22
23 RawReceivePort receivePort;
24 receivePort = new RawReceivePort(expectAsync((int message) {
25 expect(message, equals(42));
26 receivePort.close();
27 }));
28 Isolate.spawnUri(toDartDataUri(source), [], receivePort.sendPort);
29 });
30 }
OLDNEW
« no previous file with comments | « runtime/tests/vm/dart/data_uri_import_test.dart ('k') | tools/testing/dart/multitest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698