| OLD | NEW | 
|    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.analysis_server; |    5 library test.analysis_server; | 
|    6  |    6  | 
|    7 import 'dart:async'; |    7 import 'dart:async'; | 
|    8  |    8  | 
|    9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |    9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 
|   10 import 'package:analysis_server/src/analysis_server.dart'; |   10 import 'package:analysis_server/src/analysis_server.dart'; | 
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  214     server.serverServices = [ServerService.STATUS].toSet(); |  214     server.serverServices = [ServerService.STATUS].toSet(); | 
|  215     // Analyze project foo containing foo.dart and project bar containing |  215     // Analyze project foo containing foo.dart and project bar containing | 
|  216     // bar.dart. |  216     // bar.dart. | 
|  217     resourceProvider.newFolder('/foo'); |  217     resourceProvider.newFolder('/foo'); | 
|  218     resourceProvider.newFolder('/bar'); |  218     resourceProvider.newFolder('/bar'); | 
|  219     File foo = resourceProvider.newFile('/foo/foo.dart', 'library lib;'); |  219     File foo = resourceProvider.newFile('/foo/foo.dart', 'library lib;'); | 
|  220     Source fooSource = foo.createSource(); |  220     Source fooSource = foo.createSource(); | 
|  221     File bar = resourceProvider.newFile('/bar/bar.dart', 'library lib;'); |  221     File bar = resourceProvider.newFile('/bar/bar.dart', 'library lib;'); | 
|  222     Source barSource = bar.createSource(); |  222     Source barSource = bar.createSource(); | 
|  223     server.setAnalysisRoots('0', ['/foo', '/bar'], [], {}); |  223     server.setAnalysisRoots('0', ['/foo', '/bar'], [], {}); | 
|  224     return pumpEventQueue(200).then((_) { |  224     return pumpEventQueue(500).then((_) { | 
|  225       expect(server.statusAnalyzing, isFalse); |  225       expect(server.statusAnalyzing, isFalse); | 
|  226       // Make sure getAnalysisContext returns the proper context for each. |  226       // Make sure getAnalysisContext returns the proper context for each. | 
|  227       AnalysisContext fooContext = |  227       AnalysisContext fooContext = | 
|  228           server.getAnalysisContextForSource(fooSource); |  228           server.getAnalysisContextForSource(fooSource); | 
|  229       expect(fooContext, isNotNull); |  229       expect(fooContext, isNotNull); | 
|  230       AnalysisContext barContext = |  230       AnalysisContext barContext = | 
|  231           server.getAnalysisContextForSource(barSource); |  231           server.getAnalysisContextForSource(barSource); | 
|  232       expect(barContext, isNotNull); |  232       expect(barContext, isNotNull); | 
|  233       expect(fooContext, isNot(same(barContext))); |  233       expect(fooContext, isNot(same(barContext))); | 
|  234       expect(fooContext.getKindOf(fooSource), SourceKind.LIBRARY); |  234       expect(fooContext.getKindOf(fooSource), SourceKind.LIBRARY); | 
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  514   _MockServerOperation(this.context); |  514   _MockServerOperation(this.context); | 
|  515  |  515  | 
|  516   @override |  516   @override | 
|  517   ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; |  517   ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; | 
|  518  |  518  | 
|  519   @override |  519   @override | 
|  520   void perform(AnalysisServer server) { |  520   void perform(AnalysisServer server) { | 
|  521     isComplete = true; |  521     isComplete = true; | 
|  522   } |  522   } | 
|  523 } |  523 } | 
| OLD | NEW |