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

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

Issue 1401403006: Use new task model in completion tests [TBR]. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/domain_completion_test.dart
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index b29650832f1e7a386510f9c3d19ad6d62ae5fde0..f0d6f83690428c2519316dc6bc9c1504e2e3c3e7 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -54,6 +54,9 @@ class CompletionManagerTest extends AbstractAnalysisTest {
int requestCount = 0;
String testFile2 = '/project/bin/test2.dart';
+ /// Cached model state in case tests need to set task model to on/off.
+ bool wasTaskModelEnabled;
+
AnalysisServer createAnalysisServer(Index index) {
ExtensionManager manager = new ExtensionManager();
ServerPlugin serverPlugin = new ServerPlugin();
@@ -84,6 +87,8 @@ class CompletionManagerTest extends AbstractAnalysisTest {
@override
void setUp() {
super.setUp();
+ wasTaskModelEnabled = AnalysisEngine.instance.useTaskModel;
+ AnalysisEngine.instance.useTaskModel = true;
createProject();
analysisDomain = handler;
completionDomain = new Test_CompletionDomainHandler(server);
@@ -96,6 +101,7 @@ class CompletionManagerTest extends AbstractAnalysisTest {
super.tearDown();
analysisDomain = null;
completionDomain = null;
+ AnalysisEngine.instance.useTaskModel = wasTaskModelEnabled;
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698