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

Side by Side Diff: runtime/observatory/tests/service/dev_fs_test.dart

Issue 2157013002: Fix DevFS writes with subdirectories (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « runtime/bin/vmservice/vmservice_io.dart ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 // VMOptions=--error_on_bad_type --error_on_bad_override 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'package:observatory/service_io.dart'; 7 import 'package:observatory/service_io.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'test_helper.dart'; 9 import 'test_helper.dart';
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } on ServerRpcException catch(e) { 51 } on ServerRpcException catch(e) {
52 caughtException = true; 52 caughtException = true;
53 expect(e.code, equals(ServerRpcException.kFileSystemDoesNotExist)); 53 expect(e.code, equals(ServerRpcException.kFileSystemDoesNotExist));
54 expect(e.message, "_deleteDevFS: file system 'alpha' does not exist"); 54 expect(e.message, "_deleteDevFS: file system 'alpha' does not exist");
55 } 55 }
56 expect(caughtException, isTrue); 56 expect(caughtException, isTrue);
57 }, 57 },
58 58
59 (VM vm) async { 59 (VM vm) async {
60 var fsId = 'banana'; 60 var fsId = 'banana';
61 var filePath = '/foobar.dat'; 61 var filePath = '/foo/bar.dat';
62 var fileContents = BASE64.encode(UTF8.encode('fileContents')); 62 var fileContents = BASE64.encode(UTF8.encode('fileContents'));
63 63
64 var result; 64 var result;
65 // Create DevFS. 65 // Create DevFS.
66 result = await vm.invokeRpcNoUpgrade('_createDevFS', { 'fsName': fsId }); 66 result = await vm.invokeRpcNoUpgrade('_createDevFS', { 'fsName': fsId });
67 expect(result['type'], equals('FileSystem')); 67 expect(result['type'], equals('FileSystem'));
68 expect(result['name'], equals(fsId)); 68 expect(result['name'], equals(fsId));
69 expect(result['uri'], new isInstanceOf<String>()); 69 expect(result['uri'], new isInstanceOf<String>());
70 70
71 bool caughtException = false; 71 bool caughtException = false;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 // Delete DevFS. 150 // Delete DevFS.
151 result = await vm.invokeRpcNoUpgrade('_deleteDevFS', { 151 result = await vm.invokeRpcNoUpgrade('_deleteDevFS', {
152 'fsName': fsId, 152 'fsName': fsId,
153 }); 153 });
154 expect(result['type'], equals('Success')); 154 expect(result['type'], equals('Success'));
155 }, 155 },
156 ]; 156 ];
157 157
158 main(args) async => runVMTests(args, tests); 158 main(args) async => runVMTests(args, tests);
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/vmservice_io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698