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

Unified Diff: pkg/front_end/test/fasta/testing/suite.dart

Issue 2986303003: Switch FE to use the libraries.json format. (Closed)
Patch Set: fix issues found on bots Created 3 years, 4 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
« no previous file with comments | « pkg/front_end/messages.yaml ('k') | pkg/front_end/test/fasta/uri_translator_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/fasta/testing/suite.dart
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index bde552d310d394cd078e943e7a5ee4c56911dea8..4cdc6756c732e8337cb74b34add2fa8883d266f1 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -12,6 +12,9 @@ import 'dart:convert' show JSON;
import 'package:front_end/physical_file_system.dart' show PhysicalFileSystem;
+import 'package:front_end/src/base/libraries_specification.dart'
+ show TargetLibrariesSpecification;
+
import 'package:front_end/src/fasta/testing/validating_instrumentation.dart'
show ValidatingInstrumentation;
@@ -155,8 +158,10 @@ class FastaContext extends ChainContext {
Uri sdk = await computePatchedSdk();
Uri vm = computeDartVm(sdk);
Uri packages = Uri.base.resolve(".packages");
- UriTranslator uriTranslator = await UriTranslatorImpl
- .parse(PhysicalFileSystem.instance, sdk, packages: packages);
+ var options = new ProcessedOptions(new CompilerOptions()
+ ..sdkRoot = sdk
+ ..packagesFileUri = packages);
+ UriTranslator uriTranslator = await options.getUriTranslator();
bool strongMode = environment.containsKey(STRONG_MODE);
bool updateExpectations = environment["updateExpectations"] == "true";
bool updateComments = environment["updateComments"] == "true";
@@ -242,8 +247,7 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
// We create a new URI translator to avoid reading platform libraries from
// file system.
UriTranslatorImpl uriTranslator = new UriTranslatorImpl(
- const <String, Uri>{},
- const <String, List<Uri>>{},
+ const TargetLibrariesSpecification('vm'),
context.uriTranslator.packages);
KernelTarget sourceTarget = astKind == AstKind.Analyzer
? new AnalyzerTarget(dillTarget, uriTranslator, strongMode)
« no previous file with comments | « pkg/front_end/messages.yaml ('k') | pkg/front_end/test/fasta/uri_translator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698