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

Unified Diff: pkg/front_end/test/dependency_grapher_test.dart

Issue 2614063007: Use URIs rather than paths in front end API. (Closed)
Patch Set: Run dartfmt Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/test/dependency_grapher_test.dart
diff --git a/pkg/front_end/test/dependency_grapher_test.dart b/pkg/front_end/test/dependency_grapher_test.dart
index bcfca56ae25430a7924db1fa2d0088d7492afc5b..826283d9d81bf8570db8dfd69dbf64c629ef1866 100644
--- a/pkg/front_end/test/dependency_grapher_test.dart
+++ b/pkg/front_end/test/dependency_grapher_test.dart
@@ -35,15 +35,17 @@ class DependencyGrapherTest {
// If no starting points given, assume the first entry in [contents] is the
// single starting point.
startingPoints ??= [contents.keys.first];
- var fileSystem = new MemoryFileSystem(pathos.posix, '/');
+ var fileSystem = new MemoryFileSystem(pathos.posix, Uri.parse('file:///'));
contents.forEach((path, text) {
- fileSystem.entityForPath(path).writeAsStringSync(text);
+ fileSystem.entityForUri(pathos.posix.toUri(path)).writeAsStringSync(text);
});
// TODO(paulberry): implement and test other option possibilities.
var options = new CompilerOptions()
..fileSystem = fileSystem
..chaseDependencies = true
- ..packagesFilePath = packagesFilePath;
+ ..packagesFileUri = packagesFilePath == ''
+ ? new Uri()
+ : pathos.posix.toUri(packagesFilePath);
var graph = await graphForProgram(
startingPoints.map(pathos.posix.toUri).toList(), options);
return graph.topologicallySortedCycles;

Powered by Google App Engine
This is Rietveld 408576698