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

Side by Side Diff: pkg/analysis_server/test/domain_context_test.dart

Issue 284103005: move context id constant to AnalysisServer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.domain.context; 5 library test.domain.context;
6 6
7 import 'package:analyzer/src/generated/engine.dart'; 7 import 'package:analyzer/src/generated/engine.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/generated/source_io.dart'; 9 import 'package:analyzer/src/generated/source_io.dart';
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 expect(response.toJson(), equals({ 126 expect(response.toJson(), equals({
127 Response.ID: '0' 127 Response.ID: '0'
128 })); 128 }));
129 } 129 }
130 130
131 static String _createContext(AnalysisServer server) { 131 static String _createContext(AnalysisServer server) {
132 String contextId = "context${contextIdCounter++}"; 132 String contextId = "context${contextIdCounter++}";
133 ServerDomainHandler handler = new ServerDomainHandler(server); 133 ServerDomainHandler handler = new ServerDomainHandler(server);
134 Request request = new Request('0', ServerDomainHandler.CREATE_CONTEXT_METHOD ); 134 Request request = new Request('0', ServerDomainHandler.CREATE_CONTEXT_METHOD );
135 request.setParameter(ServerDomainHandler.SDK_DIRECTORY_PARAM, sdkPath); 135 request.setParameter(ServerDomainHandler.SDK_DIRECTORY_PARAM, sdkPath);
136 request.setParameter(ServerDomainHandler.CONTEXT_ID_PARAM, contextId); 136 request.setParameter(AnalysisServer.CONTEXT_ID_PARAM, contextId);
137 Response response = handler.handleRequest(request); 137 Response response = handler.handleRequest(request);
138 if (response.error != null) { 138 if (response.error != null) {
139 fail('Unexpected error: ${response.error.toJson()}'); 139 fail('Unexpected error: ${response.error.toJson()}');
140 } 140 }
141 return contextId; 141 return contextId;
142 } 142 }
143 } 143 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | pkg/analysis_server/test/domain_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698