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

Unified Diff: pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart

Issue 2921683002: Normalize URIs on entry to ValidatingInstrumentation. (Closed)
Patch Set: Created 3 years, 7 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/lib/src/fasta/testing/validating_instrumentation.dart
diff --git a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
index 60311fc27e3c0ffa6c2c10f49c04a50e675e9b8d..e62ede56ac3c587c29db9965d08421340c353473 100644
--- a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
+++ b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
@@ -78,6 +78,7 @@ class ValidatingInstrumentation implements Instrumentation {
/// Updates the source file at [uri] based on the actual property/value
/// pairs that were observed.
Future<Null> fixSource(Uri uri, bool offsetsCountCharacters) async {
+ uri = Uri.base.resolveUri(uri);
var fixes = _fixes[uri];
if (fixes == null) return;
File file = new File.fromUri(uri);
@@ -104,6 +105,7 @@ class ValidatingInstrumentation implements Instrumentation {
///
/// Should be called before [finish].
Future<Null> loadExpectations(Uri uri) async {
+ uri = Uri.base.resolveUri(uri);
var bytes = await readBytesFromFile(uri);
var expectations = _unsatisfiedExpectations.putIfAbsent(uri, () => {});
var testedFeaturesState = _testedFeaturesState.putIfAbsent(uri, () => {});
@@ -153,6 +155,7 @@ class ValidatingInstrumentation implements Instrumentation {
@override
void record(
Uri uri, int offset, String property, InstrumentationValue value) {
+ uri = Uri.base.resolveUri(uri);
var expectationsForUri = _unsatisfiedExpectations[uri];
if (expectationsForUri == null) return;
var expectationsAtOffset = expectationsForUri[offset];

Powered by Google App Engine
This is Rietveld 408576698