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

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

Issue 245113006: Consistently type check analysis server request parameters. (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 10421c73d4d952e33b9a9084a2b92af0a533b761..358aea07bb02fa41fa300b678b9a44a519e27b3e 100644
--- a/pkg/analysis_server/test/domain_context_test.dart
+++ b/pkg/analysis_server/test/domain_context_test.dart
@@ -36,6 +36,7 @@ class ContextDomainHandlerTest {
Request request = new Request('0', ContextDomainHandler.APPLY_CHANGES_NAME);
request.setParameter(ContextDomainHandler.CONTEXT_ID_PARAM, contextId);
+ request.setParameter(ContextDomainHandler.SOURCES_PARAM, []);
request.setParameter(ContextDomainHandler.CHANGES_PARAM, {
ContextDomainHandler.ADDED_PARAM : ['ffile:/one.dart'],
ContextDomainHandler.MODIFIED_PARAM : ['ffile:/two.dart'],
@@ -53,11 +54,13 @@ class ContextDomainHandlerTest {
Request request = new Request('0', ContextDomainHandler.APPLY_CHANGES_NAME);
ContextDomainHandler handler = new ContextDomainHandler(server);
SourceFactory sourceFactory = new SourceFactory([new FileUriResolver()]);
- ChangeSet changeSet = handler.createChangeSet(request, sourceFactory, {
- ContextDomainHandler.ADDED_PARAM : ['ffile:/one.dart'],
- ContextDomainHandler.MODIFIED_PARAM : [],
- ContextDomainHandler.REMOVED_PARAM : ['ffile:/two.dart', 'ffile:/three.dart']
- });
+ ChangeSet changeSet = handler.createChangeSet(request, sourceFactory,
+ new RequestDatum(request, ContextDomainHandler.CHANGES_PARAM, {
+ ContextDomainHandler.ADDED_PARAM: ['ffile:/one.dart'],
+ ContextDomainHandler.MODIFIED_PARAM: [],
+ ContextDomainHandler.REMOVED_PARAM: ['ffile:/two.dart',
+ 'ffile:/three.dart']
+ }));
expect(changeSet.addedSources, hasLength(equals(1)));
expect(changeSet.changedSources, hasLength(equals(0)));
expect(changeSet.removedSources, hasLength(equals(2)));

Powered by Google App Engine
This is Rietveld 408576698