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

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

Issue 2890163004: Add requestTime to responses (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/edit/assists_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_generated.dart'; 8 import 'package:analysis_server/protocol/protocol_generated.dart';
9 import 'package:analysis_server/src/plugin/plugin_manager.dart'; 9 import 'package:analysis_server/src/plugin/plugin_manager.dart';
10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' ; 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' ;
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 ^ 704 ^
705 } 705 }
706 '''); 706 ''');
707 PluginInfo info = new DiscoveredPluginInfo('a', 'b', 'c', null, null); 707 PluginInfo info = new DiscoveredPluginInfo('a', 'b', 'c', null, null);
708 plugin.CompletionGetSuggestionsResult result = 708 plugin.CompletionGetSuggestionsResult result =
709 new plugin.CompletionGetSuggestionsResult(1, 2, <CompletionSuggestion>[ 709 new plugin.CompletionGetSuggestionsResult(1, 2, <CompletionSuggestion>[
710 new CompletionSuggestion(CompletionSuggestionKind.IDENTIFIER, 710 new CompletionSuggestion(CompletionSuggestionKind.IDENTIFIER,
711 DART_RELEVANCE_DEFAULT, 'plugin completion', 3, 0, false, false) 711 DART_RELEVANCE_DEFAULT, 'plugin completion', 3, 0, false, false)
712 ]); 712 ]);
713 pluginManager.broadcastResults = <PluginInfo, Future<plugin.Response>>{ 713 pluginManager.broadcastResults = <PluginInfo, Future<plugin.Response>>{
714 info: new Future.value(result.toResponse('-')) 714 info: new Future.value(result.toResponse('-', 1))
715 }; 715 };
716 await getSuggestions(); 716 await getSuggestions();
717 assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'plugin completion', 717 assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'plugin completion',
718 selectionOffset: 3); 718 selectionOffset: 3);
719 } 719 }
720 720
721 test_simple() { 721 test_simple() {
722 addTestFile(''' 722 addTestFile('''
723 void main() { 723 void main() {
724 ^ 724 ^
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 766
767 @override 767 @override
768 Future sort( 768 Future sort(
769 CompletionRequest request, Iterable<CompletionSuggestion> suggestions) { 769 CompletionRequest request, Iterable<CompletionSuggestion> suggestions) {
770 if (!enabled) { 770 if (!enabled) {
771 throw 'unexpected sort'; 771 throw 'unexpected sort';
772 } 772 }
773 return new Future.value(); 773 return new Future.value();
774 } 774 }
775 } 775 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/edit/assists_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698