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

Side by Side Diff: pkg/analysis_server/test/integration/server_domain_inttest.dart

Issue 405473006: Three new analysis server integration tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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.integration.server.domain; 5 library test.integration.server.domain;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_testing/reflective_tests.dart'; 9 import 'package:analysis_testing/reflective_tests.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 var y; 64 var y;
65 }'''); 65 }''');
66 // Analysis should eventually complete, and we should be notified 66 // Analysis should eventually complete, and we should be notified
67 // about it. 67 // about it.
68 return analysisFinished; 68 return analysisFinished;
69 }); 69 });
70 }); 70 });
71 }); 71 });
72 } 72 }
73 73
74 test_setSubscriptions_invalidService() {
75 // TODO(paulberry): verify that if an invalid service is specified, the
76 // current subscriptions are unchanged.
77 return server_setSubscriptions(['bogus']).then((_) {
78 fail('setSubscriptions should have produced an error');
79 }, onError: (error) {
80 // The expected error occurred.
81 });
82 }
83
74 test_connected() { 84 test_connected() {
75 Completer receivedConnected = new Completer(); 85 Completer receivedConnected = new Completer();
76 server.onNotification('server.connected').listen((params) { 86 server.onNotification('server.connected').listen((params) {
77 expect(receivedConnected.isCompleted, isFalse); 87 expect(receivedConnected.isCompleted, isFalse);
78 receivedConnected.complete(); 88 receivedConnected.complete();
79 expect(params, isNull); 89 expect(params, isNull);
80 }); 90 });
81 return receivedConnected.future; 91 return receivedConnected.future;
82 } 92 }
83 93
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return analysisBegun.future.then((_) { 127 return analysisBegun.future.then((_) {
118 expect(analysisFinished.isCompleted, isFalse); 128 expect(analysisFinished.isCompleted, isFalse);
119 return analysisFinished.future; 129 return analysisFinished.future;
120 }); 130 });
121 } 131 }
122 } 132 }
123 133
124 main() { 134 main() {
125 runReflectiveTests(ServerDomainIntegrationTest); 135 runReflectiveTests(ServerDomainIntegrationTest);
126 } 136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698