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

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

Issue 243753002: Analysis server context ID is now specified by the client. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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_context_test.dart
diff --git a/pkg/analysis_server/test/domain_context_test.dart b/pkg/analysis_server/test/domain_context_test.dart
index c66856eb7811879368afea23b378452393d6acbf..10421c73d4d952e33b9a9084a2b92af0a533b761 100644
--- a/pkg/analysis_server/test/domain_context_test.dart
+++ b/pkg/analysis_server/test/domain_context_test.dart
@@ -26,6 +26,8 @@ main() {
}
class ContextDomainHandlerTest {
+ static int contextIdCounter = 0;
+
static void applyChanges() {
AnalysisServer server = new AnalysisServer(new MockServerChannel());
String contextId = _createContext(server);
@@ -111,14 +113,15 @@ class ContextDomainHandlerTest {
}
static String _createContext(AnalysisServer server) {
+ String contextId = "context${contextIdCounter++}";
ServerDomainHandler handler = new ServerDomainHandler(server);
Request request = new Request('0', ServerDomainHandler.CREATE_CONTEXT_METHOD);
request.setParameter(ServerDomainHandler.SDK_DIRECTORY_PARAM, sdkPath);
+ request.setParameter(ServerDomainHandler.CONTEXT_ID_PARAM, contextId);
Response response = handler.handleRequest(request);
if (response.error != null) {
fail('Unexpected error: ${response.error.toJson()}');
}
- expect(response.error, isNull);
- return response.getResult(ServerDomainHandler.CONTEXT_ID_RESULT);
+ return contextId;
}
}

Powered by Google App Engine
This is Rietveld 408576698