Use StringSource in type provider tests to prevent bad path lookups.

Prevent windows from doing a path lookup for 'dart:core' which will
crash. All we need is a string source with a uri..

Change-Id: I742060633f3bd89323ad3e3f0f19ae80c1aedbae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104806
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 9cc2c26..b20c4b5 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -26,6 +26,7 @@
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 import 'package:analyzer/src/source/source_resource.dart';
+import 'package:analyzer/src/string_source.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -1183,7 +1184,7 @@
       symbolType.element,
       typeType.element
     ];
-    coreUnit.source = new TestSource('dart:core');
+    coreUnit.source = new StringSource('', null, uri: Uri.parse('dart:core'));
     coreUnit.librarySource = coreUnit.source;
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     asyncUnit.types = <ClassElement>[
@@ -1191,7 +1192,8 @@
       futureOrType.element,
       streamType.element
     ];
-    asyncUnit.source = new TestSource('dart:async');
+
+    asyncUnit.source = new StringSource('', null, uri: Uri.parse('dart:async'));
     asyncUnit.librarySource = asyncUnit.source;
     LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
         null, null, AstTestFactory.libraryIdentifier2(["dart.core"]), true);