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

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

Issue 2622133007: Fix for test_uriDoesNotExist_import_disappears_when_fixed(). (Closed)
Patch Set: 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/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index b3e4254ccfcfcb53902a763c910b3cd625367112..6577d9fdb00ef55b4f9dd3f900e2c2ecd03a2d38 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -6172,16 +6172,21 @@ main() {
await computeAnalysisResult(source);
assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
- // Check that the file is represented as missing.
- Source target = analysisContext2
- .getSourcesWithFullName(resourceProvider.convertPath("/target.dart"))
- .first;
- expect(analysisContext2.getModificationStamp(target), -1);
-
- // Add an overlay in the same way as AnalysisServer.
- analysisContext2
- ..setContents(target, "")
- ..handleContentsChanged(target, null, "", true);
+ String targetPath = resourceProvider.convertPath('/target.dart');
+ if (enableNewAnalysisDriver) {
+ // Add an overlay in the same way as AnalysisServer.
+ fileContentOverlay[targetPath] = '';
+ driver.changeFile(targetPath);
+ } else {
+ // Check that the file is represented as missing.
+ Source target = analysisContext2.getSourcesWithFullName(targetPath).first;
+ expect(analysisContext2.getModificationStamp(target), -1);
+
+ // Add an overlay in the same way as AnalysisServer.
+ analysisContext2
+ ..setContents(target, "")
+ ..handleContentsChanged(target, null, "", true);
+ }
// Make sure the error goes away.
await computeAnalysisResult(source);

Powered by Google App Engine
This is Rietveld 408576698