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

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

Issue 2939803002: Convert more tests to use the new driver (Closed)
Patch Set: Created 3 years, 6 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/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index f57ba299228c5783b01a90d7c28d3623153bdfba..d654f98c4b0139bdf80e92102c3fa62d4e54f49f 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -649,13 +649,13 @@ class AnalysisTestHelper {
class SetSubscriptionsTest extends AbstractAnalysisTest {
Map<String, List<HighlightRegion>> filesHighlights = {};
- @override
- bool get enableNewAnalysisDriver => false;
+ Completer _resultsAvailable = new Completer();
void processNotification(Notification notification) {
if (notification.event == ANALYSIS_HIGHLIGHTS) {
var params = new AnalysisHighlightsParams.fromNotification(notification);
filesHighlights[params.file] = params.regions;
+ _resultsAvailable.complete(null);
}
}
@@ -667,7 +667,7 @@ class SetSubscriptionsTest extends AbstractAnalysisTest {
expect(filesHighlights[testFile], isNull);
// subscribe
addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile);
- await server.onAnalysisComplete;
+ await _resultsAvailable.future;
// there are results
expect(filesHighlights[testFile], isNotEmpty);
}
@@ -709,7 +709,7 @@ main() {
expect(filesHighlights[pkgFile], isNull);
// subscribe
addAnalysisSubscription(AnalysisService.HIGHLIGHTS, pkgFile);
- await server.onAnalysisComplete;
+ await _resultsAvailable.future;
// there are results
expect(filesHighlights[pkgFile], isNotEmpty);
}
@@ -750,7 +750,7 @@ main() {
expect(filesHighlights[pkgFileA], isNull);
// subscribe
addAnalysisSubscription(AnalysisService.HIGHLIGHTS, pkgFileA);
- await server.onAnalysisComplete;
+ await _resultsAvailable.future;
// there are results
expect(filesHighlights[pkgFileA], isNotEmpty);
}
@@ -774,7 +774,7 @@ class A {}
server.setPriorityFiles('0', [pkgFile]);
// subscribe
addAnalysisSubscription(AnalysisService.HIGHLIGHTS, pkgFile);
- await server.onAnalysisComplete;
+ await _resultsAvailable.future;
// there are results
expect(filesHighlights[pkgFile], isNotEmpty);
}
@@ -788,7 +788,7 @@ class A {}
expect(filesHighlights[file], isNull);
// subscribe
addAnalysisSubscription(AnalysisService.HIGHLIGHTS, file);
- await server.onAnalysisComplete;
+ await _resultsAvailable.future;
// there are results
expect(filesHighlights[file], isNotEmpty);
}
« no previous file with comments | « pkg/analysis_server/test/analysis/notification_implemented_test.dart ('k') | pkg/analysis_server/test/integration/coverage.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698