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

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

Issue 2669353002: Stop using Element.computeNode() in refactorings and fixes. (Closed)
Patch Set: documentation comments Created 3 years, 10 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
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.inline_local; 5 library test.services.refactoring.inline_local;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element; 7 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
8 import 'package:analysis_server/src/services/correction/status.dart'; 8 import 'package:analysis_server/src/services/correction/status.dart';
9 import 'package:analysis_server/src/services/refactoring/inline_local.dart'; 9 import 'package:analysis_server/src/services/refactoring/inline_local.dart';
10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 10 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 void _assert_fatalError_selection(RefactoringStatus status) { 629 void _assert_fatalError_selection(RefactoringStatus status) {
630 expect(refactoring.variableName, isNull); 630 expect(refactoring.variableName, isNull);
631 expect(refactoring.referenceCount, 0); 631 expect(refactoring.referenceCount, 0);
632 assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL, 632 assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
633 expectedMessage: 'Local variable declaration or reference must be ' 633 expectedMessage: 'Local variable declaration or reference must be '
634 'selected to activate this refactoring.'); 634 'selected to activate this refactoring.');
635 } 635 }
636 636
637 void _createRefactoring(String search) { 637 void _createRefactoring(String search) {
638 int offset = findOffset(search); 638 int offset = findOffset(search);
639 refactoring = new InlineLocalRefactoring(searchEngine, testUnit, offset); 639 refactoring =
640 new InlineLocalRefactoring(searchEngine, astProvider, testUnit, offset);
640 } 641 }
641 } 642 }
642 643
643 @reflectiveTest 644 @reflectiveTest
644 class InlineLocalTest_Driver extends InlineLocalTest { 645 class InlineLocalTest_Driver extends InlineLocalTest {
645 @override 646 @override
646 bool get enableNewAnalysisDriver => true; 647 bool get enableNewAnalysisDriver => true;
647 } 648 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698