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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/move_file_test.dart

Issue 603753002: Issue 21071. Generate posix-style relative URIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for isRelative check Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/lib/src/services/refactoring/refactoring.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.services.refactoring.move_files; 5 library test.services.refactoring.move_files;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 10 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 */ 197 */
198 Future _assertSuccessfulRefactoring() { 198 Future _assertSuccessfulRefactoring() {
199 return assertRefactoringConditionsOK().then((_) { 199 return assertRefactoringConditionsOK().then((_) {
200 return refactoring.createChange().then((SourceChange refactoringChange) { 200 return refactoring.createChange().then((SourceChange refactoringChange) {
201 this.refactoringChange = refactoringChange; 201 this.refactoringChange = refactoringChange;
202 }); 202 });
203 }); 203 });
204 } 204 }
205 205
206 void _createRefactoring(String newName) { 206 void _createRefactoring(String newName) {
207 refactoring = new MoveFileRefactoring(searchEngine, context, testSource); 207 refactoring = new MoveFileRefactoring(
208 provider.pathContext,
209 searchEngine,
210 context,
211 testSource);
208 refactoring.newFile = newName; 212 refactoring.newFile = newName;
209 } 213 }
210 214
211 void _performAnalysis() { 215 void _performAnalysis() {
212 while (true) { 216 while (true) {
213 AnalysisResult result = context.performAnalysisTask(); 217 AnalysisResult result = context.performAnalysisTask();
214 if (!result.hasMoreWork) { 218 if (!result.hasMoreWork) {
215 break; 219 break;
216 } 220 }
217 for (ChangeNotice notice in result.changeNotices) { 221 for (ChangeNotice notice in result.changeNotices) {
218 if (notice.source.fullName.startsWith('/project/')) { 222 if (notice.source.fullName.startsWith('/project/')) {
219 index.indexUnit(context, notice.compilationUnit); 223 index.indexUnit(context, notice.compilationUnit);
220 } 224 }
221 } 225 }
222 } 226 }
223 } 227 }
224 } 228 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/refactoring/refactoring.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698