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

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

Issue 1024253002: Adjust status of data_uri_failures_test to allow for the browser's more permissive handling of data… (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_failures_test.dart ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:isolate"; 5 import "dart:isolate";
6 import "package:unittest/unittest.dart"; 6 import "package:unittest/unittest.dart";
7 7
8 Uri toDartDataUri(String source) { 8 Uri toDartDataUri(String source) {
9 return Uri.parse("data:application/dart;charset=utf-8," 9 return Uri.parse("data:application/dart;charset=utf-8,"
10 "${Uri.encodeComponent(source)}"); 10 "${Uri.encodeComponent(source)}");
11 } 11 }
12 12
13 main() { 13 main() {
14 test('Simple response', () { 14 test('Simple response', () {
15 String source = """ 15 String source = """
16 import "dart:isolate"; 16 import "dart:isolate";
17 main(List args, SendPort replyPort) { 17 main(List args, SendPort replyPort) {
18 print('Child running');
19 replyPort.send(42); 18 replyPort.send(42);
20 } 19 }
21 """; 20 """;
22 21
23 RawReceivePort receivePort; 22 RawReceivePort receivePort;
24 receivePort = new RawReceivePort(expectAsync((int message) { 23 receivePort = new RawReceivePort(expectAsync((int message) {
25 expect(message, equals(42)); 24 expect(message, equals(42));
26 receivePort.close(); 25 receivePort.close();
27 })); 26 }));
28 Isolate.spawnUri(toDartDataUri(source), [], receivePort.sendPort); 27 Isolate.spawnUri(toDartDataUri(source), [], receivePort.sendPort);
29 }); 28 });
30 } 29 }
OLDNEW
« no previous file with comments | « runtime/tests/vm/dart/data_uri_failures_test.dart ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698