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

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

Issue 337943002: Adjust server for API changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug 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 11 matching lines...) Expand all
22 } 22 }
23 23
24 24
25 @ReflectiveTestCase() 25 @ReflectiveTestCase()
26 class AnalysisNotificationNavigationTest extends AbstractAnalysisTest { 26 class AnalysisNotificationNavigationTest extends AbstractAnalysisTest {
27 List<_NavigationRegion> regions; 27 List<_NavigationRegion> regions;
28 _NavigationRegion testRegion; 28 _NavigationRegion testRegion;
29 List<_NavigationTarget> testTargets; 29 List<_NavigationTarget> testTargets;
30 30
31 void processNotification(Notification notification) { 31 void processNotification(Notification notification) {
32 if (notification.event == NOTIFICATION_NAVIGATION) { 32 if (notification.event == ANALYSIS_NAVIGATION) {
33 String file = notification.getParameter(FILE); 33 String file = notification.getParameter(FILE);
34 if (file == testFile) { 34 if (file == testFile) {
35 regions = []; 35 regions = [];
36 List<Map<String, Object>> regionsJson = notification.getParameter(REGION S); 36 List<Map<String, Object>> regionsJson = notification.getParameter(REGION S);
37 for (Map<String, Object> regionJson in regionsJson) { 37 for (Map<String, Object> regionJson in regionsJson) {
38 var regionOffset = regionJson['offset']; 38 var regionOffset = regionJson['offset'];
39 var regionLength = regionJson['length']; 39 var regionLength = regionJson['length'];
40 List<_NavigationTarget> targets = []; 40 List<_NavigationTarget> targets = [];
41 for (Map<String, Object> targetJson in regionJson['targets']) { 41 for (Map<String, Object> targetJson in regionJson['targets']) {
42 var targetFile = targetJson['file']; 42 var targetFile = targetJson['file'];
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 448 }
449 449
450 450
451 class _NavigationTarget { 451 class _NavigationTarget {
452 final String file; 452 final String file;
453 final int offset; 453 final int offset;
454 final int length; 454 final int length;
455 455
456 _NavigationTarget(this.file, this.offset, this.length); 456 _NavigationTarget(this.file, this.offset, this.length);
457 } 457 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.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