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

Unified Diff: pkg/analysis_server/test/abstract_context.dart

Issue 2859993004: Convert some tests to use the driver and prepare for others to be converted (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/analysis_server/test/abstract_context.dart
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index 81464a946bce7e2db67ddc6ffed937730b742304..34986c12761702a51d586f664d5728dd375bcf6e 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -98,19 +98,18 @@ class Required {
Source addSource(String path, String content, [Uri uri]) {
File file = newFile(path, content);
+ Source source = file.createSource(uri);
if (enableNewAnalysisDriver) {
driver.addFile(path);
driver.changeFile(path);
_fileContentOverlay[path] = content;
- return null;
} else {
- Source source = file.createSource(uri);
ChangeSet changeSet = new ChangeSet();
changeSet.addedSource(source);
context.applyChanges(changeSet);
context.setContents(source, content);
- return source;
}
+ return source;
}
File newFile(String path, [String content]) =>

Powered by Google App Engine
This is Rietveld 408576698