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

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

Issue 1341343002: Remove unused setter from ServerStarter and un-deprecate a used setter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/lib/starter.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.socket.server; 5 library test.socket.server;
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 static SocketServer _createSocketServer() { 110 static SocketServer _createSocketServer() {
111 ServerPlugin serverPlugin = new ServerPlugin(); 111 ServerPlugin serverPlugin = new ServerPlugin();
112 ExtensionManager manager = new ExtensionManager(); 112 ExtensionManager manager = new ExtensionManager();
113 manager.processPlugins([serverPlugin]); 113 manager.processPlugins([serverPlugin]);
114 return new SocketServer( 114 return new SocketServer(
115 new AnalysisServerOptions(), 115 new AnalysisServerOptions(),
116 DirectoryBasedDartSdk.defaultSdk, 116 DirectoryBasedDartSdk.defaultSdk,
117 InstrumentationService.NULL_SERVICE, 117 InstrumentationService.NULL_SERVICE,
118 serverPlugin, 118 serverPlugin,
119 null,
120 null); 119 null);
121 } 120 }
122 } 121 }
123 122
124 class _MockRequestHandler implements RequestHandler { 123 class _MockRequestHandler implements RequestHandler {
125 final bool futureException; 124 final bool futureException;
126 125
127 _MockRequestHandler(this.futureException); 126 _MockRequestHandler(this.futureException);
128 127
129 @override 128 @override
130 Response handleRequest(Request request) { 129 Response handleRequest(Request request) {
131 if (futureException) { 130 if (futureException) {
132 new Future(throwException); 131 new Future(throwException);
133 return new Response(request.id); 132 return new Response(request.id);
134 } 133 }
135 throw 'mock request exception'; 134 throw 'mock request exception';
136 } 135 }
137 136
138 void throwException() { 137 void throwException() {
139 throw 'mock future exception'; 138 throw 'mock future exception';
140 } 139 }
141 } 140 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/starter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698