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

Side by Side Diff: tests/standalone/packages_file_test.dart

Issue 2068633002: Revert "Make VM resolvePackageUri fail on package:foo and package:/foo." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/loader.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 4
5 import "dart:async"; 5 import "dart:async";
6 import "dart:io"; 6 import "dart:io";
7 import "dart:convert" show JSON; 7 import "dart:convert" show JSON;
8 import "package:path/path.dart" as p; 8 import "package:path/path.dart" as p;
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // value of these, you can only change what value to expect. 289 // value of these, you can only change what value to expect.
290 // For values not included here (commented out), the result is not tested 290 // For values not included here (commented out), the result is not tested
291 // unless a value (maybe null) is provided. 291 // unless a value (maybe null) is provided.
292 fixPaths(expect); 292 fixPaths(expect);
293 293
294 expect = { 294 expect = {
295 "pconf": null, 295 "pconf": null,
296 "proot": null, 296 "proot": null,
297 "iconf": null, 297 "iconf": null,
298 "iroot": null, 298 "iroot": null,
299 "foo": null, 299 // "foo": null,
300 "foo/": null, 300 "foo/": null,
301 "foo/bar": null, 301 "foo/bar": null,
302 "foo.x": "qux", 302 "foo.x": "qux",
303 "bar/bar": null, 303 "bar/bar": null,
304 "relative": "relative/path", 304 "relative": "relative/path",
305 "nonpkg": "http://example.org/file" 305 "nonpkg": "http://example.org/file"
306 }..addAll(expect ?? const {}); 306 }..addAll(expect ?? const {});
307 307
308 // Add http files to the http server. 308 // Add http files to the http server.
309 if (http.isNotEmpty) { 309 if (http.isNotEmpty) {
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 void insertFileAt(Map file, Map http, 984 void insertFileAt(Map file, Map http,
985 String path, String name, String content) { 985 String path, String name, String content) {
986 var parts = path.split('/').toList(); 986 var parts = path.split('/').toList();
987 var dir = (parts[0] == "%file") ? file : http; 987 var dir = (parts[0] == "%file") ? file : http;
988 for (var i = 1; i < parts.length - 1; i++) { 988 for (var i = 1; i < parts.length - 1; i++) {
989 var entry = parts[i]; 989 var entry = parts[i];
990 dir = dir[entry] ?? (dir[entry] = {}); 990 dir = dir[entry] ?? (dir[entry] = {});
991 } 991 }
992 dir[name] = content; 992 dir[name] = content;
993 } 993 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/loader.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698