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

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

Issue 339933006: Fix for subscribing for notifications after analysis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for review comments Created 6 years, 6 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.analysis.notification.navigation; 5 library test.domain.analysis.notification.navigation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 class AAA { 227 class AAA {
228 int fff = 123; 228 int fff = 123;
229 AAA(this.fff); 229 AAA(this.fff);
230 } 230 }
231 '''); 231 ''');
232 return prepareNavigation(() { 232 return prepareNavigation(() {
233 assertHasRegionTarget('fff);', 'fff = 123'); 233 assertHasRegionTarget('fff);', 'fff = 123');
234 }); 234 });
235 } 235 }
236 236
237 test_afterAnalysis() {
238 addTestFile('''
239 class AAA {}
240 AAA aaa;
241 ''');
242 return waitForTasksFinished().then((_) {
243 return prepareNavigation(() {
244 assertHasRegionTarget('AAA aaa;', 'AAA {}');
245 });
246 });
247 }
248
237 test_identifier_resolved() { 249 test_identifier_resolved() {
238 addTestFile(''' 250 addTestFile('''
239 class AAA {} 251 class AAA {}
240 main() { 252 main() {
241 AAA aaa = null; 253 AAA aaa = null;
242 print(aaa); 254 print(aaa);
243 } 255 }
244 '''); 256 ''');
245 return prepareNavigation(() { 257 return prepareNavigation(() {
246 assertHasRegionTarget('AAA aaa', 'AAA {}'); 258 assertHasRegionTarget('AAA aaa', 'AAA {}');
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 466 }
455 467
456 468
457 class _NavigationTarget { 469 class _NavigationTarget {
458 final String file; 470 final String file;
459 final int offset; 471 final int offset;
460 final int length; 472 final int length;
461 473
462 _NavigationTarget(this.file, this.offset, this.length); 474 _NavigationTarget(this.file, this.offset, this.length);
463 } 475 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/test/analysis_notification_outline_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698