| Index: pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
|
| diff --git a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
|
| index 5450e60b15a0b449f248ba5888a821196d7b57a4..5cd0820c4b5c5e9bcdf9774a818f609b4598587c 100644
|
| --- a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
|
| +++ b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
|
| @@ -262,18 +262,15 @@ class Pivot /* target */ extends Base2 {}
|
| return Future.forEach(tests, (test) => test());
|
| }
|
|
|
| - Future<HierarchyResults> typeHierarchyTest(String text) {
|
| + Future<HierarchyResults> typeHierarchyTest(String text) async {
|
| int offset = text.indexOf(' /* target */') - 1;
|
| sendAnalysisUpdateContent({pathname: new AddContentOverlay(text)});
|
| - return analysisFinished
|
| - .then((_) => sendSearchGetTypeHierarchy(pathname, offset))
|
| - .then((result) {
|
| - if (result.hierarchyItems == null) {
|
| - return null;
|
| - } else {
|
| - return new HierarchyResults(
|
| - result.hierarchyItems as List<TypeHierarchyItem>);
|
| - }
|
| - });
|
| + await analysisFinished;
|
| + var result = await sendSearchGetTypeHierarchy(pathname, offset);
|
| + if (result.hierarchyItems == null) {
|
| + return null;
|
| + } else {
|
| + return new HierarchyResults(result.hierarchyItems);
|
| + }
|
| }
|
| }
|
|
|