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

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

Issue 337383005: PackageMapUriResolver for Dart server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 10 matching lines...) Expand all
21 }); 21 });
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 @override
32 void setUp() {
33 super.setUp();
34 createProject();
35 }
36
31 void processNotification(Notification notification) { 37 void processNotification(Notification notification) {
32 if (notification.event == ANALYSIS_NAVIGATION) { 38 if (notification.event == ANALYSIS_NAVIGATION) {
33 String file = notification.getParameter(FILE); 39 String file = notification.getParameter(FILE);
34 if (file == testFile) { 40 if (file == testFile) {
35 regions = []; 41 regions = [];
36 List<Map<String, Object>> regionsJson = notification.getParameter(REGION S); 42 List<Map<String, Object>> regionsJson = notification.getParameter(REGION S);
37 for (Map<String, Object> regionJson in regionsJson) { 43 for (Map<String, Object> regionJson in regionsJson) {
38 var regionOffset = regionJson['offset']; 44 var regionOffset = regionJson['offset'];
39 var regionLength = regionJson['length']; 45 var regionLength = regionJson['length'];
40 List<_NavigationTarget> targets = []; 46 List<_NavigationTarget> targets = [];
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 454 }
449 455
450 456
451 class _NavigationTarget { 457 class _NavigationTarget {
452 final String file; 458 final String file;
453 final int offset; 459 final int offset;
454 final int length; 460 final int length;
455 461
456 _NavigationTarget(this.file, this.offset, this.length); 462 _NavigationTarget(this.file, this.offset, this.length);
457 } 463 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698