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

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

Issue 1159623013: Fix more tests for the new task model (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | no next file » | 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 library test.domain.analysis; 5 library test.domain.analysis;
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 packageMapProvider.dependencies.add(pkgDependency); 305 packageMapProvider.dependencies.add(pkgDependency);
306 // Create project and wait for analysis 306 // Create project and wait for analysis
307 createProject(); 307 createProject();
308 return waitForTasksFinished().then((_) { 308 return waitForTasksFinished().then((_) {
309 expect(filesErrors[testFile], isNotEmpty); 309 expect(filesErrors[testFile], isNotEmpty);
310 // Add the package to the package map and tickle the package dependency. 310 // Add the package to the package map and tickle the package dependency.
311 packageMapProvider.packageMap = { 311 packageMapProvider.packageMap = {
312 'pkgA': [resourceProvider.getResource('/packages/pkgA')] 312 'pkgA': [resourceProvider.getResource('/packages/pkgA')]
313 }; 313 };
314 resourceProvider.modifyFile(pkgDependency, 'new contents'); 314 resourceProvider.modifyFile(pkgDependency, 'new contents');
315 // Let the server time to notice the file has changed, then let 315 // Give the server time to notice the file has changed, then let
316 // analysis omplete. There should now be no error. 316 // analysis complete. There should now be no error.
317 return pumpEventQueue().then((_) => waitForTasksFinished()).then((_) { 317 return pumpEventQueue().then((_) => waitForTasksFinished()).then((_) {
318 expect(filesErrors[testFile], isEmpty); 318 expect(filesErrors[testFile], isEmpty);
319 }); 319 });
320 }); 320 });
321 } 321 }
322 322
323 test_setRoots_packages() { 323 test_setRoots_packages() {
324 // prepare package 324 // prepare package
325 String pkgFile = '/packages/pkgA/libA.dart'; 325 String pkgFile = '/packages/pkgA/libA.dart';
326 resourceProvider.newFile(pkgFile, ''' 326 resourceProvider.newFile(pkgFile, '''
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 test_beforeAnalysis() async { 697 test_beforeAnalysis() async {
698 addTestFile('int V = 42;'); 698 addTestFile('int V = 42;');
699 createProject(); 699 createProject();
700 // subscribe 700 // subscribe
701 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); 701 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile);
702 // wait for analysis 702 // wait for analysis
703 await waitForTasksFinished(); 703 await waitForTasksFinished();
704 expect(filesHighlights[testFile], isNotEmpty); 704 expect(filesHighlights[testFile], isNotEmpty);
705 } 705 }
706 } 706 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698