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

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 2060263006: Deprecate FileUriResolver and RelativeFileUriResolver in source_io.dart, replace the usages with Re… (Closed) Base URL: git@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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index ba1ba0082e83a854e5eb3d0ca2a3f25647ddd044..ff70ab41a8701ca37314ffbfcd44d57ee6b75210 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -8,6 +8,7 @@ import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:analyzer/src/dart/ast/ast.dart';
import 'package:analyzer/src/dart/ast/utilities.dart' hide ConstantEvaluator;
@@ -4186,7 +4187,8 @@ class FileBasedSourceTest {
}
void test_getEncoding() {
- SourceFactory factory = new SourceFactory([new FileUriResolver()]);
+ SourceFactory factory = new SourceFactory(
+ [new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)]);
String fullPath = "/does/not/exist.dart";
JavaFile file = FileUtilities2.createFile(fullPath);
FileBasedSource source = new FileBasedSource(file);
@@ -4307,11 +4309,13 @@ class FileBasedSourceTest {
@reflectiveTest
class FileUriResolverTest {
void test_creation() {
- expect(new FileUriResolver(), isNotNull);
+ expect(
+ new ResourceUriResolver(PhysicalResourceProvider.INSTANCE), isNotNull);
Brian Wilkerson 2016/06/16 17:39:30 This is no longer testing FileUriResolver. I think
jwren 2016/06/16 18:09:56 Done.
}
void test_resolve_file() {
- UriResolver resolver = new FileUriResolver();
+ UriResolver resolver =
+ new ResourceUriResolver(PhysicalResourceProvider.INSTANCE);
Source result = resolver
.resolveAbsolute(parseUriWithException("file:/does/not/exist.dart"));
expect(result, isNotNull);
@@ -4320,14 +4324,16 @@ class FileUriResolverTest {
}
void test_resolve_nonFile() {
- UriResolver resolver = new FileUriResolver();
+ UriResolver resolver =
+ new ResourceUriResolver(PhysicalResourceProvider.INSTANCE);
Source result =
resolver.resolveAbsolute(parseUriWithException("dart:core"));
expect(result, isNull);
}
void test_restore() {
- UriResolver resolver = new FileUriResolver();
+ UriResolver resolver =
+ new ResourceUriResolver(PhysicalResourceProvider.INSTANCE);
Uri uri = parseUriWithException('file:///foo/bar.dart');
Source source = resolver.resolveAbsolute(uri);
expect(source, isNotNull);

Powered by Google App Engine
This is Rietveld 408576698