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

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

Issue 869153003: Prioritize analysis operations for contexts with priority files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 mocks; 5 library mocks;
6 6
7 @MirrorsUsed(targets: 'mocks', override: '*') 7 @MirrorsUsed(targets: 'mocks', override: '*')
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 MockServerOperation(this.priority, this._perform); 317 MockServerOperation(this.priority, this._perform);
318 318
319 @override 319 @override
320 AnalysisContext get context => null; 320 AnalysisContext get context => null;
321 321
322 @override 322 @override
323 bool get isContinue => false; 323 bool get isContinue => false;
324 324
325 @override 325 @override
326 bool get isPriority => null;
327
328 @override
329 void perform(AnalysisServer server) => this._perform(server); 326 void perform(AnalysisServer server) => this._perform(server);
330 } 327 }
331 328
332 329
333 /** 330 /**
334 * A mock [WebSocket] for testing. 331 * A mock [WebSocket] for testing.
335 */ 332 */
336 class MockSocket<T> implements WebSocket { 333 class MockSocket<T> implements WebSocket {
337 StreamController controller = new StreamController(); 334 StreamController controller = new StreamController();
338 MockSocket twin; 335 MockSocket twin;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 } 498 }
502 return mismatchDescription; 499 return mismatchDescription;
503 } 500 }
504 501
505 @override 502 @override
506 bool matches(item, Map matchState) { 503 bool matches(item, Map matchState) {
507 Response response = item; 504 Response response = item;
508 return response != null && response.id == _id && response.error == null; 505 return response != null && response.id == _id && response.error == null;
509 } 506 }
510 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698