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

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

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: Created 3 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
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 replyPort.send(42); 18 replyPort.send(42);
19 } 19 }
20 """; 20 """;
21 21
22 RawReceivePort receivePort; 22 RawReceivePort receivePort;
23 receivePort = new RawReceivePort(expectAsync((int message) { 23 receivePort = new RawReceivePort(expectAsync((int message) {
24 expect(message, equals(42)); 24 expect(message, equals(42));
25 receivePort.close(); 25 receivePort.close();
26 })); 26 }));
27 Isolate.spawnUri(toDartDataUri(source), [], receivePort.sendPort); 27 Isolate.spawnUri(toDartDataUri(source), [], receivePort.sendPort);
28 }); 28 });
29 } 29 }
OLDNEW
« no previous file with comments | « runtime/tests/vm/dart/byte_array_test.dart ('k') | runtime/tests/vm/dart/double_materialize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698