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

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

Issue 1149723004: Fix context creation in tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Back-out unintended change Created 5 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/mock_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/mock_sdk.dart
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
index d23f7a5c1a02ab88fbcddebbbc9416c282480512..78ee244f3bd89539099c7a0a2f2a5ffca6b3a0fb 100644
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ b/pkg/analysis_server/test/mock_sdk.dart
@@ -6,6 +6,7 @@ library testing.mock_sdk;
import 'package:analyzer/file_system/file_system.dart' as resource;
import 'package:analyzer/file_system/memory_file_system.dart' as resource;
+import 'package:analyzer/src/context/context.dart' as newContext;
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
@@ -203,7 +204,11 @@ external void printToConsole(String line);
@override
AnalysisContext get context {
if (_analysisContext == null) {
- _analysisContext = new SdkAnalysisContext();
+ if (AnalysisEngine.instance.useTaskModel) {
+ _analysisContext = new newContext.SdkAnalysisContext();
+ } else {
+ _analysisContext = new SdkAnalysisContext();
+ }
SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
_analysisContext.sourceFactory = factory;
ChangeSet changeSet = new ChangeSet();
« no previous file with comments | « no previous file | pkg/analyzer/test/src/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698