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

Unified Diff: pkg/analysis_server/test/analysis/notification_occurrences_test.dart

Issue 2933943002: Convert more tests to 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/analysis/notification_occurrences_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
index 322f5f78bcbdd7f78d77e7ddceb9c258deec4a3e..17852cab29762b5104f30257194c22e6697cd772 100644
--- a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
@@ -24,8 +24,7 @@ class AnalysisNotificationOccurrencesTest extends AbstractAnalysisTest {
List<Occurrences> occurrencesList;
Occurrences testOccurrences;
- @override
- bool get enableNewAnalysisDriver => false;
+ Completer _resultsAvailable = new Completer();
/**
* Asserts that there is an offset of [search] in [testOccurrences].
@@ -80,7 +79,7 @@ class AnalysisNotificationOccurrencesTest extends AbstractAnalysisTest {
Future prepareOccurrences() {
addAnalysisSubscription(AnalysisService.OCCURRENCES, testFile);
- return waitForTasksFinished();
+ return _resultsAvailable.future;
}
void processNotification(Notification notification) {
@@ -88,6 +87,7 @@ class AnalysisNotificationOccurrencesTest extends AbstractAnalysisTest {
var params = new AnalysisOccurrencesParams.fromNotification(notification);
if (params.file == testFile) {
occurrencesList = params.occurrences;
+ _resultsAvailable.complete(null);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698