Version 1.22.0-dev.7.0

Merge 45c3ecdf9c11296a0074416ed53b2e5434b45ab4 into dev
diff --git a/BUILD.gn b/BUILD.gn
index 67a6b43..7b7946c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -49,6 +49,7 @@
   deps = [
     "runtime/bin:dart_bootstrap($host_toolchain)",
     "runtime/bin:dart_precompiled_runtime",
+    "runtime/bin:process_test",
     "runtime/vm:patched_sdk",
   ]
 }
diff --git a/DEPS b/DEPS
index 70e1d42..c896280 100644
--- a/DEPS
+++ b/DEPS
@@ -59,7 +59,7 @@
   "csslib_tag" : "@0.13.2",
   "dart2js_info_tag" : "@0.5.0",
   "dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
-  "dart_style_tag": "@0.2.13",
+  "dart_style_tag": "@0.2.14",
   "dartdoc_tag" : "@v0.9.8+1",
   "fixnum_tag": "@0.10.5",
   "func_tag": "@0.1.0",
@@ -75,7 +75,7 @@
   "isolate_tag": "@0.2.3",
   "jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_tag": "@2.0.2",
-  "linter_rev": "@bde08fddf7a24e73d788e62b1725e4db95533269",
+  "linter_rev": "@393695e77bf95213130935e969e86140cb322667",
   "logging_tag": "@0.11.3+1",
   "markdown_tag": "@0.11.0",
   "matcher_tag": "@0.12.0+2",
@@ -96,7 +96,7 @@
   "pub_semver_tag": "@1.3.0",
   "quiver_tag": "@0.22.0",
   "resource_rev":"@a49101ba2deb29c728acba6fb86000a8f730f4b1",
-  "root_certificates_rev": "@aed07942ce98507d2be28cbd29e879525410c7fc",
+  "root_certificates_rev": "@0068d8911140e591ebb750af296e81940a9906f5",
   "scheduled_test_tag": "@0.12.6",
   "shelf_static_tag": "@0.2.4",
   "shelf_packages_handler_tag": "@1.0.0",
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 52043c8..1f513f4 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -745,7 +745,7 @@
     ldflags = common_optimize_on_ldflags
   } else {
     cflags = [
-      "-O1",
+      "-O2",
       "-fdata-sections",
       "-ffunction-sections",
     ]
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 771f9f1..869bd81 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -242,7 +242,7 @@
   /**
    * The controller that is notified when analysis is started.
    */
-  StreamController<AnalysisContext> _onAnalysisStartedController;
+  StreamController<bool> _onAnalysisStartedController;
 
   /**
    * The controller that is notified when a single file has been analyzed.
@@ -492,9 +492,9 @@
   }
 
   /**
-   * The stream that is notified when analysis of a context is started.
+   * The stream that is notified with `true` when analysis is started.
    */
-  Stream<AnalysisContext> get onAnalysisStarted {
+  Stream<bool> get onAnalysisStarted {
     return _onAnalysisStartedController.stream;
   }
 
@@ -1084,7 +1084,7 @@
    * Schedules analysis of the given context.
    */
   void schedulePerformAnalysisOperation(AnalysisContext context) {
-    _onAnalysisStartedController.add(context);
+    _onAnalysisStartedController.add(true);
     scheduleOperation(new PerformAnalysisOperation(context, false));
   }
 
@@ -1168,6 +1168,9 @@
    * the [status] information.
    */
   void sendStatusNotificationNew(nd.AnalysisStatus status) {
+    if (status.isAnalyzing) {
+      _onAnalysisStartedController.add(true);
+    }
     if (_onAnalysisCompleteCompleter != null && !status.isAnalyzing) {
       _onAnalysisCompleteCompleter.complete();
       _onAnalysisCompleteCompleter = null;
@@ -1832,7 +1835,7 @@
         analysisServer.fileContentOverlay,
         sourceFactory,
         analysisOptions);
-    analysisDriver.name = folder.shortName;
+    analysisDriver.name = folder.path;
     analysisDriver.status.listen((status) {
       // TODO(scheglov) send server status
     });
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index 1214ea4..5768a88 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -500,6 +500,19 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) {
+    computer._addRegion_token(
+        node.functionKeyword, HighlightRegionType.KEYWORD);
+    return super.visitGenericFunctionType(node);
+  }
+
+  @override
+  Object visitGenericTypeAlias(GenericTypeAlias node) {
+    computer._addRegion_token(node.typedefKeyword, HighlightRegionType.KEYWORD);
+    return super.visitGenericTypeAlias(node);
+  }
+
+  @override
   Object visitHideCombinator(HideCombinator node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
     return super.visitHideCombinator(node);
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index 630b41f..184c35d 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -591,6 +591,19 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) {
+    computer._addRegion_token(
+        node.functionKeyword, HighlightRegionType.KEYWORD);
+    return super.visitGenericFunctionType(node);
+  }
+
+  @override
+  Object visitGenericTypeAlias(GenericTypeAlias node) {
+    computer._addRegion_token(node.typedefKeyword, HighlightRegionType.KEYWORD);
+    return super.visitGenericTypeAlias(node);
+  }
+
+  @override
   Object visitHideCombinator(HideCombinator node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
     return super.visitHideCombinator(node);
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index a89ff02..f72cbe9 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -40,7 +40,7 @@
             FieldDeclaration fieldDeclaration = classMember;
             VariableDeclarationList fields = fieldDeclaration.fields;
             if (fields != null) {
-              TypeName fieldType = fields.type;
+              TypeAnnotation fieldType = fields.type;
               String fieldTypeName = _safeToSource(fieldType);
               for (VariableDeclaration field in fields.variables) {
                 classContents.add(_newVariableOutline(fieldTypeName,
@@ -67,7 +67,7 @@
         TopLevelVariableDeclaration fieldDeclaration = unitMember;
         VariableDeclarationList fields = fieldDeclaration.variables;
         if (fields != null) {
-          TypeName fieldType = fields.type;
+          TypeAnnotation fieldType = fields.type;
           String fieldTypeName = _safeToSource(fieldType);
           for (VariableDeclaration field in fields.variables) {
             unitContents.add(_newVariableOutline(
@@ -251,7 +251,7 @@
   }
 
   Outline _newFunctionOutline(FunctionDeclaration function, bool isStatic) {
-    TypeName returnType = function.returnType;
+    TypeAnnotation returnType = function.returnType;
     SimpleIdentifier nameNode = function.name;
     String name = nameNode.name;
     FunctionExpression functionExpression = function.functionExpression;
@@ -285,7 +285,7 @@
   }
 
   Outline _newFunctionTypeAliasOutline(FunctionTypeAlias node) {
-    TypeName returnType = node.returnType;
+    TypeAnnotation returnType = node.returnType;
     SimpleIdentifier nameNode = node.name;
     String name = nameNode.name;
     _SourceRegion sourceRegion = _getSourceRegion(node);
@@ -306,7 +306,7 @@
   }
 
   Outline _newMethodOutline(MethodDeclaration method) {
-    TypeName returnType = method.returnType;
+    TypeAnnotation returnType = method.returnType;
     SimpleIdentifier nameNode = method.name;
     String name = nameNode.name;
     FormalParameterList parameters = method.parameters;
diff --git a/pkg/analysis_server/lib/src/domain_diagnostic.dart b/pkg/analysis_server/lib/src/domain_diagnostic.dart
index 1f2609c..d91aacf 100644
--- a/pkg/analysis_server/lib/src/domain_diagnostic.dart
+++ b/pkg/analysis_server/lib/src/domain_diagnostic.dart
@@ -11,6 +11,7 @@
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart' as nd;
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_collection.dart';
@@ -38,15 +39,19 @@
 
   /// Answer the `diagnostic.diagnostics` request.
   Response computeDiagnostics(Request request) {
-    List<ContextData> infos = <ContextData>[];
-    for (AnalysisContext context in server.analysisContexts) {
-      infos.add(extractData(context));
+    List<ContextData> contexts = <ContextData>[];
+    if (server.options.enableNewAnalysisDriver) {
+      contexts = server.driverMap.values.map(extractDataFromDriver).toList();
+    } else {
+      for (AnalysisContext context in server.analysisContexts) {
+        contexts.add(extractDataFromContext(context));
+      }
     }
-    return new DiagnosticGetDiagnosticsResult(infos).toResponse(request.id);
+    return new DiagnosticGetDiagnosticsResult(contexts).toResponse(request.id);
   }
 
   /// Extract context data from the given [context].
-  ContextData extractData(AnalysisContext context) {
+  ContextData extractDataFromContext(AnalysisContext context) {
     int explicitFiles = 0;
     int implicitFiles = 0;
     int workItems = 0;
@@ -84,6 +89,14 @@
         workItems, exceptions.toList());
   }
 
+  /// Extract context data from the given [driver].
+  ContextData extractDataFromDriver(nd.AnalysisDriver driver) {
+    int explicitFileCount = driver.addedFiles.length;
+    int knownFileCount = driver.knownFiles.length;
+    return new ContextData(driver.name, explicitFileCount,
+        knownFileCount - explicitFileCount, driver.numberOfFilesToAnalyze, []);
+  }
+
   @override
   Response handleRequest(Request request) {
     try {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
index 0db3193..774727d 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
@@ -103,7 +103,7 @@
   }
 
   @override
-  void declaredLocalVar(SimpleIdentifier name, TypeName type) {
+  void declaredLocalVar(SimpleIdentifier name, TypeAnnotation type) {
     // ignored
   }
 
@@ -113,7 +113,7 @@
   }
 
   @override
-  void declaredParam(SimpleIdentifier name, TypeName type) {
+  void declaredParam(SimpleIdentifier name, TypeAnnotation type) {
     // ignored
   }
 
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
index e2b3a46..7b908a8 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
@@ -95,13 +95,13 @@
   void declaredLabel(Label label, bool isCaseLabel) {}
 
   @override
-  void declaredLocalVar(SimpleIdentifier name, TypeName type) {}
+  void declaredLocalVar(SimpleIdentifier name, TypeAnnotation type) {}
 
   @override
   void declaredMethod(MethodDeclaration declaration) {}
 
   @override
-  void declaredParam(SimpleIdentifier name, TypeName type) {}
+  void declaredParam(SimpleIdentifier name, TypeAnnotation type) {}
 
   @override
   void declaredTopLevelVar(
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart
index adf26c7..e290304 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_declaration_visitor.dart
@@ -39,11 +39,11 @@
 
   void declaredLabel(Label label, bool isCaseLabel);
 
-  void declaredLocalVar(SimpleIdentifier name, TypeName type);
+  void declaredLocalVar(SimpleIdentifier name, TypeAnnotation type);
 
   void declaredMethod(MethodDeclaration declaration);
 
-  void declaredParam(SimpleIdentifier name, TypeName type);
+  void declaredParam(SimpleIdentifier name, TypeAnnotation type);
 
   void declaredTopLevelVar(
       VariableDeclarationList varList, VariableDeclaration varDecl);
@@ -128,7 +128,7 @@
   @override
   void visitForEachStatement(ForEachStatement node) {
     SimpleIdentifier id;
-    TypeName type;
+    TypeAnnotation type;
     DeclaredIdentifier loopVar = node.loopVariable;
     if (loopVar != null) {
       id = loopVar.identifier;
@@ -233,7 +233,7 @@
         } else if (param is NormalFormalParameter) {
           normalParam = param;
         }
-        TypeName type = null;
+        TypeAnnotation type = null;
         if (normalParam is FieldFormalParameter) {
           type = normalParam.type;
         } else if (normalParam is FunctionTypedFormalParameter) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
index 41e50c5..ae66900 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
@@ -166,7 +166,7 @@
     if (optype.includeReturnValueSuggestions &&
         (!optype.inStaticMethodBody || fieldDecl.isStatic)) {
       bool deprecated = isDeprecated(fieldDecl) || isDeprecated(varDecl);
-      TypeName typeName = fieldDecl.fields.type;
+      TypeAnnotation typeName = fieldDecl.fields.type;
       _addLocalSuggestion_includeReturnValueSuggestions(
           fieldDecl.documentationComment,
           varDecl.name,
@@ -182,7 +182,7 @@
   void declaredFunction(FunctionDeclaration declaration) {
     if (optype.includeReturnValueSuggestions ||
         optype.includeVoidReturnSuggestions) {
-      TypeName typeName = declaration.returnType;
+      TypeAnnotation typeName = declaration.returnType;
       protocol.ElementKind elemKind;
       int relevance = DART_RELEVANCE_DEFAULT;
       if (declaration.isGetter) {
@@ -233,7 +233,7 @@
   }
 
   @override
-  void declaredLocalVar(SimpleIdentifier id, TypeName typeName) {
+  void declaredLocalVar(SimpleIdentifier id, TypeAnnotation typeName) {
     if (optype.includeReturnValueSuggestions) {
       _addLocalSuggestion_includeReturnValueSuggestions(
           null, id, typeName, protocol.ElementKind.LOCAL_VARIABLE,
@@ -248,7 +248,7 @@
         (!optype.inStaticMethodBody || declaration.isStatic)) {
       protocol.ElementKind elemKind;
       FormalParameterList param;
-      TypeName typeName = declaration.returnType;
+      TypeAnnotation typeName = declaration.returnType;
       int relevance = DART_RELEVANCE_DEFAULT;
       if (declaration.isGetter) {
         elemKind = protocol.ElementKind.GETTER;
@@ -283,7 +283,7 @@
   }
 
   @override
-  void declaredParam(SimpleIdentifier id, TypeName typeName) {
+  void declaredParam(SimpleIdentifier id, TypeAnnotation typeName) {
     if (optype.includeReturnValueSuggestions) {
       _addLocalSuggestion_includeReturnValueSuggestions(
           null, id, typeName, protocol.ElementKind.PARAMETER,
@@ -306,7 +306,7 @@
   }
 
   void _addLocalSuggestion(Comment documentationComment, SimpleIdentifier id,
-      TypeName typeName, protocol.ElementKind elemKind,
+      TypeAnnotation typeName, protocol.ElementKind elemKind,
       {bool isAbstract: false,
       bool isDeprecated: false,
       ClassDeclaration classDecl,
@@ -377,7 +377,7 @@
   void _addLocalSuggestion_includeReturnValueSuggestions(
       Comment documentationComment,
       SimpleIdentifier id,
-      TypeName typeName,
+      TypeAnnotation typeName,
       protocol.ElementKind elemKind,
       {bool isAbstract: false,
       bool isDeprecated: false,
@@ -417,7 +417,7 @@
   void _addLocalSuggestion_includeTypeNameSuggestions(
       Comment documentationComment,
       SimpleIdentifier id,
-      TypeName typeName,
+      TypeAnnotation typeName,
       protocol.ElementKind elemKind,
       {bool isAbstract: false,
       bool isDeprecated: false,
@@ -443,7 +443,7 @@
         .map((FormalParameter param) => param.identifier.name)
         .toList();
     suggestion.parameterTypes = paramList.map((FormalParameter param) {
-      TypeName type = null;
+      TypeAnnotation type = null;
       if (param is DefaultFormalParameter) {
         NormalFormalParameter child = param.parameter;
         if (child is SimpleFormalParameter) {
@@ -460,11 +460,15 @@
       if (type == null) {
         return 'dynamic';
       }
-      Identifier typeId = type.name;
-      if (typeId == null) {
-        return 'dynamic';
+      if (type is TypeName) {
+        Identifier typeId = type.name;
+        if (typeId == null) {
+          return 'dynamic';
+        }
+        return typeId.name;
       }
-      return typeId.name;
+      // TODO(brianwilkerson) Support function types.
+      return 'dynamic';
     }).toList();
     suggestion.requiredParameterCount = paramList
         .where((FormalParameter param) => param is! DefaultFormalParameter)
@@ -473,8 +477,8 @@
         .any((FormalParameter param) => param.kind == ParameterKind.NAMED);
   }
 
-  bool _isVoid(TypeName returnType) {
-    if (returnType != null) {
+  bool _isVoid(TypeAnnotation returnType) {
+    if (returnType is TypeName) {
       Identifier id = returnType.name;
       if (id != null && id.name == 'void') {
         return true;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
index da0e6a0..c9954d5 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
@@ -126,15 +126,6 @@
   OpType._();
 
   /**
-   * Indicate whether only type names should be suggested
-   */
-  bool get includeOnlyNamedArgumentSuggestions =>
-      includeNamedArgumentSuggestions &&
-      !includeTypeNameSuggestions &&
-      !includeReturnValueSuggestions &&
-      !includeVoidReturnSuggestions;
-
-  /**
    * Return `true` if free standing identifiers should be suggested
    */
   bool get includeIdentifiers {
@@ -148,6 +139,15 @@
   /**
    * Indicate whether only type names should be suggested
    */
+  bool get includeOnlyNamedArgumentSuggestions =>
+      includeNamedArgumentSuggestions &&
+      !includeTypeNameSuggestions &&
+      !includeReturnValueSuggestions &&
+      !includeVoidReturnSuggestions;
+
+  /**
+   * Indicate whether only type names should be suggested
+   */
   bool get includeOnlyTypeNameSuggestions =>
       includeTypeNameSuggestions &&
       !includeNamedArgumentSuggestions &&
@@ -845,9 +845,9 @@
 
   @override
   void visitTypeArgumentList(TypeArgumentList node) {
-    NodeList<TypeName> arguments = node.arguments;
-    for (TypeName typeName in arguments) {
-      if (identical(entity, typeName)) {
+    NodeList<TypeAnnotation> arguments = node.arguments;
+    for (TypeAnnotation type in arguments) {
+      if (identical(entity, type)) {
         optype.includeTypeNameSuggestions = true;
         break;
       }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
index d535ef4..1921bfa 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
@@ -161,7 +161,7 @@
   @override
   void declaredFunction(FunctionDeclaration declaration) {
     if (declaration.name.name == targetName) {
-      TypeName typeName = declaration.returnType;
+      TypeAnnotation typeName = declaration.returnType;
       if (typeName != null) {
         typeFound = typeName.type;
       }
@@ -172,7 +172,7 @@
   @override
   void declaredFunctionTypeAlias(FunctionTypeAlias declaration) {
     if (declaration.name.name == targetName) {
-      TypeName typeName = declaration.returnType;
+      TypeAnnotation typeName = declaration.returnType;
       if (typeName != null) {
         typeFound = typeName.type;
       }
@@ -189,7 +189,7 @@
   }
 
   @override
-  void declaredLocalVar(SimpleIdentifier name, TypeName type) {
+  void declaredLocalVar(SimpleIdentifier name, TypeAnnotation type) {
     if (name.name == targetName) {
       typeFound = name.bestType;
       finished();
@@ -199,7 +199,7 @@
   @override
   void declaredMethod(MethodDeclaration declaration) {
     if (declaration.name.name == targetName) {
-      TypeName typeName = declaration.returnType;
+      TypeAnnotation typeName = declaration.returnType;
       if (typeName != null) {
         typeFound = typeName.type;
       }
@@ -208,7 +208,7 @@
   }
 
   @override
-  void declaredParam(SimpleIdentifier name, TypeName type) {
+  void declaredParam(SimpleIdentifier name, TypeAnnotation type) {
     if (name.name == targetName) {
       // Type provided by the element in computeFull above
       finished();
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
index 0cba871..a3ec936 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
@@ -34,7 +34,7 @@
 protocol.Element createLocalElement(
     Source source, protocol.ElementKind kind, SimpleIdentifier id,
     {String parameters,
-    TypeName returnType,
+    TypeAnnotation returnType,
     bool isAbstract: false,
     bool isDeprecated: false}) {
   String name;
@@ -64,7 +64,7 @@
 CompletionSuggestion createLocalFieldSuggestion(
     Source source, FieldDeclaration fieldDecl, VariableDeclaration varDecl) {
   bool deprecated = isDeprecated(fieldDecl) || isDeprecated(varDecl);
-  TypeName type = fieldDecl.fields.type;
+  TypeAnnotation type = fieldDecl.fields.type;
   return createLocalSuggestion(
       varDecl.name, deprecated, DART_RELEVANCE_LOCAL_FIELD, type,
       classDecl: fieldDecl.parent,
@@ -78,7 +78,7 @@
  * suggestion or `null` if it could not be created.
  */
 CompletionSuggestion createLocalSuggestion(SimpleIdentifier id,
-    bool isDeprecated, int defaultRelevance, TypeName returnType,
+    bool isDeprecated, int defaultRelevance, TypeAnnotation returnType,
     {ClassDeclaration classDecl,
     CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
     protocol.Element element}) {
@@ -129,24 +129,29 @@
 /**
  * Return the name for the given [type].
  */
-String nameForType(TypeName type) {
+String nameForType(TypeAnnotation type) {
   if (type == NO_RETURN_TYPE) {
     return null;
   }
   if (type == null) {
     return DYNAMIC;
   }
-  Identifier id = type.name;
-  if (id == null) {
-    return DYNAMIC;
+  if (type is TypeName) {
+    Identifier id = type.name;
+    if (id == null) {
+      return DYNAMIC;
+    }
+    String name = id.name;
+    if (name == null || name.length <= 0) {
+      return DYNAMIC;
+    }
+    TypeArgumentList typeArgs = type.typeArguments;
+    if (typeArgs != null) {
+      //TODO (danrubel) include type arguments
+    }
+    return name;
+  } else if (type is GenericFunctionType) {
+    // TODO(brianwilkerson) Implement this.
   }
-  String name = id.name;
-  if (name == null || name.length <= 0) {
-    return DYNAMIC;
-  }
-  TypeArgumentList typeArgs = type.typeArguments;
-  if (typeArgs != null) {
-    //TODO (danrubel) include type arguments
-  }
-  return name;
+  return DYNAMIC;
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart
index 2c4d913..98b7f4b 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart
@@ -56,7 +56,10 @@
           strName = _getStringName(node.expression as Identifier);
         }
       } else if (node is VariableDeclarationList) {
-        strName = _getStringName(node.type.name);
+        TypeAnnotation typeAnnotation = node.type;
+        if (typeAnnotation is TypeName) {
+          strName = _getStringName(typeAnnotation.name);
+        }
       } else if (node is TopLevelVariableDeclaration) {
         // The parser parses 'Foo ' and 'Foo ;' differently, resulting in the
         // following.
@@ -64,8 +67,11 @@
         // 'Foo ;': TopLevelVariableDeclaration with type null, and a first
         // variable of 'Foo'
         VariableDeclarationList varDeclarationList = node.variables;
-        if (varDeclarationList.type != null) {
-          strName = _getStringName(varDeclarationList.type.name);
+        TypeAnnotation typeAnnotation = varDeclarationList.type;
+        if (typeAnnotation != null) {
+          if (typeAnnotation is TypeName) {
+            strName = _getStringName(typeAnnotation.name);
+          }
         } else {
           NodeList<VariableDeclaration> varDeclarations =
               varDeclarationList.variables;
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index ebd7ca3..27cc2cf 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -505,7 +505,9 @@
         getter = n;
         break;
       }
-      if (n is SimpleIdentifier || n is TypeName || n is TypeArgumentList) {
+      if (n is SimpleIdentifier ||
+          n is TypeAnnotation ||
+          n is TypeArgumentList) {
         continue;
       }
       break;
@@ -571,7 +573,7 @@
       if (n is SimpleIdentifier ||
           n is VariableDeclaration ||
           n is VariableDeclarationList ||
-          n is TypeName ||
+          n is TypeAnnotation ||
           n is TypeArgumentList) {
         continue;
       }
@@ -1564,7 +1566,7 @@
       return;
     }
     // we need a type
-    TypeName typeNode = declarationList.type;
+    TypeAnnotation typeNode = declarationList.type;
     if (typeNode == null) {
       _coverageMarker();
       return;
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index c96165d..325f723 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -570,7 +570,7 @@
       AstNode variableList = declaration.parent;
       if (variableList is VariableDeclarationList &&
           variableList.variables.length == 1) {
-        TypeName typeNode = variableList.type;
+        TypeAnnotation typeNode = variableList.type;
         if (typeNode != null) {
           Expression initializer = coveredNode;
           DartType newType = initializer.bestType;
@@ -1436,7 +1436,7 @@
 
   void _addFix_illegalAsyncReturnType() {
     // prepare the existing type
-    TypeName typeName = node.getAncestor((n) => n is TypeName);
+    TypeAnnotation typeName = node.getAncestor((n) => n is TypeAnnotation);
     _replaceTypeWithFuture(typeName);
     // add proposal
     _addFix(DartFixKind.REPLACE_RETURN_TYPE_FUTURE, []);
@@ -2825,7 +2825,7 @@
     }
   }
 
-  void _replaceTypeWithFuture(TypeName typeName) {
+  void _replaceTypeWithFuture(TypeAnnotation typeName) {
     InterfaceType futureType = context.typeProvider.futureType;
     // validate the type
     DartType type = typeName?.type;
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index e904e14..6e3c2cb 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -859,6 +859,15 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) {
+    super.visitGenericFunctionType(node);
+    if (_isFirstSelectedNode(node)) {
+      invalidSelection('Cannot extract a single type reference.');
+    }
+    return null;
+  }
+
+  @override
   Object visitSimpleIdentifier(SimpleIdentifier node) {
     super.visitSimpleIdentifier(node);
     if (_isFirstSelectedNode(node)) {
diff --git a/pkg/analysis_server/lib/src/status/ast_writer.dart b/pkg/analysis_server/lib/src/status/ast_writer.dart
index 1b292d6..b32886d 100644
--- a/pkg/analysis_server/lib/src/status/ast_writer.dart
+++ b/pkg/analysis_server/lib/src/status/ast_writer.dart
@@ -141,7 +141,7 @@
       properties['value'] = node.value;
     } else if (node is SuperConstructorInvocation) {
       properties['static element'] = node.staticElement;
-    } else if (node is TypeName) {
+    } else if (node is TypeAnnotation) {
       properties['type'] = node.type;
     } else if (node is VariableDeclarationList) {
       properties['keyword'] = node.keyword;
@@ -195,7 +195,7 @@
       return node.name.name;
     } else if (node is TopLevelVariableDeclaration) {
       return _getNames(node.variables);
-    } else if (node is TypeName) {
+    } else if (node is TypeAnnotation) {
       return node.toSource();
     } else if (node is TypeParameter) {
       return node.name.name;
diff --git a/pkg/analysis_server/test/domain_diagnostic_test.dart b/pkg/analysis_server/test/domain_diagnostic_test.dart
index 1842045..fcaf755 100644
--- a/pkg/analysis_server/test/domain_diagnostic_test.dart
+++ b/pkg/analysis_server/test/domain_diagnostic_test.dart
@@ -5,86 +5,72 @@
 library test.domain.diagnostic;
 
 import 'package:analysis_server/plugin/protocol/protocol.dart';
-import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/domain_diagnostic.dart';
-import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/instrumentation/instrumentation.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
 import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'mock_sdk.dart';
-import 'mocks.dart';
+import 'analysis_abstract.dart';
 
 main() {
-  AnalysisServer server;
-  DiagnosticDomainHandler handler;
-  MemoryResourceProvider resourceProvider;
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DiagnosticDomainTest);
+    defineReflectiveTests(DiagnosticDomainTest_Driver);
+  });
+}
 
-  void processRequiredPlugins(ServerPlugin serverPlugin) {
-    List<Plugin> plugins = <Plugin>[];
-    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-    plugins.add(serverPlugin);
-
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(plugins);
+@reflectiveTest
+class DiagnosticDomainTest extends AbstractAnalysisTest {
+  @override
+  void setUp() {
+    super.setUp();
+    handler = new DiagnosticDomainHandler(server);
+    server.handlers = [handler];
   }
 
-  setUp(() {
-    ServerPlugin serverPlugin = new ServerPlugin();
-    processRequiredPlugins(serverPlugin);
-    //
-    // Create the server
-    //
-    var serverChannel = new MockServerChannel();
-    resourceProvider = new MemoryResourceProvider();
-    // Create an SDK in the mock file system.
-    new MockSdk(resourceProvider: resourceProvider);
-    server = new AnalysisServer(
-        serverChannel,
-        resourceProvider,
-        new MockPackageMapProvider(),
-        null,
-        serverPlugin,
-        new AnalysisServerOptions(),
-        new DartSdkManager('/', false),
-        InstrumentationService.NULL_SERVICE);
-    handler = new DiagnosticDomainHandler(server);
-  });
+  test_getDiagnostics() async {
+    String file = '/project/bin/test.dart';
+    resourceProvider.newFile('/project/pubspec.yaml', 'name: project');
+    resourceProvider.newFile(file, 'main() {}');
 
-  group('DiagnosticDomainHandler', () {
-    test('getDiagnostics', () async {
-      String file = '/project/bin/test.dart';
-      resourceProvider.newFile('/project/pubspec.yaml', 'name: project');
-      resourceProvider.newFile(file, 'main() {}');
+    server.setAnalysisRoots('0', ['/project/'], [], {});
 
-      server.setAnalysisRoots('0', ['/project/'], [], {});
+    await server.onAnalysisComplete;
 
-      await server.onAnalysisComplete;
+    var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
+    var response = handler.handleRequest(request);
+    var result = new DiagnosticGetDiagnosticsResult.fromResponse(response);
 
-      var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
-      var response = handler.handleRequest(request);
+    expect(result.contexts, hasLength(1));
 
-      int fileCount = 1 /* test.dart */;
+    ContextData context = result.contexts[0];
+    expect(context.name, '/project');
+    expect(context.explicitFileCount, 1); /* test.dart */
 
-      Map json = response.toJson()[Response.RESULT];
-      expect(json['contexts'], hasLength(1));
-      var context = json['contexts'][0];
-      expect(context['name'], '/project');
-      expect(context['explicitFileCount'], fileCount);
+    if (enableNewAnalysisDriver) {
+      // dart:core (although it should not be here)
+      expect(context.implicitFileCount, 1);
+    } else {
       // dart:core dart:async dart:math dart:_internal
-      expect(context['implicitFileCount'], 4);
-      expect(context['workItemQueueLength'], isNotNull);
-    });
+      expect(context.implicitFileCount, 4);
+    }
 
-    test('getDiagnostics - (no root)', () async {
-      var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
-      var response = handler.handleRequest(request);
-      Map json = response.toJson()[Response.RESULT];
-      expect(json['contexts'], hasLength(0));
-    });
-  });
+    expect(context.workItemQueueLength, isNotNull);
+  }
+
+  test_getDiagnostics_noRoot() async {
+    var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
+    var response = handler.handleRequest(request);
+    var result = new DiagnosticGetDiagnosticsResult.fromResponse(response);
+    expect(result.contexts, isEmpty);
+  }
+}
+
+@reflectiveTest
+class DiagnosticDomainTest_Driver extends DiagnosticDomainTest {
+  @override
+  void setUp() {
+    enableNewAnalysisDriver = true;
+    generateSummaryFiles = true;
+    super.setUp();
+  }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart
index fe3456d..4e4e727 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_declaration_visitor_test.dart
@@ -73,7 +73,7 @@
   void declaredLabel(Label label, bool isCaseLabel) {}
 
   @override
-  void declaredLocalVar(SimpleIdentifier name, TypeName type) {
+  void declaredLocalVar(SimpleIdentifier name, TypeAnnotation type) {
     expect(name, isNotNull);
   }
 
@@ -81,7 +81,7 @@
   void declaredMethod(MethodDeclaration declaration) {}
 
   @override
-  void declaredParam(SimpleIdentifier name, TypeName type) {}
+  void declaredParam(SimpleIdentifier name, TypeAnnotation type) {}
 
   @override
   void declaredTopLevelVar(
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 78b3c06..ba966a3 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -254,7 +254,7 @@
  * An as expression.
  *
  *    asExpression ::=
- *        [Expression] 'as' [TypeName]
+ *        [Expression] 'as' [TypeAnnotation]
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -281,14 +281,14 @@
   void set expression(Expression expression);
 
   /**
-   * Return the name of the type being cast to.
+   * Return the type being cast to.
    */
-  TypeName get type;
+  TypeAnnotation get type;
 
   /**
-   * Set the name of the type being cast to to the given [name].
+   * Set the type being cast to to the given [type].
    */
-  void set type(TypeName name);
+  void set type(TypeAnnotation type);
 }
 
 /**
@@ -556,7 +556,14 @@
 /**
  * An object that can be used to visit an AST structure.
  *
- * Clients may extend or implement this class.
+ * Clients may not extend, implement or mix-in this class. There are classes
+ * that implement this interface that provide useful default behaviors in
+ * `package:analyzer/dart/ast/visitor.dart`. A couple of the most useful include
+ * * SimpleAstVisitor which implements every visit method by doing nothing,
+ * * RecursiveAstVisitor which will cause every node in a structure to be
+ *   visited, and
+ * * ThrowingAstVisitor which implements every visit method by throwing an
+ *   exception.
  */
 abstract class AstVisitor<R> {
   R visitAdjacentStrings(AdjacentStrings node);
@@ -659,6 +666,10 @@
 
   R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node);
 
+  R visitGenericFunctionType(GenericFunctionType node);
+
+  R visitGenericTypeAlias(GenericTypeAlias node);
+
   R visitHideCombinator(HideCombinator node);
 
   R visitIfStatement(IfStatement node);
@@ -1097,13 +1108,13 @@
    * Return the type of exceptions caught by this catch clause, or `null` if
    * this catch clause catches every type of exception.
    */
-  TypeName get exceptionType;
+  TypeAnnotation get exceptionType;
 
   /**
    * Set the type of exceptions caught by this catch clause to the given
    * [exceptionType].
    */
-  void set exceptionType(TypeName exceptionType);
+  void set exceptionType(TypeAnnotation exceptionType);
 
   /**
    * Return the left parenthesis, or `null` if there is no 'catch' keyword.
@@ -2187,12 +2198,12 @@
    * Return the name of the declared type of the parameter, or `null` if the
    * parameter does not have a declared type.
    */
-  TypeName get type;
+  TypeAnnotation get type;
 
   /**
-   * Set the name of the declared type of the parameter to the given [typeName].
+   * Set the declared type of the parameter to the given [type].
    */
-  void set type(TypeName typeName);
+  void set type(TypeAnnotation type);
 }
 
 /**
@@ -2789,7 +2800,7 @@
  * A field formal parameter.
  *
  *    fieldFormalParameter ::=
- *        ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])?
+ *        ('final' [TypeAnnotation] | 'const' [TypeAnnotation] | 'var' | [TypeAnnotation])?
  *        'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterList])?
  *
  * Clients may not extend, implement or mix-in this class.
@@ -2840,17 +2851,16 @@
   void set thisKeyword(Token token);
 
   /**
-   * Return the name of the declared type of the parameter, or `null` if the
-   * parameter does not have a declared type. Note that if this is a
-   * function-typed field formal parameter this is the return type of the
-   * function.
+   * Return the declared type of the parameter, or `null` if the parameter does
+   * not have a declared type. Note that if this is a function-typed field
+   * formal parameter this is the return type of the function.
    */
-  TypeName get type;
+  TypeAnnotation get type;
 
   /**
-   * Set the name of the declared type of the parameter to the given [typeName].
+   * Set the declared type of the parameter to the given [type].
    */
-  void set type(TypeName typeName);
+  void set type(TypeAnnotation type);
 
   /**
    * Return the type parameters associated with this method, or `null` if this
@@ -3348,12 +3358,12 @@
    * Return the return type of the function, or `null` if no return type was
    * declared.
    */
-  TypeName get returnType;
+  TypeAnnotation get returnType;
 
   /**
-   * Set the return type of the function to the given [returnType].
+   * Set the return type of the function to the given [type].
    */
-  void set returnType(TypeName returnType);
+  void set returnType(TypeAnnotation type);
 }
 
 /**
@@ -3506,7 +3516,7 @@
  *        functionPrefix [TypeParameterList]? [FormalParameterList] ';'
  *
  *    functionPrefix ::=
- *        [TypeName]? [SimpleIdentifier]
+ *        [TypeAnnotation]? [SimpleIdentifier]
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -3523,16 +3533,15 @@
   void set parameters(FormalParameterList parameters);
 
   /**
-   * Return the name of the return type of the function type being defined, or
-   * `null` if no return type was given.
+   * Return the return type of the function type being defined, or `null` if no
+   * return type was given.
    */
-  TypeName get returnType;
+  TypeAnnotation get returnType;
 
   /**
-   * Set the name of the return type of the function type being defined to the
-   * given [typeName].
+   * Set the return type of the function type being defined to the given [type].
    */
-  void set returnType(TypeName typeName);
+  void set returnType(TypeAnnotation type);
 
   /**
    * Return the type parameters for the function type, or `null` if the function
@@ -3551,7 +3560,7 @@
  * A function-typed formal parameter.
  *
  *    functionSignature ::=
- *        [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterList]
+ *        [TypeAnnotation]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterList]
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -3583,12 +3592,12 @@
    * Return the return type of the function, or `null` if the function does not
    * have a return type.
    */
-  TypeName get returnType;
+  TypeAnnotation get returnType;
 
   /**
    * Set the return type of the function to the given [type].
    */
-  void set returnType(TypeName type);
+  void set returnType(TypeAnnotation type);
 
   /**
    * Return the type parameters associated with this function, or `null` if
@@ -3604,6 +3613,128 @@
 }
 
 /**
+ * An anonymous function type.
+ *
+ *    functionType ::=
+ *        [TypeAnnotation]? 'Function' [TypeParameterList]? [FormalParameterList]
+ *
+ * where the FormalParameterList is being used to represent the following
+ * grammar, despite the fact that FormalParameterList can represent a much
+ * larger grammar than the one below. This is done in order to simplify the
+ * implementation.
+ *
+ *    parameterTypeList ::=
+ *        () |
+ *        ( normalParameterTypes ,? ) |
+ *        ( normalParameterTypes , optionalParameterTypes ) |
+ *        ( optionalParameterTypes )
+ *    namedParameterTypes ::=
+ *        { namedParameterType (, namedParameterType)* ,? }
+ *    namedParameterType ::=
+ *        [TypeAnnotation]? [SimpleIdentifier]
+ *    normalParameterTypes ::=
+ *        normalParameterType (, normalParameterType)*
+ *    normalParameterType ::=
+ *        [TypeAnnotation] [SimpleIdentifier]?
+ *    optionalParameterTypes ::=
+ *        optionalPositionalParameterTypes | namedParameterTypes
+ *    optionalPositionalParameterTypes ::=
+ *        [ normalParameterTypes ,? ]
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class GenericFunctionType extends TypeAnnotation {
+  /**
+   * Return the keyword 'Function'.
+   */
+  Token get functionKeyword;
+
+  /**
+   * Set the keyword 'Function' to the given [token].
+   */
+  void set functionKeyword(Token token);
+
+  /**
+   * Return the parameters associated with the function type.
+   */
+  FormalParameterList get parameters;
+
+  /**
+   * Set the parameters associated with the function type to the given list of
+   * [parameters].
+   */
+  void set parameters(FormalParameterList parameters);
+
+  /**
+   * Return the return type of the function type being defined, or `null` if
+   * no return type was given.
+   */
+  TypeAnnotation get returnType;
+
+  /**
+   * Set the return type of the function type being defined to the given[type].
+   */
+  void set returnType(TypeAnnotation type);
+
+  /**
+   * Return the type parameters for the function type, or `null` if the function
+   * type does not have any type parameters.
+   */
+  TypeParameterList get typeParameters;
+
+  /**
+   * Set the type parameters for the function type to the given list of
+   * [typeParameters].
+   */
+  void set typeParameters(TypeParameterList typeParameters);
+}
+
+/**
+ * A generic type alias.
+ *
+ *    functionTypeAlias ::=
+ *        metadata 'typedef' [SimpleIdentifier] [TypeParameterList]? = [FunctionType] ';'
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class GenericTypeAlias extends TypeAlias {
+  /**
+     * Return the equal sign separating the name being defined from the function
+     * type.
+     */
+  Token get equals;
+
+  /**
+     * Set the equal sign separating the name being defined from the function type
+     * to the given [token].
+     */
+  void set equals(Token token);
+
+  /**
+     * Return the type of function being defined by the alias.
+     */
+  GenericFunctionType get functionType;
+
+  /**
+     * Set the type of function being defined by the alias to the given
+     * [functionType].
+     */
+  void set functionType(GenericFunctionType functionType);
+
+  /**
+     * Return the type parameters for the function type, or `null` if the function
+     * type does not have any type parameters.
+     */
+  TypeParameterList get typeParameters;
+
+  /**
+     * Set the type parameters for the function type to the given list of
+     * [typeParameters].
+     */
+  void set typeParameters(TypeParameterList typeParameters);
+}
+
+/**
  * A combinator that restricts the names being imported to those that are not in
  * a given list.
  *
@@ -4303,7 +4434,7 @@
  * An is expression.
  *
  *    isExpression ::=
- *        [Expression] 'is' '!'? [TypeName]
+ *        [Expression] 'is' '!'? [TypeAnnotation]
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -4340,14 +4471,14 @@
   void set notOperator(Token token);
 
   /**
-   * Return the name of the type being tested for.
+   * Return the type being tested for.
    */
-  TypeName get type;
+  TypeAnnotation get type;
 
   /**
-   * Set the name of the type being tested for to the given [name].
+   * Set the type being tested for to the given [type].
    */
-  void set type(TypeName name);
+  void set type(TypeAnnotation type);
 }
 
 /**
@@ -4466,7 +4597,7 @@
  * A list literal.
  *
  *    listLiteral ::=
- *        'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']'
+ *        'const'? ('<' [TypeAnnotation] '>')? '[' ([Expression] ','?)? ']'
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -4517,7 +4648,7 @@
  * A literal map.
  *
  *    mapLiteral ::=
- *        'const'? ('<' [TypeName] (',' [TypeName])* '>')?
+ *        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
  *        '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}'
  *
  * Clients may not extend, implement or mix-in this class.
@@ -4719,12 +4850,12 @@
    * Return the return type of the method, or `null` if no return type was
    * declared.
    */
-  TypeName get returnType;
+  TypeAnnotation get returnType;
 
   /**
-   * Set the return type of the method to the given [typeName].
+   * Set the return type of the method to the given [type].
    */
-  void set returnType(TypeName typeName);
+  void set returnType(TypeAnnotation type);
 
   /**
    * Return the type parameters associated with this method, or `null` if this
@@ -5636,7 +5767,7 @@
  * A simple formal parameter.
  *
  *    simpleFormalParameter ::=
- *        ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier]
+ *        ('final' [TypeAnnotation] | 'var' | [TypeAnnotation])? [SimpleIdentifier]
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -5654,15 +5785,15 @@
   void set keyword(Token token);
 
   /**
-   * Return the name of the declared type of the parameter, or `null` if the
-   * parameter does not have a declared type.
+   * Return the declared type of the parameter, or `null` if the parameter does
+   * not have a declared type.
    */
-  TypeName get type;
+  TypeAnnotation get type;
 
   /**
-   * Set the name of the declared type of the parameter to the given [typeName].
+   * Set the declared type of the parameter to the given [type].
    */
-  void set type(TypeName typeName);
+  void set type(TypeAnnotation type);
 }
 
 /**
@@ -6329,6 +6460,23 @@
 }
 
 /**
+ * A type annotation.
+ *
+ *    type ::=
+ *        [NamedType]
+ *      | [GenericFunctionType]
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class TypeAnnotation extends AstNode {
+  /**
+   * Return the type being named, or `null` if the AST structure has not been
+   * resolved.
+   */
+  DartType get type;
+}
+
+/**
  * A list of type arguments.
  *
  *    typeArguments ::=
@@ -6340,7 +6488,7 @@
   /**
    * Return the type arguments associated with the type.
    */
-  NodeList<TypeName> get arguments;
+  NodeList<TypeAnnotation> get arguments;
 
   /**
    * Return the left bracket.
@@ -6405,7 +6553,7 @@
  *
  * Clients may not extend, implement or mix-in this class.
  */
-abstract class TypeName extends AstNode {
+abstract class TypeName extends TypeAnnotation {
   /**
    * Return `true` if this type is a deferred type.
    *
@@ -6437,12 +6585,6 @@
   void set question(Token question);
 
   /**
-   * Return the type being named, or `null` if the AST structure has not been
-   * resolved.
-   */
-  DartType get type;
-
-  /**
    * Set the type being named to the given [type].
    */
   void set type(DartType type);
@@ -6464,22 +6606,21 @@
  * A type parameter.
  *
  *    typeParameter ::=
- *        [SimpleIdentifier] ('extends' [TypeName])?
+ *        [SimpleIdentifier] ('extends' [TypeAnnotation])?
  *
  * Clients may not extend, implement or mix-in this class.
  */
 abstract class TypeParameter extends Declaration {
   /**
-   * Return the name of the upper bound for legal arguments, or `null` if there
-   * is no explicit upper bound.
+   * Return the upper bound for legal arguments, or `null` if there is no
+   * explicit upper bound.
    */
-  TypeName get bound;
+  TypeAnnotation get bound;
 
   /**
-   * Set the name of the upper bound for legal arguments to the given
-   * [typeName].
+   * Set the upper bound for legal arguments to the given [type].
    */
-  void set bound(TypeName typeName);
+  void set bound(TypeAnnotation type);
 
   /**
    * Return the token representing the 'extends' keyword, or `null` if there is
@@ -6662,10 +6803,10 @@
  *        finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])*
  *
  *    finalConstVarOrType ::=
- *      | 'final' [TypeName]?
- *      | 'const' [TypeName]?
+ *      | 'final' [TypeAnnotation]?
+ *      | 'const' [TypeAnnotation]?
  *      | 'var'
- *      | [TypeName]
+ *      | [TypeAnnotation]
  *
  * Clients may not extend, implement or mix-in this class.
  */
@@ -6700,12 +6841,12 @@
    * Return the type of the variables being declared, or `null` if no type was
    * provided.
    */
-  TypeName get type;
+  TypeAnnotation get type;
 
   /**
-   * Set the type of the variables being declared to the given [typeName].
+   * Set the type of the variables being declared to the given [type].
    */
-  void set type(TypeName typeName);
+  void set type(TypeAnnotation type);
 
   /**
    * Return a list containing the individual variables being declared.
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart
index ffaf90e..48b918d 100644
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart
@@ -39,7 +39,7 @@
    * Returns a newly created as expression.
    */
   AsExpression asExpression(
-      Expression expression, Token asOperator, TypeName type);
+      Expression expression, Token asOperator, TypeAnnotation type);
 
   /**
    * Returns a newly created assert initializer. The [comma] and [message]
@@ -128,7 +128,7 @@
    */
   CatchClause catchClause(
       Token onKeyword,
-      TypeName exceptionType,
+      TypeAnnotation exceptionType,
       Token catchKeyword,
       Token leftParenthesis,
       SimpleIdentifier exceptionParameter,
@@ -290,7 +290,7 @@
       Comment comment,
       List<Annotation> metadata,
       Token keyword,
-      TypeName type,
+      TypeAnnotation type,
       SimpleIdentifier identifier);
 
   /**
@@ -423,7 +423,7 @@
       Comment comment,
       List<Annotation> metadata,
       Token keyword,
-      TypeName type,
+      TypeAnnotation type,
       Token thisKeyword,
       Token period,
       SimpleIdentifier identifier,
@@ -502,7 +502,7 @@
       Comment comment,
       List<Annotation> metadata,
       Token externalKeyword,
-      TypeName returnType,
+      TypeAnnotation returnType,
       Token propertyKeyword,
       SimpleIdentifier name,
       FunctionExpression functionExpression);
@@ -536,7 +536,7 @@
       Comment comment,
       List<Annotation> metadata,
       Token keyword,
-      TypeName returnType,
+      TypeAnnotation returnType,
       SimpleIdentifier name,
       TypeParameterList typeParameters,
       FormalParameterList parameters,
@@ -551,7 +551,7 @@
   FunctionTypedFormalParameter functionTypedFormalParameter(
       Comment comment,
       List<Annotation> metadata,
-      TypeName returnType,
+      TypeAnnotation returnType,
       SimpleIdentifier identifier,
       TypeParameterList typeParameters,
       FormalParameterList parameters,
@@ -642,7 +642,7 @@
    * if the sense of the test is not negated.
    */
   IsExpression isExpression(Expression expression, Token isOperator,
-      Token notOperator, TypeName type);
+      Token notOperator, TypeAnnotation type);
 
   /**
    * Returns a newly created label.
@@ -706,7 +706,7 @@
       List<Annotation> metadata,
       Token externalKeyword,
       Token modifierKeyword,
-      TypeName returnType,
+      TypeAnnotation returnType,
       Token propertyKeyword,
       Token operatorKeyword,
       SimpleIdentifier name,
@@ -849,7 +849,7 @@
       Comment comment,
       List<Annotation> metadata,
       Token keyword,
-      TypeName type,
+      TypeAnnotation type,
       SimpleIdentifier identifier);
 
   /**
@@ -948,7 +948,7 @@
    * Returns a newly created list of type arguments.
    */
   TypeArgumentList typeArgumentList(
-      Token leftBracket, List<TypeName> arguments, Token rightBracket);
+      Token leftBracket, List<TypeAnnotation> arguments, Token rightBracket);
 
   /**
    * Returns a newly created type name. The [typeArguments] can be `null` if
@@ -964,7 +964,7 @@
    * the parameter does not have an upper bound.
    */
   TypeParameter typeParameter(Comment comment, List<Annotation> metadata,
-      SimpleIdentifier name, Token extendsKeyword, TypeName bound);
+      SimpleIdentifier name, Token extendsKeyword, TypeAnnotation bound);
 
   /**
    * Returns a newly created list of type parameters.
@@ -989,10 +989,23 @@
       Comment comment,
       List<Annotation> metadata,
       Token keyword,
-      TypeName type,
+      TypeAnnotation type,
       List<VariableDeclaration> variables);
 
   /**
+   * Returns a newly created generic type alias. Either or both of the
+   * [comment] and [metadata] can be `null` if the variable list does not have
+   * the corresponding attribute. The [typeParameters] can be `null` if there
+   * are no type parameters.
+   */
+  GenericTypeAlias genericTypeAlias(Comment comment, List<Annotation> metadata, Token typedefKeyword, SimpleIdentifier name, TypeParameterList typeParameters, Token equals, GenericFunctionType functionType, Token semicolon);
+
+  /**
+   * Initialize a newly created generic function type.
+   */
+  GenericFunctionType genericFunctionType(TypeAnnotation returnType, Token functionKeyword, TypeParameterList typeParameters, FormalParameterList _parameters);
+
+  /**
    * Returns a newly created variable declaration statement.
    */
   VariableDeclarationStatement variableDeclarationStatement(
diff --git a/pkg/analyzer/lib/dart/ast/resolution_map.dart b/pkg/analyzer/lib/dart/ast/resolution_map.dart
index 37ee054..a9e59ff 100644
--- a/pkg/analyzer/lib/dart/ast/resolution_map.dart
+++ b/pkg/analyzer/lib/dart/ast/resolution_map.dart
@@ -279,7 +279,7 @@
    * Return the type being named by [node], or `null` if the AST structure has
    * not been resolved.
    */
-  DartType typeForTypeName(TypeName node);
+  DartType typeForTypeName(TypeAnnotation node);
 
   /**
    * Return the element associated with the uri of the directive [node], or
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index ad96bed..79f3bfb 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -50,7 +50,7 @@
  *
  *     visitor.visitAllNodes(rootNode);
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class BreadthFirstVisitor<R> extends GeneralizingAstVisitor<R> {
   /**
@@ -147,7 +147,7 @@
  * do so will cause the visit methods for superclasses of the node to not be
  * invoked and will cause the children of the visited node to not be visited.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class GeneralizingAstVisitor<R> implements AstVisitor<R> {
   @override
@@ -336,6 +336,13 @@
       visitNormalFormalParameter(node);
 
   @override
+  R visitGenericFunctionType(GenericFunctionType node) =>
+      visitTypeAnnotation(node);
+
+  @override
+  R visitGenericTypeAlias(GenericTypeAlias node) => visitTypeAlias(node);
+
+  @override
   R visitHideCombinator(HideCombinator node) => visitCombinator(node);
 
   R visitIdentifier(Identifier node) => visitExpression(node);
@@ -528,6 +535,8 @@
 
   R visitTypeAlias(TypeAlias node) => visitNamedCompilationUnitMember(node);
 
+  R visitTypeAnnotation(TypeAnnotation node) => visitNode(node);
+
   @override
   R visitTypeArgumentList(TypeArgumentList node) => visitNode(node);
 
@@ -576,7 +585,7 @@
  * Failure to do so will cause the children of the visited node to not be
  * visited.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class RecursiveAstVisitor<R> implements AstVisitor<R> {
   @override
@@ -880,6 +889,18 @@
   }
 
   @override
+  R visitGenericFunctionType(GenericFunctionType node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
+  R visitGenericTypeAlias(GenericTypeAlias node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
   R visitHideCombinator(HideCombinator node) {
     node.visitChildren(this);
     return null;
@@ -1241,7 +1262,7 @@
  * dispatch mechanism (and hence don't need to recursively visit a whole
  * structure) and that only need to visit a small number of node types.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class SimpleAstVisitor<R> implements AstVisitor<R> {
   @override
@@ -1398,6 +1419,12 @@
       null;
 
   @override
+  R visitGenericFunctionType(GenericFunctionType node) => null;
+
+  @override
+  R visitGenericTypeAlias(GenericTypeAlias node) => null;
+
+  @override
   R visitHideCombinator(HideCombinator node) => null;
 
   @override
@@ -1579,7 +1606,366 @@
 }
 
 /**
- * An AST Visitor that captures visit call timings.
+ * An AST visitor that will throw an exception if any of the visit methods that
+ * are invoked have not been overridden. It is intended to be a superclass for
+ * classes that implement the visitor pattern and need to (a) override all of
+ * the visit methods or (b) need to override a subset of the visit method and
+ * want to catch when any other visit methods have been invoked.
+ *
+ * Clients may extend this class.
+ */
+class ThrowingAstVisitor<R> implements AstVisitor<R> {
+  @override
+  R visitAdjacentStrings(AdjacentStrings node) => _throw(node);
+
+  @override
+  R visitAnnotation(Annotation node) => _throw(node);
+
+  @override
+  R visitArgumentList(ArgumentList node) => _throw(node);
+
+  @override
+  R visitAsExpression(AsExpression node) => _throw(node);
+
+  @override
+  R visitAssertInitializer(AssertInitializer node) => _throw(node);
+
+  @override
+  R visitAssertStatement(AssertStatement node) => _throw(node);
+
+  @override
+  R visitAssignmentExpression(AssignmentExpression node) => _throw(node);
+
+  @override
+  R visitAwaitExpression(AwaitExpression node) => _throw(node);
+
+  @override
+  R visitBinaryExpression(BinaryExpression node) => _throw(node);
+
+  @override
+  R visitBlock(Block node) => _throw(node);
+
+  @override
+  R visitBlockFunctionBody(BlockFunctionBody node) => _throw(node);
+
+  @override
+  R visitBooleanLiteral(BooleanLiteral node) => _throw(node);
+
+  @override
+  R visitBreakStatement(BreakStatement node) => _throw(node);
+
+  @override
+  R visitCascadeExpression(CascadeExpression node) => _throw(node);
+
+  @override
+  R visitCatchClause(CatchClause node) => _throw(node);
+
+  @override
+  R visitClassDeclaration(ClassDeclaration node) => _throw(node);
+
+  @override
+  R visitClassTypeAlias(ClassTypeAlias node) => _throw(node);
+
+  @override
+  R visitComment(Comment node) => _throw(node);
+
+  @override
+  R visitCommentReference(CommentReference node) => _throw(node);
+
+  @override
+  R visitCompilationUnit(CompilationUnit node) => _throw(node);
+
+  @override
+  R visitConditionalExpression(ConditionalExpression node) => _throw(node);
+
+  @override
+  R visitConfiguration(Configuration node) => _throw(node);
+
+  @override
+  R visitConstructorDeclaration(ConstructorDeclaration node) => _throw(node);
+
+  @override
+  R visitConstructorFieldInitializer(ConstructorFieldInitializer node) =>
+      _throw(node);
+
+  @override
+  R visitConstructorName(ConstructorName node) => _throw(node);
+
+  @override
+  R visitContinueStatement(ContinueStatement node) => _throw(node);
+
+  @override
+  R visitDeclaredIdentifier(DeclaredIdentifier node) => _throw(node);
+
+  @override
+  R visitDefaultFormalParameter(DefaultFormalParameter node) => _throw(node);
+
+  @override
+  R visitDoStatement(DoStatement node) => _throw(node);
+
+  @override
+  R visitDottedName(DottedName node) => _throw(node);
+
+  @override
+  R visitDoubleLiteral(DoubleLiteral node) => _throw(node);
+
+  @override
+  R visitEmptyFunctionBody(EmptyFunctionBody node) => _throw(node);
+
+  @override
+  R visitEmptyStatement(EmptyStatement node) => _throw(node);
+
+  @override
+  R visitEnumConstantDeclaration(EnumConstantDeclaration node) => _throw(node);
+
+  @override
+  R visitEnumDeclaration(EnumDeclaration node) => _throw(node);
+
+  @override
+  R visitExportDirective(ExportDirective node) => _throw(node);
+
+  @override
+  R visitExpressionFunctionBody(ExpressionFunctionBody node) => _throw(node);
+
+  @override
+  R visitExpressionStatement(ExpressionStatement node) => _throw(node);
+
+  @override
+  R visitExtendsClause(ExtendsClause node) => _throw(node);
+
+  @override
+  R visitFieldDeclaration(FieldDeclaration node) => _throw(node);
+
+  @override
+  R visitFieldFormalParameter(FieldFormalParameter node) => _throw(node);
+
+  @override
+  R visitForEachStatement(ForEachStatement node) => _throw(node);
+
+  @override
+  R visitFormalParameterList(FormalParameterList node) => _throw(node);
+
+  @override
+  R visitForStatement(ForStatement node) => _throw(node);
+
+  @override
+  R visitFunctionDeclaration(FunctionDeclaration node) => _throw(node);
+
+  @override
+  R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) =>
+      _throw(node);
+
+  @override
+  R visitFunctionExpression(FunctionExpression node) => _throw(node);
+
+  @override
+  R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) =>
+      _throw(node);
+
+  @override
+  R visitFunctionTypeAlias(FunctionTypeAlias node) => _throw(node);
+
+  @override
+  R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) =>
+      _throw(node);
+
+  @override
+  R visitGenericFunctionType(GenericFunctionType node) => _throw(node);
+
+  @override
+  R visitGenericTypeAlias(GenericTypeAlias node) => _throw(node);
+
+  @override
+  R visitHideCombinator(HideCombinator node) => _throw(node);
+
+  @override
+  R visitIfStatement(IfStatement node) => _throw(node);
+
+  @override
+  R visitImplementsClause(ImplementsClause node) => _throw(node);
+
+  @override
+  R visitImportDirective(ImportDirective node) => _throw(node);
+
+  @override
+  R visitIndexExpression(IndexExpression node) => _throw(node);
+
+  @override
+  R visitInstanceCreationExpression(InstanceCreationExpression node) =>
+      _throw(node);
+
+  @override
+  R visitIntegerLiteral(IntegerLiteral node) => _throw(node);
+
+  @override
+  R visitInterpolationExpression(InterpolationExpression node) => _throw(node);
+
+  @override
+  R visitInterpolationString(InterpolationString node) => _throw(node);
+
+  @override
+  R visitIsExpression(IsExpression node) => _throw(node);
+
+  @override
+  R visitLabel(Label node) => _throw(node);
+
+  @override
+  R visitLabeledStatement(LabeledStatement node) => _throw(node);
+
+  @override
+  R visitLibraryDirective(LibraryDirective node) => _throw(node);
+
+  @override
+  R visitLibraryIdentifier(LibraryIdentifier node) => _throw(node);
+
+  @override
+  R visitListLiteral(ListLiteral node) => _throw(node);
+
+  @override
+  R visitMapLiteral(MapLiteral node) => _throw(node);
+
+  @override
+  R visitMapLiteralEntry(MapLiteralEntry node) => _throw(node);
+
+  @override
+  R visitMethodDeclaration(MethodDeclaration node) => _throw(node);
+
+  @override
+  R visitMethodInvocation(MethodInvocation node) => _throw(node);
+
+  @override
+  R visitNamedExpression(NamedExpression node) => _throw(node);
+
+  @override
+  R visitNativeClause(NativeClause node) => _throw(node);
+
+  @override
+  R visitNativeFunctionBody(NativeFunctionBody node) => _throw(node);
+
+  @override
+  R visitNullLiteral(NullLiteral node) => _throw(node);
+
+  @override
+  R visitParenthesizedExpression(ParenthesizedExpression node) => _throw(node);
+
+  @override
+  R visitPartDirective(PartDirective node) => _throw(node);
+
+  @override
+  R visitPartOfDirective(PartOfDirective node) => _throw(node);
+
+  @override
+  R visitPostfixExpression(PostfixExpression node) => _throw(node);
+
+  @override
+  R visitPrefixedIdentifier(PrefixedIdentifier node) => _throw(node);
+
+  @override
+  R visitPrefixExpression(PrefixExpression node) => _throw(node);
+
+  @override
+  R visitPropertyAccess(PropertyAccess node) => _throw(node);
+
+  @override
+  R visitRedirectingConstructorInvocation(
+          RedirectingConstructorInvocation node) =>
+      _throw(node);
+
+  @override
+  R visitRethrowExpression(RethrowExpression node) => _throw(node);
+
+  @override
+  R visitReturnStatement(ReturnStatement node) => _throw(node);
+
+  @override
+  R visitScriptTag(ScriptTag node) => _throw(node);
+
+  @override
+  R visitShowCombinator(ShowCombinator node) => _throw(node);
+
+  @override
+  R visitSimpleFormalParameter(SimpleFormalParameter node) => _throw(node);
+
+  @override
+  R visitSimpleIdentifier(SimpleIdentifier node) => _throw(node);
+
+  @override
+  R visitSimpleStringLiteral(SimpleStringLiteral node) => _throw(node);
+
+  @override
+  R visitStringInterpolation(StringInterpolation node) => _throw(node);
+
+  @override
+  R visitSuperConstructorInvocation(SuperConstructorInvocation node) =>
+      _throw(node);
+
+  @override
+  R visitSuperExpression(SuperExpression node) => _throw(node);
+
+  @override
+  R visitSwitchCase(SwitchCase node) => _throw(node);
+
+  @override
+  R visitSwitchDefault(SwitchDefault node) => _throw(node);
+
+  @override
+  R visitSwitchStatement(SwitchStatement node) => _throw(node);
+
+  @override
+  R visitSymbolLiteral(SymbolLiteral node) => _throw(node);
+
+  @override
+  R visitThisExpression(ThisExpression node) => _throw(node);
+
+  @override
+  R visitThrowExpression(ThrowExpression node) => _throw(node);
+
+  @override
+  R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) =>
+      _throw(node);
+
+  @override
+  R visitTryStatement(TryStatement node) => _throw(node);
+
+  @override
+  R visitTypeArgumentList(TypeArgumentList node) => _throw(node);
+
+  @override
+  R visitTypeName(TypeName node) => _throw(node);
+
+  @override
+  R visitTypeParameter(TypeParameter node) => _throw(node);
+
+  @override
+  R visitTypeParameterList(TypeParameterList node) => _throw(node);
+
+  @override
+  R visitVariableDeclaration(VariableDeclaration node) => _throw(node);
+
+  @override
+  R visitVariableDeclarationList(VariableDeclarationList node) => _throw(node);
+
+  @override
+  R visitVariableDeclarationStatement(VariableDeclarationStatement node) =>
+      _throw(node);
+
+  @override
+  R visitWhileStatement(WhileStatement node) => _throw(node);
+
+  @override
+  R visitWithClause(WithClause node) => _throw(node);
+  @override
+  R visitYieldStatement(YieldStatement node) => _throw(node);
+
+  R _throw(AstNode node) {
+    throw new Exception('Missing implementation of visit${node.runtimeType}');
+  }
+}
+
+/**
+ * An AST visitor that captures visit call timings.
+ *
+ * Clients may not extend, implement or mix-in this class.
  */
 class TimedAstVisitor<T> implements AstVisitor<T> {
   /**
@@ -2000,6 +2386,22 @@
   }
 
   @override
+  T visitGenericFunctionType(GenericFunctionType node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitGenericFunctionType(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
+  T visitGenericTypeAlias(GenericTypeAlias node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitGenericTypeAlias(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
   T visitHideCombinator(HideCombinator node) {
     stopwatch.start();
     T result = _baseVisitor.visitHideCombinator(node);
@@ -2483,7 +2885,7 @@
  * Failure to do so will cause the children of the visited node to not be
  * visited.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class UnifyingAstVisitor<R> implements AstVisitor<R> {
   @override
@@ -2642,6 +3044,12 @@
       visitNode(node);
 
   @override
+  R visitGenericFunctionType(GenericFunctionType node) => visitNode(node);
+
+  @override
+  R visitGenericTypeAlias(GenericTypeAlias node) => visitNode(node);
+
+  @override
   R visitHideCombinator(HideCombinator node) => visitNode(node);
 
   @override
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index c235ea3..5edb586 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -1017,7 +1017,14 @@
 /**
  * An object that can be used to visit an element structure.
  *
- * Clients may implement this class.
+ * Clients may not extend, implement or mix-in this class. There are classes
+ * that implement this interface that provide useful default behaviors in
+ * `package:analyzer/dart/ast/visitor.dart`. A couple of the most useful include
+ * * SimpleElementVisitor which implements every visit method by doing nothing,
+ * * RecursiveElementVisitor which will cause every node in a structure to be
+ *   visited, and
+ * * ThrowingElementVisitor which implements every visit method by throwing an
+ *   exception.
  */
 abstract class ElementVisitor<R> {
   R visitClassElement(ClassElement element);
diff --git a/pkg/analyzer/lib/dart/element/visitor.dart b/pkg/analyzer/lib/dart/element/visitor.dart
index 185357d..c34c771 100644
--- a/pkg/analyzer/lib/dart/element/visitor.dart
+++ b/pkg/analyzer/lib/dart/element/visitor.dart
@@ -82,7 +82,7 @@
  * do so will cause the visit methods for superclasses of the element to not be
  * invoked and will cause the children of the visited node to not be visited.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class GeneralizingElementVisitor<R> implements ElementVisitor<R> {
   @override
@@ -189,7 +189,7 @@
  * children. Failure to do so will cause the children of the visited element to
  * not be visited.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class RecursiveElementVisitor<R> implements ElementVisitor<R> {
   @override
@@ -313,7 +313,7 @@
  * mechanism (and hence don't need to recursively visit a whole structure) and
  * that only need to visit a small number of element types.
  *
- * Clients may extend or implement this class.
+ * Clients may extend this class.
  */
 class SimpleElementVisitor<R> implements ElementVisitor<R> {
   @override
@@ -374,3 +374,82 @@
   @override
   R visitTypeParameterElement(TypeParameterElement element) => null;
 }
+
+/**
+ * An AST visitor that will throw an exception if any of the visit methods that
+ * are invoked have not been overridden. It is intended to be a superclass for
+ * classes that implement the visitor pattern and need to (a) override all of
+ * the visit methods or (b) need to override a subset of the visit method and
+ * want to catch when any other visit methods have been invoked.
+ *
+ * Clients may extend this class.
+ */
+class ThrowingElementVisitor<R> implements ElementVisitor<R> {
+  @override
+  R visitClassElement(ClassElement element) => _throw(element);
+
+  @override
+  R visitCompilationUnitElement(CompilationUnitElement element) =>
+      _throw(element);
+
+  @override
+  R visitConstructorElement(ConstructorElement element) => _throw(element);
+
+  @override
+  R visitExportElement(ExportElement element) => _throw(element);
+
+  @override
+  R visitFieldElement(FieldElement element) => _throw(element);
+
+  @override
+  R visitFieldFormalParameterElement(FieldFormalParameterElement element) =>
+      _throw(element);
+
+  @override
+  R visitFunctionElement(FunctionElement element) => _throw(element);
+
+  @override
+  R visitFunctionTypeAliasElement(FunctionTypeAliasElement element) =>
+      _throw(element);
+
+  @override
+  R visitImportElement(ImportElement element) => _throw(element);
+
+  @override
+  R visitLabelElement(LabelElement element) => _throw(element);
+
+  @override
+  R visitLibraryElement(LibraryElement element) => _throw(element);
+
+  @override
+  R visitLocalVariableElement(LocalVariableElement element) => _throw(element);
+
+  @override
+  R visitMethodElement(MethodElement element) => _throw(element);
+
+  @override
+  R visitMultiplyDefinedElement(MultiplyDefinedElement element) =>
+      _throw(element);
+
+  @override
+  R visitParameterElement(ParameterElement element) => _throw(element);
+
+  @override
+  R visitPrefixElement(PrefixElement element) => _throw(element);
+
+  @override
+  R visitPropertyAccessorElement(PropertyAccessorElement element) =>
+      _throw(element);
+
+  @override
+  R visitTopLevelVariableElement(TopLevelVariableElement element) =>
+      _throw(element);
+
+  @override
+  R visitTypeParameterElement(TypeParameterElement element) => _throw(element);
+
+  R _throw(Element element) {
+    throw new Exception(
+        'Missing implementation of visit${element.runtimeType}');
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index c2865a5..4f1234e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -73,7 +73,7 @@
   /**
    * The version of data format, should be incremented on every format change.
    */
-  static const int DATA_VERSION = 9;
+  static const int DATA_VERSION = 10;
 
   /**
    * The name of the driver, e.g. the name of the folder.
@@ -297,6 +297,11 @@
   Set<String> get knownFiles => _fsState.knownFilePaths;
 
   /**
+   * Return the number of files scheduled for analysis.
+   */
+  int get numberOfFilesToAnalyze => _filesToAnalyze.length;
+
+  /**
    * Return the list of files that the driver should try to analyze sooner.
    */
   List<String> get priorityFiles => _priorityFiles.toList(growable: false);
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 3238aed..862b16c 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -504,15 +504,15 @@
   Token asOperator;
 
   /**
-   * The name of the type being cast to.
+   * The type being cast to.
    */
-  TypeName _type;
+  TypeAnnotation _type;
 
   /**
    * Initialize a newly created as expression.
    */
   AsExpressionImpl(
-      ExpressionImpl expression, this.asOperator, TypeNameImpl type) {
+      ExpressionImpl expression, this.asOperator, TypeAnnotationImpl type) {
     _expression = _becomeParentOf(expression);
     _type = _becomeParentOf(type);
   }
@@ -539,11 +539,11 @@
   int get precedence => 7;
 
   @override
-  TypeName get type => _type;
+  TypeAnnotation get type => _type;
 
   @override
-  void set type(TypeName name) {
-    _type = _becomeParentOf(name as AstNodeImpl);
+  void set type(TypeAnnotation type) {
+    _type = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -1575,7 +1575,7 @@
    * The type of exceptions caught by this catch clause, or `null` if this catch
    * clause catches every type of exception.
    */
-  TypeName _exceptionType;
+  TypeAnnotation _exceptionType;
 
   /**
    * The token representing the 'catch' keyword, or `null` if there is no
@@ -1628,7 +1628,7 @@
    */
   CatchClauseImpl(
       this.onKeyword,
-      TypeNameImpl exceptionType,
+      TypeAnnotationImpl exceptionType,
       this.catchKeyword,
       this.leftParenthesis,
       SimpleIdentifierImpl exceptionParameter,
@@ -1682,10 +1682,10 @@
   }
 
   @override
-  TypeName get exceptionType => _exceptionType;
+  TypeAnnotation get exceptionType => _exceptionType;
 
   @override
-  void set exceptionType(TypeName exceptionType) {
+  void set exceptionType(TypeAnnotation exceptionType) {
     _exceptionType = _becomeParentOf(exceptionType as AstNodeImpl);
   }
 
@@ -3294,7 +3294,7 @@
    * The name of the declared type of the parameter, or `null` if the parameter
    * does not have a declared type.
    */
-  TypeName _type;
+  TypeAnnotation _type;
 
   /**
    * The name of the variable being declared.
@@ -3308,7 +3308,7 @@
    * given. The [type] must be `null` if the keyword is 'var'.
    */
   DeclaredIdentifierImpl(CommentImpl comment, List<Annotation> metadata,
-      this.keyword, TypeNameImpl type, SimpleIdentifierImpl identifier)
+      this.keyword, TypeAnnotationImpl type, SimpleIdentifierImpl identifier)
       : super(comment, metadata) {
     _type = _becomeParentOf(type);
     _identifier = _becomeParentOf(identifier);
@@ -3354,11 +3354,11 @@
   bool get isFinal => keyword?.keyword == Keyword.FINAL;
 
   @override
-  TypeName get type => _type;
+  TypeAnnotation get type => _type;
 
   @override
-  void set type(TypeName typeName) {
-    _type = _becomeParentOf(typeName as AstNodeImpl);
+  void set type(TypeAnnotation type) {
+    _type = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -4408,7 +4408,7 @@
    * The name of the declared type of the parameter, or `null` if the parameter
    * does not have a declared type.
    */
-  TypeName _type;
+  TypeAnnotation _type;
 
   /**
    * The token representing the 'this' keyword.
@@ -4447,7 +4447,7 @@
       CommentImpl comment,
       List<Annotation> metadata,
       this.keyword,
-      TypeNameImpl type,
+      TypeAnnotationImpl type,
       this.thisKeyword,
       this.period,
       SimpleIdentifierImpl identifier,
@@ -4501,11 +4501,11 @@
   }
 
   @override
-  TypeName get type => _type;
+  TypeAnnotation get type => _type;
 
   @override
-  void set type(TypeName typeName) {
-    _type = _becomeParentOf(typeName as AstNodeImpl);
+  void set type(TypeAnnotation type) {
+    _type = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -5084,7 +5084,7 @@
   /**
    * The return type of the function, or `null` if no return type was declared.
    */
-  TypeName _returnType;
+  TypeAnnotation _returnType;
 
   /**
    * The token representing the 'get' or 'set' keyword, or `null` if this is a
@@ -5110,7 +5110,7 @@
       CommentImpl comment,
       List<Annotation> metadata,
       this.externalKeyword,
-      TypeNameImpl returnType,
+      TypeAnnotationImpl returnType,
       this.propertyKeyword,
       SimpleIdentifierImpl name,
       FunctionExpressionImpl functionExpression)
@@ -5162,11 +5162,11 @@
   bool get isSetter => propertyKeyword?.keyword == Keyword.SET;
 
   @override
-  TypeName get returnType => _returnType;
+  TypeAnnotation get returnType => _returnType;
 
   @override
-  void set returnType(TypeName returnType) {
-    _returnType = _becomeParentOf(returnType as AstNodeImpl);
+  void set returnType(TypeAnnotation type) {
+    _returnType = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -5195,8 +5195,9 @@
   /**
    * Initialize a newly created function declaration statement.
    */
-  FunctionDeclarationStatementImpl(FunctionDeclaration functionDeclaration) {
-    _functionDeclaration = _becomeParentOf(functionDeclaration as AstNodeImpl);
+  FunctionDeclarationStatementImpl(
+      FunctionDeclarationImpl functionDeclaration) {
+    _functionDeclaration = _becomeParentOf(functionDeclaration);
   }
 
   @override
@@ -5434,7 +5435,7 @@
    * The name of the return type of the function type being defined, or `null`
    * if no return type was given.
    */
-  TypeName _returnType;
+  TypeAnnotation _returnType;
 
   /**
    * The type parameters for the function type, or `null` if the function type
@@ -5458,7 +5459,7 @@
       CommentImpl comment,
       List<Annotation> metadata,
       Token keyword,
-      TypeNameImpl returnType,
+      TypeAnnotationImpl returnType,
       SimpleIdentifierImpl name,
       TypeParameterListImpl typeParameters,
       FormalParameterListImpl parameters,
@@ -5491,11 +5492,11 @@
   }
 
   @override
-  TypeName get returnType => _returnType;
+  TypeAnnotation get returnType => _returnType;
 
   @override
-  void set returnType(TypeName typeName) {
-    _returnType = _becomeParentOf(typeName as AstNodeImpl);
+  void set returnType(TypeAnnotation type) {
+    _returnType = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -5532,7 +5533,7 @@
    * The return type of the function, or `null` if the function does not have a
    * return type.
    */
-  TypeName _returnType;
+  TypeAnnotation _returnType;
 
   /**
    * The type parameters associated with the function, or `null` if the function
@@ -5557,7 +5558,7 @@
   FunctionTypedFormalParameterImpl(
       CommentImpl comment,
       List<Annotation> metadata,
-      TypeNameImpl returnType,
+      TypeAnnotationImpl returnType,
       SimpleIdentifierImpl identifier,
       TypeParameterListImpl typeParameters,
       FormalParameterListImpl parameters,
@@ -5598,10 +5599,10 @@
   }
 
   @override
-  TypeName get returnType => _returnType;
+  TypeAnnotation get returnType => _returnType;
 
   @override
-  void set returnType(TypeName type) {
+  void set returnType(TypeAnnotation type) {
     _returnType = _becomeParentOf(type as AstNodeImpl);
   }
 
@@ -5628,6 +5629,214 @@
 }
 
 /**
+ * An anonymous function type.
+ *
+ *    functionType ::=
+ *        [TypeAnnotation]? 'Function' [TypeParameterList]? [FormalParameterList]
+ *
+ * where the FormalParameterList is being used to represent the following
+ * grammar, despite the fact that FormalParameterList can represent a much
+ * larger grammar than the one below. This is done in order to simplify the
+ * implementation.
+ *
+ *    parameterTypeList ::=
+ *        () |
+ *        ( normalParameterTypes ,? ) |
+ *        ( normalParameterTypes , optionalParameterTypes ) |
+ *        ( optionalParameterTypes )
+ *    namedParameterTypes ::=
+ *        { namedParameterType (, namedParameterType)* ,? }
+ *    namedParameterType ::=
+ *        [TypeAnnotation]? [SimpleIdentifier]
+ *    normalParameterTypes ::=
+ *        normalParameterType (, normalParameterType)*
+ *    normalParameterType ::=
+ *        [TypeAnnotation] [SimpleIdentifier]?
+ *    optionalParameterTypes ::=
+ *        optionalPositionalParameterTypes | namedParameterTypes
+ *    optionalPositionalParameterTypes ::=
+ *        [ normalParameterTypes ,? ]
+ */
+class GenericFunctionTypeImpl extends TypeAnnotationImpl
+    implements GenericFunctionType {
+  /**
+   * The name of the return type of the function type being defined, or
+   * `null` if no return type was given.
+   */
+  TypeAnnotation _returnType;
+
+  @override
+  Token functionKeyword;
+
+  /**
+   * The type parameters for the function type, or `null` if the function type
+   * does not have any type parameters.
+   */
+  TypeParameterList _typeParameters;
+
+  /**
+   * The parameters associated with the function type.
+   */
+  FormalParameterList _parameters;
+
+  /**
+   * Initialize a newly created generic function type.
+   */
+  GenericFunctionTypeImpl(
+      TypeAnnotationImpl returnType,
+      this.functionKeyword,
+      TypeParameterListImpl typeParameters,
+      FormalParameterListImpl parameters) {
+    _returnType = _becomeParentOf(returnType);
+    _typeParameters = _becomeParentOf(typeParameters);
+    _parameters = _becomeParentOf(parameters);
+  }
+
+  @override
+  Token get beginToken =>
+      _returnType == null ? functionKeyword : _returnType.beginToken;
+
+  @override
+  Iterable<SyntacticEntity> get childEntities => new ChildEntities()
+    ..add(_returnType)
+    ..add(functionKeyword)
+    ..add(_typeParameters)
+    ..add(_parameters);
+
+  @override
+  Token get endToken => _parameters.endToken;
+
+  @override
+  FormalParameterList get parameters => _parameters;
+
+  @override
+  void set parameters(FormalParameterList parameters) {
+    _parameters = _becomeParentOf(parameters as AstNodeImpl);
+  }
+
+  @override
+  TypeAnnotation get returnType => _returnType;
+
+  @override
+  void set returnType(TypeAnnotation type) {
+    _returnType = _becomeParentOf(type as AstNodeImpl);
+  }
+
+  @override
+  DartType get type => null;
+
+  /**
+   * Return the type parameters for the function type, or `null` if the function
+   * type does not have any type parameters.
+   */
+  TypeParameterList get typeParameters => _typeParameters;
+
+  /**
+   * Set the type parameters for the function type to the given list of
+   * [typeParameters].
+   */
+  void set typeParameters(TypeParameterList typeParameters) {
+    _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl);
+  }
+
+  // TODO: implement type
+  @override
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) {
+    return visitor.visitGenericFunctionType(this);
+  }
+
+  @override
+  void visitChildren(AstVisitor visitor) {
+    _returnType?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _parameters?.accept(visitor);
+  }
+}
+
+/**
+ * A generic type alias.
+ *
+ *    functionTypeAlias ::=
+ *        metadata 'typedef' [SimpleIdentifier] [TypeParameterList]? = [FunctionType] ';'
+ */
+class GenericTypeAliasImpl extends TypeAliasImpl implements GenericTypeAlias {
+  /**
+   * The type parameters for the function type, or `null` if the function
+   * type does not have any type parameters.
+   */
+  TypeParameterList _typeParameters;
+
+  @override
+  Token equals;
+
+  /**
+   * The type of function being defined by the alias.
+   */
+  GenericFunctionType _functionType;
+
+  /**
+   * Returns a newly created generic type alias. Either or both of the
+   * [comment] and [metadata] can be `null` if the variable list does not have
+   * the corresponding attribute. The [typeParameters] can be `null` if there
+   * are no type parameters.
+   */
+  GenericTypeAliasImpl(
+      Comment comment,
+      List<Annotation> metadata,
+      Token typedefToken,
+      SimpleIdentifier name,
+      TypeParameterListImpl typeParameters,
+      this.equals,
+      GenericFunctionTypeImpl functionType,
+      Token semicolon)
+      : super(comment, metadata, typedefToken, name, semicolon) {
+    _typeParameters = _becomeParentOf(typeParameters);
+    _functionType = _becomeParentOf(functionType);
+  }
+
+  @override
+  Iterable<SyntacticEntity> get childEntities => new ChildEntities()
+    ..addAll(metadata)
+    ..add(typedefKeyword)
+    ..add(name)
+    ..add(_typeParameters)
+    ..add(equals)
+    ..add(_functionType);
+  @override
+  Element get element => null;
+
+  @override
+  GenericFunctionType get functionType => _functionType;
+
+  @override
+  void set functionType(GenericFunctionType functionType) {
+    _functionType = _becomeParentOf(functionType as AstNodeImpl);
+  }
+
+  @override
+  TypeParameterList get typeParameters => _typeParameters;
+
+  @override
+  void set typeParameters(TypeParameterList typeParameters) {
+    _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl);
+  }
+
+  @override
+  dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) {
+    return visitor.visitGenericTypeAlias(this);
+  }
+
+  // TODO: implement element
+  @override
+  void visitChildren(AstVisitor visitor) {
+    super.visitChildren(visitor);
+    name?.accept(visitor);
+    _typeParameters?.accept(visitor);
+    _functionType?.accept(visitor);
+  }
+}
+
+/**
  * A combinator that restricts the names being imported to those that are not in
  * a given list.
  *
@@ -6527,14 +6736,14 @@
   /**
    * The name of the type being tested for.
    */
-  TypeName _type;
+  TypeAnnotation _type;
 
   /**
    * Initialize a newly created is expression. The [notOperator] can be `null`
    * if the sense of the test is not negated.
    */
   IsExpressionImpl(ExpressionImpl expression, this.isOperator, this.notOperator,
-      TypeNameImpl type) {
+      TypeAnnotationImpl type) {
     _expression = _becomeParentOf(expression);
     _type = _becomeParentOf(type);
   }
@@ -6564,11 +6773,11 @@
   int get precedence => 7;
 
   @override
-  TypeName get type => _type;
+  TypeAnnotation get type => _type;
 
   @override
-  void set type(TypeName name) {
-    _type = _becomeParentOf(name as AstNodeImpl);
+  void set type(TypeAnnotation type) {
+    _type = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -7124,7 +7333,7 @@
   /**
    * The return type of the method, or `null` if no return type was declared.
    */
-  TypeName _returnType;
+  TypeAnnotation _returnType;
 
   /**
    * The token representing the 'get' or 'set' keyword, or `null` if this is a
@@ -7178,7 +7387,7 @@
       List<Annotation> metadata,
       this.externalKeyword,
       this.modifierKeyword,
-      TypeNameImpl returnType,
+      TypeAnnotationImpl returnType,
       this.propertyKeyword,
       this.operatorKeyword,
       SimpleIdentifierImpl name,
@@ -7277,11 +7486,11 @@
   }
 
   @override
-  TypeName get returnType => _returnType;
+  TypeAnnotation get returnType => _returnType;
 
   @override
-  void set returnType(TypeName typeName) {
-    _returnType = _becomeParentOf(typeName as AstNodeImpl);
+  void set returnType(TypeAnnotation type) {
+    _returnType = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -8991,7 +9200,7 @@
    * The name of the declared type of the parameter, or `null` if the parameter
    * does not have a declared type.
    */
-  TypeName _type;
+  TypeAnnotation _type;
 
   /**
    * Initialize a newly created formal parameter. Either or both of the
@@ -9000,7 +9209,7 @@
    * specified. The [type] must be `null` if the keyword is 'var'.
    */
   SimpleFormalParameterImpl(CommentImpl comment, List<Annotation> metadata,
-      this.keyword, TypeNameImpl type, SimpleIdentifierImpl identifier)
+      this.keyword, TypeAnnotationImpl type, SimpleIdentifierImpl identifier)
       : super(comment, metadata, identifier) {
     _type = _becomeParentOf(type);
   }
@@ -9032,11 +9241,11 @@
   bool get isFinal => keyword?.keyword == Keyword.FINAL;
 
   @override
-  TypeName get type => _type;
+  TypeAnnotation get type => _type;
 
   @override
-  void set type(TypeName typeName) {
-    _type = _becomeParentOf(typeName as AstNodeImpl);
+  void set type(TypeAnnotation type) {
+    _type = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -10299,6 +10508,16 @@
 }
 
 /**
+ * A type annotation.
+ *
+ *    type ::=
+ *        [NamedType]
+ *      | [GenericFunctionType]
+ */
+abstract class TypeAnnotationImpl extends AstNodeImpl
+    implements TypeAnnotation {}
+
+/**
  * A list of type arguments.
  *
  *    typeArguments ::=
@@ -10313,7 +10532,7 @@
   /**
    * The type arguments associated with the type.
    */
-  NodeList<TypeName> _arguments;
+  NodeList<TypeAnnotation> _arguments;
 
   /**
    * The right bracket.
@@ -10324,12 +10543,12 @@
    * Initialize a newly created list of type arguments.
    */
   TypeArgumentListImpl(
-      this.leftBracket, List<TypeName> arguments, this.rightBracket) {
-    _arguments = new NodeListImpl<TypeName>(this, arguments);
+      this.leftBracket, List<TypeAnnotation> arguments, this.rightBracket) {
+    _arguments = new NodeListImpl<TypeAnnotation>(this, arguments);
   }
 
   @override
-  NodeList<TypeName> get arguments => _arguments;
+  NodeList<TypeAnnotation> get arguments => _arguments;
 
   @override
   Token get beginToken => leftBracket;
@@ -10406,7 +10625,7 @@
  *    typeName ::=
  *        [Identifier] typeArguments?
  */
-class TypeNameImpl extends AstNodeImpl implements TypeName {
+class TypeNameImpl extends TypeAnnotationImpl implements TypeName {
   /**
    * The name of the type.
    */
@@ -10512,7 +10731,7 @@
    * The name of the upper bound for legal arguments, or `null` if there is no
    * explicit upper bound.
    */
-  TypeName _bound;
+  TypeAnnotation _bound;
 
   /**
    * Initialize a newly created type parameter. Either or both of the [comment]
@@ -10521,18 +10740,18 @@
    * the parameter does not have an upper bound.
    */
   TypeParameterImpl(CommentImpl comment, List<Annotation> metadata,
-      SimpleIdentifierImpl name, this.extendsKeyword, TypeNameImpl bound)
+      SimpleIdentifierImpl name, this.extendsKeyword, TypeAnnotationImpl bound)
       : super(comment, metadata) {
     _name = _becomeParentOf(name);
     _bound = _becomeParentOf(bound);
   }
 
   @override
-  TypeName get bound => _bound;
+  TypeAnnotation get bound => _bound;
 
   @override
-  void set bound(TypeName typeName) {
-    _bound = _becomeParentOf(typeName as AstNodeImpl);
+  void set bound(TypeAnnotation type) {
+    _bound = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
@@ -10890,7 +11109,7 @@
   /**
    * The type of the variables being declared, or `null` if no type was provided.
    */
-  TypeName _type;
+  TypeAnnotation _type;
 
   /**
    * A list containing the individual variables being declared.
@@ -10903,8 +11122,12 @@
    * the corresponding attribute. The [keyword] can be `null` if a type was
    * specified. The [type] must be `null` if the keyword is 'var'.
    */
-  VariableDeclarationListImpl(CommentImpl comment, List<Annotation> metadata,
-      this.keyword, TypeNameImpl type, List<VariableDeclaration> variables)
+  VariableDeclarationListImpl(
+      CommentImpl comment,
+      List<Annotation> metadata,
+      this.keyword,
+      TypeAnnotationImpl type,
+      List<VariableDeclaration> variables)
       : super(comment, metadata) {
     _type = _becomeParentOf(type);
     _variables = new NodeListImpl<VariableDeclaration>(this, variables);
@@ -10937,11 +11160,11 @@
   bool get isFinal => keyword?.keyword == Keyword.FINAL;
 
   @override
-  TypeName get type => _type;
+  TypeAnnotation get type => _type;
 
   @override
-  void set type(TypeName typeName) {
-    _type = _becomeParentOf(typeName as AstNodeImpl);
+  void set type(TypeAnnotation type) {
+    _type = _becomeParentOf(type as AstNodeImpl);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 72079b6..482ae01 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -29,7 +29,7 @@
 
   @override
   AsExpression asExpression(
-          Expression expression, Token asOperator, TypeName type) =>
+          Expression expression, Token asOperator, TypeAnnotation type) =>
       new AsExpressionImpl(expression, asOperator, type);
 
   @override
@@ -98,7 +98,7 @@
   @override
   CatchClause catchClause(
           Token onKeyword,
-          TypeName exceptionType,
+          TypeAnnotation exceptionType,
           Token catchKeyword,
           Token leftParenthesis,
           SimpleIdentifier exceptionParameter,
@@ -262,7 +262,7 @@
           Comment comment,
           List<Annotation> metadata,
           Token keyword,
-          TypeName type,
+          TypeAnnotation type,
           SimpleIdentifier identifier) =>
       new DeclaredIdentifierImpl(comment, metadata, keyword, type, identifier);
 
@@ -367,7 +367,7 @@
           Comment comment,
           List<Annotation> metadata,
           Token keyword,
-          TypeName type,
+          TypeAnnotation type,
           Token thisKeyword,
           Token period,
           SimpleIdentifier identifier,
@@ -455,7 +455,7 @@
           Comment comment,
           List<Annotation> metadata,
           Token externalKeyword,
-          TypeName returnType,
+          TypeAnnotation returnType,
           Token propertyKeyword,
           SimpleIdentifier name,
           FunctionExpression functionExpression) =>
@@ -483,7 +483,7 @@
           Comment comment,
           List<Annotation> metadata,
           Token keyword,
-          TypeName returnType,
+          TypeAnnotation returnType,
           SimpleIdentifier name,
           TypeParameterList typeParameters,
           FormalParameterList parameters,
@@ -495,7 +495,7 @@
   FunctionTypedFormalParameter functionTypedFormalParameter(
           Comment comment,
           List<Annotation> metadata,
-          TypeName returnType,
+          TypeAnnotation returnType,
           SimpleIdentifier identifier,
           TypeParameterList typeParameters,
           FormalParameterList parameters,
@@ -504,6 +504,28 @@
           identifier, typeParameters, parameters, question);
 
   @override
+  GenericFunctionType genericFunctionType(
+          TypeAnnotation returnType,
+          Token functionKeyword,
+          TypeParameterList typeParameters,
+          FormalParameterList _parameters) =>
+      new GenericFunctionTypeImpl(
+          returnType, functionKeyword, typeParameters, _parameters);
+
+  @override
+  GenericTypeAlias genericTypeAlias(
+          Comment comment,
+          List<Annotation> metadata,
+          Token typedefKeyword,
+          SimpleIdentifier name,
+          TypeParameterList typeParameters,
+          Token equals,
+          GenericFunctionType functionType,
+          Token semicolon) =>
+      new GenericTypeAliasImpl(comment, metadata, typedefKeyword, name,
+          typeParameters, equals, functionType, semicolon);
+
+  @override
   HideCombinator hideCombinator(
           Token keyword, List<SimpleIdentifier> hiddenNames) =>
       new HideCombinatorImpl(keyword, hiddenNames);
@@ -582,7 +604,7 @@
 
   @override
   IsExpression isExpression(Expression expression, Token isOperator,
-          Token notOperator, TypeName type) =>
+          Token notOperator, TypeAnnotation type) =>
       new IsExpressionImpl(expression, isOperator, notOperator, type);
 
   @override
@@ -630,7 +652,7 @@
           List<Annotation> metadata,
           Token externalKeyword,
           Token modifierKeyword,
-          TypeName returnType,
+          TypeAnnotation returnType,
           Token propertyKeyword,
           Token operatorKeyword,
           SimpleIdentifier name,
@@ -753,7 +775,7 @@
           Comment comment,
           List<Annotation> metadata,
           Token keyword,
-          TypeName type,
+          TypeAnnotation type,
           SimpleIdentifier identifier) =>
       new SimpleFormalParameterImpl(
           comment, metadata, keyword, type, identifier);
@@ -787,7 +809,6 @@
   @override
   SuperExpression superExpression(Token superKeyword) =>
       new SuperExpressionImpl(superKeyword);
-
   @override
   SwitchCase switchCase(List<Label> labels, Token keyword,
           Expression expression, Token colon, List<Statement> statements) =>
@@ -797,6 +818,7 @@
   SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon,
           List<Statement> statements) =>
       new SwitchDefaultImpl(labels, keyword, colon, statements);
+
   @override
   SwitchStatement switchStatement(
           Token switchKeyword,
@@ -841,8 +863,8 @@
           tryKeyword, body, catchClauses, finallyKeyword, finallyBlock);
 
   @override
-  TypeArgumentList typeArgumentList(
-          Token leftBracket, List<TypeName> arguments, Token rightBracket) =>
+  TypeArgumentList typeArgumentList(Token leftBracket,
+          List<TypeAnnotation> arguments, Token rightBracket) =>
       new TypeArgumentListImpl(leftBracket, arguments, rightBracket);
 
   @override
@@ -852,7 +874,7 @@
 
   @override
   TypeParameter typeParameter(Comment comment, List<Annotation> metadata,
-          SimpleIdentifier name, Token extendsKeyword, TypeName bound) =>
+          SimpleIdentifier name, Token extendsKeyword, TypeAnnotation bound) =>
       new TypeParameterImpl(comment, metadata, name, extendsKeyword, bound);
 
   @override
@@ -870,7 +892,7 @@
           Comment comment,
           List<Annotation> metadata,
           Token keyword,
-          TypeName type,
+          TypeAnnotation type,
           List<VariableDeclaration> variables) =>
       new VariableDeclarationListImpl(
           comment, metadata, keyword, type, variables);
diff --git a/pkg/analyzer/lib/src/dart/ast/resolution_map.dart b/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
index 975f97d..3fe5d0f 100644
--- a/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
+++ b/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
@@ -151,7 +151,7 @@
   DartType staticTypeForExpression(Expression node) => node.staticType;
 
   @override
-  DartType typeForTypeName(TypeName node) => node.type;
+  DartType typeForTypeName(TypeAnnotation node) => node.type;
 
   @override
   Element uriElementForDirective(UriBasedDirective node) => node.uriElement;
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index d23485a..f615ef3 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -551,6 +551,26 @@
           cloneNode(node.parameters));
 
   @override
+  AstNode visitGenericFunctionType(GenericFunctionType node) =>
+      astFactory.genericFunctionType(
+          cloneNode(node.returnType),
+          cloneToken(node.functionKeyword),
+          cloneNode(node.typeParameters),
+          cloneNode(node.parameters));
+
+  @override
+  AstNode visitGenericTypeAlias(GenericTypeAlias node) =>
+      astFactory.genericTypeAlias(
+          cloneNode(node.documentationComment),
+          cloneNodeList(node.metadata),
+          cloneToken(node.typedefKeyword),
+          cloneNode(node.name),
+          cloneNode(node.typeParameters),
+          cloneToken(node.equals),
+          cloneNode(node.functionType),
+          cloneToken(node.semicolon));
+
+  @override
   HideCombinator visitHideCombinator(HideCombinator node) =>
       astFactory.hideCombinator(
           cloneToken(node.keyword), cloneNodeList(node.hiddenNames));
@@ -1588,6 +1608,28 @@
   }
 
   @override
+  bool visitGenericFunctionType(GenericFunctionType node) {
+    GenericFunctionType other = _other as GenericFunctionType;
+    return isEqualNodes(node.returnType, other.returnType) &&
+        isEqualTokens(node.functionKeyword, other.functionKeyword) &&
+        isEqualNodes(node.typeParameters, other.typeParameters) &&
+        isEqualNodes(node.parameters, other.parameters);
+  }
+
+  @override
+  bool visitGenericTypeAlias(GenericTypeAlias node) {
+    GenericTypeAlias other = _other as GenericTypeAlias;
+    return isEqualNodes(
+            node.documentationComment, other.documentationComment) &&
+        _isEqualNodeLists(node.metadata, other.metadata) &&
+        isEqualTokens(node.typedefKeyword, other.typedefKeyword) &&
+        isEqualNodes(node.name, other.name) &&
+        isEqualNodes(node.typeParameters, other.typeParameters) &&
+        isEqualTokens(node.equals, other.equals) &&
+        isEqualNodes(node.functionType, other.functionType);
+  }
+
+  @override
   bool visitHideCombinator(HideCombinator node) {
     HideCombinator other = _other as HideCombinator;
     return isEqualTokens(node.keyword, other.keyword) &&
@@ -3260,6 +3302,26 @@
           _cloneNode(node.parameters));
 
   @override
+  AstNode visitGenericFunctionType(GenericFunctionType node) =>
+      astFactory.genericFunctionType(
+          _cloneNode(node.returnType),
+          _mapToken(node.functionKeyword),
+          _cloneNode(node.typeParameters),
+          _cloneNode(node.parameters));
+
+  @override
+  AstNode visitGenericTypeAlias(GenericTypeAlias node) =>
+      astFactory.genericTypeAlias(
+          _cloneNode(node.documentationComment),
+          _cloneNodeList(node.metadata),
+          _mapToken(node.typedefKeyword),
+          _cloneNode(node.name),
+          _cloneNode(node.typeParameters),
+          _mapToken(node.equals),
+          _cloneNode(node.functionType),
+          _mapToken(node.semicolon));
+
+  @override
   HideCombinator visitHideCombinator(HideCombinator node) =>
       astFactory.hideCombinator(
           _mapToken(node.keyword), _cloneNodeList(node.hiddenNames));
@@ -4107,7 +4169,7 @@
       node.expression = _newNode as Expression;
       return true;
     } else if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+      node.type = _newNode as TypeAnnotation;
       return true;
     }
     return visitNode(node);
@@ -4215,7 +4277,7 @@
   @override
   bool visitCatchClause(CatchClause node) {
     if (identical(node.exceptionType, _oldNode)) {
-      node.exceptionType = _newNode as TypeName;
+      node.exceptionType = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.exceptionParameter, _oldNode)) {
       node.exceptionParameter = _newNode as SimpleIdentifier;
@@ -4393,7 +4455,7 @@
   @override
   bool visitDeclaredIdentifier(DeclaredIdentifier node) {
     if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+      node.type = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.identifier, _oldNode)) {
       node.identifier = _newNode as SimpleIdentifier;
@@ -4506,7 +4568,7 @@
   @override
   bool visitFieldFormalParameter(FieldFormalParameter node) {
     if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+      node.type = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.parameters, _oldNode)) {
       node.parameters = _newNode as FormalParameterList;
@@ -4564,7 +4626,7 @@
   @override
   bool visitFunctionDeclaration(FunctionDeclaration node) {
     if (identical(node.returnType, _oldNode)) {
-      node.returnType = _newNode as TypeName;
+      node.returnType = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.name, _oldNode)) {
       node.name = _newNode as SimpleIdentifier;
@@ -4612,7 +4674,7 @@
   @override
   bool visitFunctionTypeAlias(FunctionTypeAlias node) {
     if (identical(node.returnType, _oldNode)) {
-      node.returnType = _newNode as TypeName;
+      node.returnType = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.name, _oldNode)) {
       node.name = _newNode as SimpleIdentifier;
@@ -4630,7 +4692,7 @@
   @override
   bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     if (identical(node.returnType, _oldNode)) {
-      node.returnType = _newNode as TypeName;
+      node.returnType = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.parameters, _oldNode)) {
       node.parameters = _newNode as FormalParameterList;
@@ -4640,6 +4702,38 @@
   }
 
   @override
+  bool visitGenericFunctionType(GenericFunctionType node) {
+    if (identical(node.returnType, _oldNode)) {
+      node.returnType = _newNode as TypeAnnotation;
+      return true;
+    } else if (identical(node.typeParameters, _oldNode)) {
+      node.typeParameters = _newNode as TypeParameterList;
+      return true;
+    } else if (identical(node.parameters, _oldNode)) {
+      node.parameters = _newNode as FormalParameterList;
+      return true;
+    }
+    return null;
+  }
+
+  @override
+  bool visitGenericTypeAlias(GenericTypeAlias node) {
+    if (identical(node.name, _oldNode)) {
+      node.name = _newNode as SimpleIdentifier;
+      return true;
+    } else if (identical(node.typeParameters, _oldNode)) {
+      node.typeParameters = _newNode as TypeParameterList;
+      return true;
+    } else if (identical(node.functionType, _oldNode)) {
+      node.functionType = _newNode as GenericFunctionType;
+      return true;
+    } else if (_replaceInList(node.metadata)) {
+      return true;
+    }
+    return visitNode(node);
+  }
+
+  @override
   bool visitHideCombinator(HideCombinator node) {
     if (_replaceInList(node.hiddenNames)) {
       return true;
@@ -4724,7 +4818,7 @@
       node.expression = _newNode as Expression;
       return true;
     } else if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+      node.type = _newNode as TypeAnnotation;
       return true;
     }
     return visitNode(node);
@@ -4798,7 +4892,7 @@
   @override
   bool visitMethodDeclaration(MethodDeclaration node) {
     if (identical(node.returnType, _oldNode)) {
-      node.returnType = _newNode as TypeName;
+      node.returnType = _newNode as TypeAnnotation;
       return true;
     } else if (identical(node.name, _oldNode)) {
       node.name = _newNode as SimpleIdentifier;
@@ -4987,7 +5081,7 @@
   @override
   bool visitSimpleFormalParameter(SimpleFormalParameter node) {
     if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+      node.type = _newNode as TypeAnnotation;
       return true;
     }
     return visitNormalFormalParameter(node);
@@ -5126,7 +5220,7 @@
       node.name = _newNode as SimpleIdentifier;
       return true;
     } else if (identical(node.bound, _oldNode)) {
-      node.bound = _newNode as TypeName;
+      node.bound = _newNode as TypeAnnotation;
       return true;
     }
     return visitNode(node);
@@ -5163,7 +5257,7 @@
   @override
   bool visitVariableDeclarationList(VariableDeclarationList node) {
     if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+      node.type = _newNode as TypeAnnotation;
       return true;
     } else if (_replaceInList(node.variables)) {
       return true;
@@ -5865,6 +5959,38 @@
   }
 
   @override
+  bool visitGenericFunctionType(GenericFunctionType node) {
+    GenericFunctionType toNode = this._toNode as GenericFunctionType;
+    if (_and(
+        _isEqualNodes(node.returnType, toNode.returnType),
+        _isEqualTokens(node.functionKeyword, toNode.functionKeyword),
+        _isEqualNodes(node.typeParameters, toNode.typeParameters),
+        _isEqualNodes(node.parameters, toNode.parameters))) {
+      // TODO(brianwilkerson) Copy the type information.
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitGenericTypeAlias(GenericTypeAlias node) {
+    GenericTypeAlias toNode = this._toNode as GenericTypeAlias;
+    if (_and(
+        _isEqualNodes(node.documentationComment, toNode.documentationComment),
+        _isEqualNodeLists(node.metadata, toNode.metadata),
+        _isEqualTokens(node.typedefKeyword, toNode.typedefKeyword),
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.typeParameters, toNode.typeParameters),
+        _isEqualTokens(node.equals, toNode.equals),
+        _isEqualNodes(node.functionType, toNode.functionType),
+        _isEqualTokens(node.semicolon, toNode.semicolon))) {
+      // TODO(brianwilkerson) Copy the type and element information.
+      return true;
+    }
+    return false;
+  }
+
+  @override
   bool visitHideCombinator(HideCombinator node) {
     HideCombinator toNode = this._toNode as HideCombinator;
     return _and(_isEqualTokens(node.keyword, toNode.keyword),
@@ -7395,6 +7521,26 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) {
+    _visitNode(node.returnType);
+    _writer.print(' Function ');
+    _visitNode(node.typeParameters);
+    _visitNode(node.parameters);
+    return null;
+  }
+
+  @override
+  Object visitGenericTypeAlias(GenericTypeAlias node) {
+    _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
+    _writer.print("typedef ");
+    _visitNode(node.name);
+    _visitNode(node.typeParameters);
+    _writer.print(" = ");
+    _visitNode(node.functionType);
+    return null;
+  }
+
+  @override
   Object visitHideCombinator(HideCombinator node) {
     _writer.print("hide ");
     _visitNodeListWithSeparator(node.hiddenNames, ", ");
@@ -8682,6 +8828,26 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) {
+    safelyVisitNode(node.returnType);
+    sink.write(' Function ');
+    safelyVisitNode(node.typeParameters);
+    safelyVisitNode(node.parameters);
+    return null;
+  }
+
+  @override
+  Object visitGenericTypeAlias(GenericTypeAlias node) {
+    safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
+    sink.write("typedef ");
+    safelyVisitNode(node.name);
+    safelyVisitNode(node.typeParameters);
+    sink.write(" = ");
+    safelyVisitNode(node.functionType);
+    return null;
+  }
+
+  @override
   Object visitHideCombinator(HideCombinator node) {
     sink.write("hide ");
     safelyVisitNodeListWithSeparator(node.hiddenNames, ", ");
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 23ad1a2..4718171 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -8,6 +8,7 @@
 
 import 'package:analyzer/context/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/constant/value.dart';
@@ -29,7 +30,6 @@
 import 'package:analyzer/src/generated/utilities_collection.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
 import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 
 /**
  * Helper class encapsulating the methods for evaluating constants and
@@ -1292,8 +1292,8 @@
     }
     ParameterizedType thenType = thenResult.type;
     ParameterizedType elseType = elseResult.type;
-    return new DartObjectImpl.validWithUnknownValue(
-        _typeSystem.getLeastUpperBound(thenType, elseType) as InterfaceType);
+    return new DartObjectImpl.validWithUnknownValue(_typeSystem
+        .getLeastUpperBound(thenType, elseType) as ParameterizedType);
   }
 
   @override
@@ -1358,9 +1358,9 @@
       return null;
     }
     DartType elementType = _typeProvider.dynamicType;
-    NodeList<TypeName> typeArgs = node.typeArguments?.arguments;
+    NodeList<TypeAnnotation> typeArgs = node.typeArguments?.arguments;
     if (typeArgs?.length == 1) {
-      DartType type = visitTypeName(typeArgs[0])?.toTypeValue();
+      DartType type = visitTypeAnnotation(typeArgs[0])?.toTypeValue();
       if (type != null) {
         elementType = type;
       }
@@ -1393,13 +1393,15 @@
     }
     DartType keyType = _typeProvider.dynamicType;
     DartType valueType = _typeProvider.dynamicType;
-    NodeList<TypeName> typeArgs = node.typeArguments?.arguments;
+    NodeList<TypeAnnotation> typeArgs = node.typeArguments?.arguments;
     if (typeArgs?.length == 2) {
-      DartType keyTypeCandidate = visitTypeName(typeArgs[0])?.toTypeValue();
+      DartType keyTypeCandidate =
+          visitTypeAnnotation(typeArgs[0])?.toTypeValue();
       if (keyTypeCandidate != null) {
         keyType = keyTypeCandidate;
       }
-      DartType valueTypeCandidate = visitTypeName(typeArgs[1])?.toTypeValue();
+      DartType valueTypeCandidate =
+          visitTypeAnnotation(typeArgs[1])?.toTypeValue();
       if (valueTypeCandidate != null) {
         valueType = valueTypeCandidate;
       }
@@ -1549,8 +1551,7 @@
         _typeProvider.symbolType, new SymbolState(buffer.toString()));
   }
 
-  @override
-  DartObjectImpl visitTypeName(TypeName node) {
+  DartObjectImpl visitTypeAnnotation(TypeAnnotation node) {
     DartType type = evaluateType(node.type);
     if (type == null) {
       return super.visitTypeName(node);
@@ -1558,6 +1559,9 @@
     return typeConstant(type);
   }
 
+  @override
+  DartObjectImpl visitTypeName(TypeName node) => visitTypeAnnotation(node);
+
   /**
    * Create an error associated with the given [node]. The error will have the
    * given error [code].
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index db4de37..a927df6 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -144,9 +144,6 @@
    */
   static const List<DartObjectImpl> EMPTY_LIST = const <DartObjectImpl>[];
 
-  /**
-   * The run-time type of this object.
-   */
   @override
   final ParameterizedType type;
 
@@ -163,7 +160,7 @@
   /**
    * Create an object to represent an unknown value.
    */
-  factory DartObjectImpl.validWithUnknownValue(InterfaceType type) {
+  factory DartObjectImpl.validWithUnknownValue(ParameterizedType type) {
     if (type.element.library.isDartCore) {
       String typeName = type.name;
       if (typeName == "bool") {
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 58932c6..968c18f 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -833,11 +833,12 @@
 
   @override
   bool isSubtypeOf(DartType type) {
+    var typeSystem = new TypeSystemImpl(null);
     return relate(
-        this,
-        type,
+        typeSystem.instantiateToBounds(this),
+        typeSystem.instantiateToBounds(type),
         (DartType t, DartType s, _, __) => t.isAssignableTo(s),
-        new TypeSystemImpl(null).instantiateToBounds);
+        typeSystem.instantiateToBounds);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index 5c44f86..962e6f6 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -1575,7 +1575,7 @@
     if (invokeType is FunctionType) {
       List<TypeParameterElement> parameters = invokeType.typeFormals;
 
-      NodeList<TypeName> arguments = typeArguments?.arguments;
+      NodeList<TypeAnnotation> arguments = typeArguments?.arguments;
       if (arguments != null && arguments.length != parameters.length) {
         if (_resolver.strongMode) {
           _resolver.errorReporter.reportErrorForNode(
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 52aec1a..1b99f57 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -768,7 +768,7 @@
         methodName = identifier.name;
       }
       _enclosingFunction = functionElement;
-      TypeName returnType = node.returnType;
+      TypeAnnotation returnType = node.returnType;
       if (node.isSetter || node.isGetter) {
         _checkForMismatchedAccessorTypes(node, methodName);
         if (node.isSetter) {
@@ -862,6 +862,20 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) {
+    throw new StateError(
+        'Support for generic function types is not yet implemented');
+//    return super.visitGenericFunctionType(node);
+  }
+
+  @override
+  Object visitGenericTypeAlias(GenericTypeAlias node) {
+    throw new StateError(
+        'Support for generic type aliases is not yet implemented');
+//    return super.visitGenericTypeAlias(node);
+  }
+
+  @override
   Object visitIfStatement(IfStatement node) {
     _checkForNonBoolCondition(node.condition);
     return super.visitIfStatement(node);
@@ -931,7 +945,7 @@
     TypeArgumentList typeArguments = node.typeArguments;
     if (typeArguments != null) {
       if (!_options.strongMode && node.constKeyword != null) {
-        NodeList<TypeName> arguments = typeArguments.arguments;
+        NodeList<TypeAnnotation> arguments = typeArguments.arguments;
         if (arguments.isNotEmpty) {
           _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
               CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST);
@@ -948,7 +962,7 @@
   Object visitMapLiteral(MapLiteral node) {
     TypeArgumentList typeArguments = node.typeArguments;
     if (typeArguments != null) {
-      NodeList<TypeName> arguments = typeArguments.arguments;
+      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
       if (!_options.strongMode && arguments.isNotEmpty) {
         if (node.constKeyword != null) {
           _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
@@ -974,7 +988,7 @@
       if (identifier != null) {
         methodName = identifier.name;
       }
-      TypeName returnTypeName = node.returnType;
+      TypeAnnotation returnType = node.returnType;
       if (node.isSetter || node.isGetter) {
         _checkForMismatchedAccessorTypes(node, methodName);
       }
@@ -985,7 +999,7 @@
         _checkForInvalidModifierOnBody(
             node.body, CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER);
         _checkForWrongNumberOfParametersForSetter(node.name, node.parameters);
-        _checkForNonVoidReturnTypeForSetter(returnTypeName);
+        _checkForNonVoidReturnTypeForSetter(returnType);
         _checkForConflictingStaticSetterAndInstanceMember(node);
       } else if (node.isOperator) {
         _checkForOptionalParameterInOperator(node);
@@ -994,9 +1008,9 @@
       }
       _checkForConcreteClassWithAbstractMember(node);
       _checkForAllInvalidOverrideErrorCodesForMethod(node);
-      _checkForTypeAnnotationDeferredClass(returnTypeName);
-      _checkForIllegalReturnType(returnTypeName);
-      _checkForImplicitDynamicReturn(node.name, node.element);
+      _checkForTypeAnnotationDeferredClass(returnType);
+      _checkForIllegalReturnType(returnType);
+      _checkForImplicitDynamicReturn(node, node.element);
       _checkForMustCallSuper(node);
       return super.visitMethodDeclaration(node);
     } finally {
@@ -1187,9 +1201,9 @@
 
   @override
   Object visitTypeArgumentList(TypeArgumentList node) {
-    NodeList<TypeName> list = node.arguments;
-    for (TypeName typeName in list) {
-      _checkForTypeAnnotationDeferredClass(typeName);
+    NodeList<TypeAnnotation> list = node.arguments;
+    for (TypeAnnotation type in list) {
+      _checkForTypeAnnotationDeferredClass(type);
     }
     return super.visitTypeArgumentList(node);
   }
@@ -3220,15 +3234,16 @@
   }
 
   /**
-   * Verify that the given [typeName] does not reference any type parameters.
+   * Verify that the given [type] does not reference any type parameters.
    *
    * See [CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS].
    */
-  void _checkForConstWithTypeParameters(TypeName typeName) {
+  void _checkForConstWithTypeParameters(TypeAnnotation type) {
     // something wrong with AST
-    if (typeName == null) {
+    if (type is! TypeName) {
       return;
     }
+    TypeName typeName = type;
     Identifier name = typeName.name;
     if (name == null) {
       return;
@@ -3241,7 +3256,7 @@
     // check type arguments
     TypeArgumentList typeArguments = typeName.typeArguments;
     if (typeArguments != null) {
-      for (TypeName argument in typeArguments.arguments) {
+      for (TypeAnnotation argument in typeArguments.arguments) {
         _checkForConstWithTypeParameters(argument);
       }
     }
@@ -3806,7 +3821,7 @@
    * declared return type is assignable to Future, Stream, or Iterable,
    * respectively.  If not, report the error using [returnType].
    */
-  void _checkForIllegalReturnType(TypeName returnType) {
+  void _checkForIllegalReturnType(TypeAnnotation returnType) {
     if (returnType == null) {
       // No declared return type, so the return type must be dynamic, which is
       // assignable to everything.
@@ -3839,7 +3854,7 @@
    * the declared [returnTypeName] is assignable to the required [expectedType]
    * and if not report [errorCode].
    */
-  void _checkForIllegalReturnTypeCode(TypeName returnTypeName,
+  void _checkForIllegalReturnTypeCode(TypeAnnotation returnTypeName,
       DartType expectedType, StaticTypeWarningCode errorCode) {
     DartType returnType = _enclosingFunction.returnType;
     if (_options.strongMode) {
@@ -3986,10 +4001,10 @@
     }
   }
 
-  void _checkForImplicitDynamicType(TypeName node) {
+  void _checkForImplicitDynamicType(TypeAnnotation node) {
     if (_options.implicitDynamic ||
         node == null ||
-        node.typeArguments != null) {
+        (node is TypeName && node.typeArguments != null)) {
       return;
     }
     DartType type = node.type;
@@ -4457,10 +4472,10 @@
    * [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP].
    */
   void _checkForInvalidTypeArgumentInConstTypedLiteral(
-      NodeList<TypeName> arguments, ErrorCode errorCode) {
-    for (TypeName typeName in arguments) {
-      if (typeName.type is TypeParameterType) {
-        _errorReporter.reportErrorForNode(errorCode, typeName, [typeName.name]);
+      NodeList<TypeAnnotation> arguments, ErrorCode errorCode) {
+    for (TypeAnnotation type in arguments) {
+      if (type is TypeName && type.type is TypeParameterType) {
+        _errorReporter.reportErrorForNode(errorCode, type, [type.name]);
       }
     }
   }
@@ -5141,12 +5156,12 @@
       return;
     }
     // check return type
-    TypeName typeName = declaration.returnType;
-    if (typeName != null) {
-      DartType type = typeName.type;
+    TypeAnnotation annotation = declaration.returnType;
+    if (annotation != null) {
+      DartType type = annotation.type;
       if (type != null && !type.isVoid) {
         _errorReporter.reportErrorForNode(
-            StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, typeName);
+            StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, annotation);
       }
     }
   }
@@ -5157,7 +5172,7 @@
    *
    * See [StaticWarningCode.NON_VOID_RETURN_FOR_SETTER].
    */
-  void _checkForNonVoidReturnTypeForSetter(TypeName typeName) {
+  void _checkForNonVoidReturnTypeForSetter(TypeAnnotation typeName) {
     if (typeName != null) {
       DartType type = typeName.type;
       if (type != null && !type.isVoid) {
@@ -5579,10 +5594,10 @@
    *
    * See [StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS].
    */
-  void _checkForTypeAnnotationDeferredClass(TypeName name) {
-    if (name != null && name.isDeferred) {
+  void _checkForTypeAnnotationDeferredClass(TypeAnnotation type) {
+    if (type is TypeName && type.isDeferred) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, name, [name.name]);
+          StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, type, [type.name]);
     }
   }
 
@@ -5592,19 +5607,18 @@
    *
    * See [StaticWarningCode.TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER].
    */
-  void _checkForTypeAnnotationGenericFunctionParameter(TypeName typeName) {
-    if (typeName == null) {
-      return;
-    }
-    Identifier name = typeName.name;
-    if (name is SimpleIdentifier) {
-      Element element = name.staticElement;
-      if (element is TypeParameterElement &&
-          element.enclosingElement is ExecutableElement) {
-        _errorReporter.reportErrorForNode(
-            StaticWarningCode.TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER,
-            name,
-            [name.name]);
+  void _checkForTypeAnnotationGenericFunctionParameter(TypeAnnotation type) {
+    if (type is TypeName) {
+      Identifier name = type.name;
+      if (name is SimpleIdentifier) {
+        Element element = name.staticElement;
+        if (element is TypeParameterElement &&
+            element.enclosingElement is ExecutableElement) {
+          _errorReporter.reportErrorForNode(
+              StaticWarningCode.TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER,
+              name,
+              [name.name]);
+        }
       }
     }
   }
@@ -5631,14 +5645,14 @@
       List<DartType> parameterTypes = element.type.typeArguments;
       List<DartType> arguments = (type as ParameterizedType).typeArguments;
       // iterate over each bounded type parameter and corresponding argument
-      NodeList<TypeName> typeNameArgList = typeName.typeArguments.arguments;
+      NodeList<TypeAnnotation> argumentNodes = typeName.typeArguments.arguments;
       int loopThroughIndex =
-          math.min(typeNameArgList.length, parameterElements.length);
+          math.min(argumentNodes.length, parameterElements.length);
       bool shouldSubstitute =
           arguments.length != 0 && arguments.length == parameterTypes.length;
       for (int i = 0; i < loopThroughIndex; i++) {
-        TypeName argTypeName = typeNameArgList[i];
-        DartType argType = argTypeName.type;
+        TypeAnnotation argumentNode = argumentNodes[i];
+        DartType argType = argumentNode.type;
         DartType boundType = parameterElements[i].bound;
         if (argType != null && boundType != null) {
           if (shouldSubstitute) {
@@ -5654,7 +5668,7 @@
                   StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS;
             }
             _errorReporter.reportTypeErrorForNode(
-                errorCode, argTypeName, [argType, boundType]);
+                errorCode, argumentNode, [argType, boundType]);
           }
         }
       }
@@ -5864,12 +5878,11 @@
    * See [StaticWarningCode.VOID_RETURN_FOR_GETTER].
    */
   void _checkForVoidReturnType(MethodDeclaration getter) {
-    TypeName returnType = getter.returnType;
-    if (returnType == null || returnType.name.name != "void") {
-      return;
+    TypeAnnotation returnType = getter.returnType;
+    if (returnType is TypeName && returnType.name.name == "void") {
+      _errorReporter.reportErrorForNode(
+          StaticWarningCode.VOID_RETURN_FOR_GETTER, returnType);
     }
-    _errorReporter.reportErrorForNode(
-        StaticWarningCode.VOID_RETURN_FOR_GETTER, returnType);
   }
 
   /**
@@ -6077,8 +6090,8 @@
     if (element == null || typeArguments == null) {
       return;
     }
-    void reportError(
-        TypeName argument, DartType argumentType, DartType parameterType) {
+    void reportError(TypeAnnotation argument, DartType argumentType,
+        DartType parameterType) {
       _errorReporter.reportTypeErrorForNode(
           StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
           argument,
@@ -6102,16 +6115,16 @@
       List<TypeParameterElement> typeParameters,
       TypeArgumentList typeArgumentList,
       DartType targetType,
-      void reportError(
-          TypeName argument, DartType argumentType, DartType parameterType)) {
-    NodeList<TypeName> typeArguments = typeArgumentList.arguments;
+      void reportError(TypeAnnotation argument, DartType argumentType,
+          DartType parameterType)) {
+    NodeList<TypeAnnotation> typeArguments = typeArgumentList.arguments;
     int argumentsLength = typeArguments.length;
     int maxIndex = math.min(typeParameters.length, argumentsLength);
 
     bool shouldSubstitute =
         argumentsLength != 0 && argumentsLength == typeParameters.length;
     List<DartType> argumentTypes = shouldSubstitute
-        ? typeArguments.map((TypeName typeName) => typeName.type).toList()
+        ? typeArguments.map((TypeAnnotation type) => type.type).toList()
         : null;
     List<DartType> parameterTypes = shouldSubstitute
         ? typeParameters
@@ -6120,8 +6133,8 @@
         : null;
     List<DartType> targetTypeParameterTypes = null;
     for (int i = 0; i < maxIndex; i++) {
-      TypeName argTypeName = typeArguments[i];
-      DartType argType = argTypeName.type;
+      TypeAnnotation argument = typeArguments[i];
+      DartType argType = argument.type;
       DartType boundType = typeParameters[i].bound;
       if (argType != null && boundType != null) {
         if (targetType is ParameterizedType) {
@@ -6137,7 +6150,7 @@
           boundType = boundType.substitute2(argumentTypes, parameterTypes);
         }
         if (!_typeSystem.isSubtypeOf(argType, boundType)) {
-          reportError(argTypeName, argType, boundType);
+          reportError(argument, argType, boundType);
         }
       }
     }
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 2e1b856..6e3ecfc 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -372,13 +372,13 @@
    */
   bool _checkAllTypeChecks(IsExpression node) {
     Expression expression = node.expression;
-    TypeName typeName = node.type;
+    TypeAnnotation typeName = node.type;
     DartType lhsType = expression.staticType;
     DartType rhsType = typeName.type;
     if (lhsType == null || rhsType == null) {
       return false;
     }
-    String rhsNameStr = typeName.name.name;
+    String rhsNameStr = typeName is TypeName ? typeName.name.name : null;
     // if x is dynamic
     if (rhsType.isDynamic && rhsNameStr == Keyword.DYNAMIC.syntax) {
       if (node.notOperator == null) {
@@ -884,7 +884,7 @@
    * @return `true` if and only if a hint code is generated on the passed node
    * See [HintCode.MISSING_RETURN].
    */
-  void _checkForMissingReturn(TypeName returnType, FunctionBody body) {
+  void _checkForMissingReturn(TypeAnnotation returnType, FunctionBody body) {
     // Check that the method or function has a return type, and a function body
     if (returnType == null || body == null) {
       return;
@@ -1847,8 +1847,7 @@
    * [HintCode.IS_NOT_INT].
    */
   bool _checkForIsDoubleHints(IsExpression node) {
-    TypeName typeName = node.type;
-    DartType type = typeName.type;
+    DartType type = node.type.type;
     Element element = type?.element;
     if (element != null) {
       String typeNameStr = element.name;
@@ -3020,6 +3019,9 @@
   }
 
   @override
+  bool visitGenericFunctionType(GenericFunctionType node) => false;
+
+  @override
   bool visitIdentifier(Identifier node) => false;
 
   @override
@@ -6092,6 +6094,9 @@
   }
 
   @override
+  Object visitGenericFunctionType(GenericFunctionType node) => null;
+
+  @override
   Object visitHideCombinator(HideCombinator node) => null;
 
   @override
@@ -8025,7 +8030,7 @@
 }
 
 /**
- * Helper for resolving [TypeName]s.
+ * Helper for resolving types.
  *
  * The client must set [nameScope] before calling [resolveTypeName].
  */
@@ -8304,15 +8309,14 @@
       return;
     }
     if (argumentList != null) {
-      NodeList<TypeName> arguments = argumentList.arguments;
+      NodeList<TypeAnnotation> arguments = argumentList.arguments;
       int argumentCount = arguments.length;
       List<DartType> parameters = typeSystem.typeFormalsAsTypes(type);
       int parameterCount = parameters.length;
       List<DartType> typeArguments = new List<DartType>(parameterCount);
       if (argumentCount == parameterCount) {
         for (int i = 0; i < parameterCount; i++) {
-          TypeName argumentTypeName = arguments[i];
-          DartType argumentType = _getType(argumentTypeName);
+          DartType argumentType = _getType(arguments[i]);
           if (argumentType == null) {
             argumentType = dynamicType;
           }
@@ -8334,16 +8338,12 @@
   }
 
   /**
-   * The number of type arguments in the given type name does not match the number of parameters in
-   * the corresponding class element. Return the error code that should be used to report this
-   * error.
-   *
-   * @param node the type name with the wrong number of type arguments
-   * @return the error code that should be used to report that the wrong number of type arguments
-   *         were provided
+   * The number of type arguments in the given [typeName] does not match the
+   * number of parameters in the corresponding class element. Return the error
+   * code that should be used to report this error.
    */
-  ErrorCode _getInvalidTypeParametersErrorCode(TypeName node) {
-    AstNode parent = node.parent;
+  ErrorCode _getInvalidTypeParametersErrorCode(TypeName typeName) {
+    AstNode parent = typeName.parent;
     if (parent is ConstructorName) {
       parent = parent.parent;
       if (parent is InstanceCreationExpression) {
@@ -8358,11 +8358,7 @@
   }
 
   /**
-   * Checks if the given type name is the target in a redirected constructor.
-   *
-   * @param typeName the type name to analyze
-   * @return some [RedirectingConstructorKind] if the given type name is used as the type in a
-   *         redirected constructor, or `null` otherwise
+   * Checks if the given [typeName] is the target in a redirected constructor.
    */
   RedirectingConstructorKind _getRedirectingConstructorKind(TypeName typeName) {
     AstNode parent = typeName.parent;
@@ -8381,13 +8377,10 @@
   }
 
   /**
-   * Return the type represented by the given type name.
-   *
-   * @param typeName the type name representing the type to be returned
-   * @return the type represented by the type name
+   * Return the type represented by the given type [annotation].
    */
-  DartType _getType(TypeName typeName) {
-    DartType type = typeName.type;
+  DartType _getType(TypeAnnotation annotation) {
+    DartType type = annotation.type;
     if (type == null) {
       return undefinedType;
     }
@@ -8431,10 +8424,7 @@
   }
 
   /**
-   * Checks if the given type name is used as the type in an as expression.
-   *
-   * @param typeName the type name to analyzer
-   * @return `true` if the given type name is used as the type in an as expression
+   * Checks if the given [typeName] is used as the type in an as expression.
    */
   bool _isTypeNameInAsExpression(TypeName typeName) {
     AstNode parent = typeName.parent;
@@ -8445,10 +8435,8 @@
   }
 
   /**
-   * Checks if the given type name is used as the exception type in a catch clause.
-   *
-   * @param typeName the type name to analyzer
-   * @return `true` if the given type name is used as the exception type in a catch clause
+   * Checks if the given [typeName] is used as the exception type in a catch
+   * clause.
    */
   bool _isTypeNameInCatchClause(TypeName typeName) {
     AstNode parent = typeName.parent;
@@ -8459,11 +8447,8 @@
   }
 
   /**
-   * Checks if the given type name is used as the type in an instance creation expression.
-   *
-   * @param typeName the type name to analyzer
-   * @return `true` if the given type name is used as the type in an instance creation
-   *         expression
+   * Checks if the given [typeName] is used as the type in an instance creation
+   * expression.
    */
   bool _isTypeNameInInstanceCreationExpression(TypeName typeName) {
     AstNode parent = typeName.parent;
@@ -8475,10 +8460,7 @@
   }
 
   /**
-   * Checks if the given type name is used as the type in an is expression.
-   *
-   * @param typeName the type name to analyzer
-   * @return `true` if the given type name is used as the type in an is expression
+   * Checks if the given [typeName] is used as the type in an is expression.
    */
   bool _isTypeNameInIsExpression(TypeName typeName) {
     AstNode parent = typeName.parent;
@@ -8489,10 +8471,7 @@
   }
 
   /**
-   * Checks if the given type name used in a type argument list.
-   *
-   * @param typeName the type name to analyzer
-   * @return `true` if the given type name is in a type argument list
+   * Checks if the given [typeName] used in a type argument list.
    */
   bool _isTypeNameInTypeArgumentList(TypeName typeName) =>
       typeName.parent is TypeArgumentList;
@@ -8515,24 +8494,24 @@
   }
 
   /**
-   * @return `true` if the name of the given [TypeName] is an built-in identifier.
+   * Return `true` if the name of the given [typeName] is an built-in identifier.
    */
-  static bool _isBuiltInIdentifier(TypeName node) {
-    Token token = node.name.beginToken;
+  static bool _isBuiltInIdentifier(TypeName typeName) {
+    Token token = typeName.name.beginToken;
     return token.type == TokenType.KEYWORD;
   }
 
   /**
-   * @return `true` if given [TypeName] is used as a type annotation.
+   * @return `true` if given [typeName] is used as a type annotation.
    */
-  static bool _isTypeAnnotation(TypeName node) {
-    AstNode parent = node.parent;
+  static bool _isTypeAnnotation(TypeName typeName) {
+    AstNode parent = typeName.parent;
     if (parent is VariableDeclarationList) {
-      return identical(parent.type, node);
+      return identical(parent.type, typeName);
     } else if (parent is FieldFormalParameter) {
-      return identical(parent.type, node);
+      return identical(parent.type, typeName);
     } else if (parent is SimpleFormalParameter) {
-      return identical(parent.type, node);
+      return identical(parent.type, typeName);
     }
     return false;
   }
@@ -8800,10 +8779,15 @@
     }
   }
 
-  void _resolveTypeName(TypeName typeName) {
-    typeName.typeArguments?.arguments?.forEach(_resolveTypeName);
-    typeNameResolver.resolveTypeName(typeName);
-    // TODO(scheglov) report error when don't apply type bounds for type bounds
+  void _resolveTypeName(TypeAnnotation type) {
+    if (type is TypeName) {
+      type.typeArguments?.arguments?.forEach(_resolveTypeName);
+      typeNameResolver.resolveTypeName(type);
+      // TODO(scheglov) report error when don't apply type bounds for type bounds
+    } else {
+      // TODO(brianwilkerson) Add resolution of GenericFunctionType
+      throw new ArgumentError('Cannot resolve a ${type.runtimeType}');
+    }
   }
 
   void _resolveTypeParameters(
@@ -8811,13 +8795,19 @@
     if (typeParameters != null) {
       Scope typeParametersScope = null;
       for (TypeParameter typeParameter in typeParameters.typeParameters) {
-        TypeName bound = typeParameter.bound;
+        TypeAnnotation bound = typeParameter.bound;
         if (bound != null) {
           Element typeParameterElement = typeParameter.name.staticElement;
           if (typeParameterElement is TypeParameterElementImpl) {
             if (LibraryElementImpl.hasResolutionCapability(
                 library, LibraryResolutionCapability.resolvedTypeNames)) {
-              bound.type = typeParameterElement.bound;
+              if (bound is TypeName) {
+                bound.type = typeParameterElement.bound;
+              } else {
+                // TODO(brianwilkerson) Add resolution of GenericFunctionType
+                throw new ArgumentError(
+                    'Cannot resolve a ${bound.runtimeType}');
+              }
             } else {
               libraryScope ??= new LibraryScope(library);
               typeParametersScope ??= createTypeParametersScope();
@@ -9495,7 +9485,7 @@
   TypeSystem _typeSystem;
 
   /**
-   * The helper to resolve [TypeName]s.
+   * The helper to resolve types.
    */
   TypeNameResolver _typeNameResolver;
 
@@ -9577,7 +9567,7 @@
       // If an 'on' clause is provided the type of the exception parameter is
       // the type in the 'on' clause. Otherwise, the type of the exception
       // parameter is 'Object'.
-      TypeName exceptionTypeName = node.exceptionType;
+      TypeAnnotation exceptionTypeName = node.exceptionType;
       DartType exceptionType;
       if (exceptionTypeName == null) {
         exceptionType = typeProvider.dynamicType;
@@ -9716,7 +9706,7 @@
   Object visitDeclaredIdentifier(DeclaredIdentifier node) {
     super.visitDeclaredIdentifier(node);
     DartType declaredType;
-    TypeName typeName = node.type;
+    TypeAnnotation typeName = node.type;
     if (typeName == null) {
       declaredType = _dynamicType;
     } else {
@@ -9735,7 +9725,7 @@
       FormalParameterList parameterList = node.parameters;
       if (parameterList == null) {
         DartType type;
-        TypeName typeName = node.type;
+        TypeAnnotation typeName = node.type;
         if (typeName == null) {
           element.hasImplicitType = true;
           if (element is FieldFormalParameterElement) {
@@ -9958,7 +9948,7 @@
   Object visitSimpleFormalParameter(SimpleFormalParameter node) {
     super.visitSimpleFormalParameter(node);
     DartType declaredType;
-    TypeName typeName = node.type;
+    TypeAnnotation typeName = node.type;
     if (typeName == null) {
       declaredType = _dynamicType;
     } else {
@@ -9997,7 +9987,7 @@
       // Bounds of parameters of classes and function type aliases are
       // already resolved.
     } else {
-      TypeName bound = node.bound;
+      TypeAnnotation bound = node.bound;
       if (bound != null) {
         TypeParameterElementImpl typeParameter =
             node.name.staticElement as TypeParameterElementImpl;
@@ -10022,7 +10012,7 @@
     }
     // Resolve the type.
     DartType declaredType;
-    TypeName typeName = variableList.type;
+    TypeAnnotation typeName = variableList.type;
     if (typeName == null) {
       declaredType = _dynamicType;
     } else {
@@ -10036,13 +10026,10 @@
   }
 
   /**
-   * Given a type name representing the return type of a function, compute the return type of the
+   * Given the [returnType] of a function, compute the return type of the
    * function.
-   *
-   * @param returnType the type name representing the return type of the function
-   * @return the return type that was computed
    */
-  DartType _computeReturnType(TypeName returnType) {
+  DartType _computeReturnType(TypeAnnotation returnType) {
     if (returnType == null) {
       return _dynamicType;
     } else {
@@ -10124,13 +10111,8 @@
   }
 
   /**
-   * Resolve the types in the given with and implements clauses and associate those types with the
-   * given class element.
-   *
-   * @param classElement the class element with which the mixin and interface types are to be
-   *          associated
-   * @param withClause the with clause to be resolved
-   * @param implementsClause the implements clause to be resolved
+   * Resolve the types in the given [withClause] and [implementsClause] and
+   * associate those types with the given [classElement].
    */
   void _resolve(ClassElementImpl classElement, WithClause withClause,
       ImplementsClause implementsClause) {
@@ -10239,15 +10221,12 @@
   }
 
   /**
-   * Given a parameter element, create a function type based on the given return type and parameter
-   * list and associate the created type with the element.
-   *
-   * @param element the parameter element whose type is to be set
-   * @param returnType the (possibly `null`) return type of the function
-   * @param parameterList the list of parameters to the function
+   * Given a parameter [element], create a function type based on the given
+   * [returnType] and [parameterList] and associate the created type with the
+   * element.
    */
   void _setFunctionTypedParameterType(ParameterElementImpl element,
-      TypeName returnType, FormalParameterList parameterList) {
+      TypeAnnotation returnType, FormalParameterList parameterList) {
     List<ParameterElement> parameters = _getElements(parameterList);
     FunctionElementImpl functionElement = new FunctionElementImpl.forNode(null);
     functionElement.isSynthetic = true;
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 63b7b54..b3ec3eb 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -607,10 +607,9 @@
     // If we have explicit arguments, use them
     if (typeArguments != null) {
       DartType staticType = _dynamicType;
-      NodeList<TypeName> arguments = typeArguments.arguments;
+      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
       if (arguments != null && arguments.length == 1) {
-        TypeName argumentTypeName = arguments[0];
-        DartType argumentType = _getType(argumentTypeName);
+        DartType argumentType = _getType(arguments[0]);
         if (argumentType != null) {
           staticType = argumentType;
         }
@@ -684,15 +683,13 @@
     if (typeArguments != null) {
       DartType staticKeyType = _dynamicType;
       DartType staticValueType = _dynamicType;
-      NodeList<TypeName> arguments = typeArguments.arguments;
+      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
       if (arguments != null && arguments.length == 2) {
-        TypeName entryKeyTypeName = arguments[0];
-        DartType entryKeyType = _getType(entryKeyTypeName);
+        DartType entryKeyType = _getType(arguments[0]);
         if (entryKeyType != null) {
           staticKeyType = entryKeyType;
         }
-        TypeName entryValueTypeName = arguments[1];
-        DartType entryValueType = _getType(entryValueTypeName);
+        DartType entryValueType = _getType(arguments[1]);
         if (entryValueType != null) {
           staticValueType = entryValueType;
         }
@@ -1073,10 +1070,8 @@
     } else if (staticElement is VariableElement) {
       staticType = staticElement.type;
     }
-    if (_strongMode) {
-      staticType = _inferGenericInstantiationFromContext(
-          InferenceContext.getType(node), staticType);
-    }
+    staticType = _inferGenericInstantiationFromContext(node, staticType);
+
     if (!(_strongMode &&
         _inferObjectAccess(node, staticType, prefixedIdentifier))) {
       _recordStaticType(prefixedIdentifier, staticType);
@@ -1206,10 +1201,8 @@
     } else {
       // TODO(brianwilkerson) Report this internal error.
     }
-    if (_strongMode) {
-      staticType = _inferGenericInstantiationFromContext(
-          InferenceContext.getType(node), staticType);
-    }
+    staticType = _inferGenericInstantiationFromContext(node, staticType);
+
     if (!(_strongMode && _inferObjectAccess(node, staticType, propertyName))) {
       _recordStaticType(propertyName, staticType);
       _recordStaticType(node, staticType);
@@ -1310,10 +1303,8 @@
     } else {
       staticType = _dynamicType;
     }
-    if (_strongMode) {
-      staticType = _inferGenericInstantiationFromContext(
-          InferenceContext.getType(node), staticType);
-    }
+    staticType = _inferGenericInstantiationFromContext(node, staticType);
+
     _recordStaticType(node, staticType);
     // TODO(brianwilkerson) I think we want to repeat the logic above using the
     // propagated element to get another candidate for the propagated type.
@@ -1571,7 +1562,7 @@
    */
   DartType _computeStaticReturnTypeOfFunctionDeclaration(
       FunctionDeclaration node) {
-    TypeName returnType = node.returnType;
+    TypeAnnotation returnType = node.returnType;
     if (returnType == null) {
       return _dynamicType;
     }
@@ -1828,13 +1819,10 @@
   }
 
   /**
-   * Return the type represented by the given type name.
-   *
-   * @param typeName the type name representing the type to be returned
-   * @return the type represented by the type name
+   * Return the type represented by the given type [annotation].
    */
-  DartType _getType(TypeName typeName) {
-    DartType type = typeName.type;
+  DartType _getType(TypeAnnotation annotation) {
+    DartType type = annotation.type;
     if (type == null) {
       //TODO(brianwilkerson) Determine the conditions for which the type is
       // null.
@@ -1906,13 +1894,19 @@
    * Given an uninstantiated generic function type, try to infer the
    * instantiated generic function type from the surrounding context.
    */
-  DartType _inferGenericInstantiationFromContext(
-      DartType context, DartType type) {
-    TypeSystem ts = _typeSystem;
-    if (context is FunctionType &&
-        type is FunctionType &&
-        ts is StrongTypeSystemImpl) {
-      return ts.inferFunctionTypeInstantiation(context, type);
+  DartType _inferGenericInstantiationFromContext(AstNode node, DartType type) {
+    if (_strongMode) {
+      TypeSystem ts = _typeSystem;
+      DartType context = InferenceContext.getType(node);
+      if (context is FunctionType &&
+          type is FunctionType &&
+          ts is StrongTypeSystemImpl) {
+        return ts.inferFunctionTypeInstantiation(context, type);
+      }
+    } else if (type is FunctionType) {
+      // In Dart 1 mode we want to implicitly instantiate generic functions to
+      // their bounds always, so we don't get a universal function type.
+      return _typeSystem.instantiateToBounds(type);
     }
     return type;
   }
@@ -2253,10 +2247,7 @@
       library != null && "dart.dom.html" == library.name;
 
   /**
-   * Return `true` if the given node is not a type literal.
-   *
-   * @param node the node being tested
-   * @return `true` if the given node is not a type literal
+   * Return `true` if the given [node] is not a type literal.
    */
   bool _isNotTypeLiteral(Identifier node) {
     AstNode parent = node.parent;
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
index 724a24b..826ee7d 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -45,7 +45,8 @@
       astFactory.argumentList(TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
           arguments, TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
 
-  static AsExpression asExpression(Expression expression, TypeName type) =>
+  static AsExpression asExpression(
+          Expression expression, TypeAnnotation type) =>
       astFactory.asExpression(
           expression, TokenFactory.tokenFromKeyword(Keyword.AS), type);
 
@@ -158,16 +159,16 @@
           [List<Statement> statements]) =>
       catchClause5(null, exceptionParameter, stackTraceParameter, statements);
 
-  static CatchClause catchClause3(TypeName exceptionType,
+  static CatchClause catchClause3(TypeAnnotation exceptionType,
           [List<Statement> statements]) =>
       catchClause5(exceptionType, null, null, statements);
 
   static CatchClause catchClause4(
-          TypeName exceptionType, String exceptionParameter,
+          TypeAnnotation exceptionType, String exceptionParameter,
           [List<Statement> statements]) =>
       catchClause5(exceptionType, exceptionParameter, null, statements);
 
-  static CatchClause catchClause5(TypeName exceptionType,
+  static CatchClause catchClause5(TypeAnnotation exceptionType,
           String exceptionParameter, String stackTraceParameter,
           [List<Statement> statements]) =>
       astFactory.catchClause(
@@ -367,7 +368,7 @@
       declaredIdentifier2(keyword, null, identifier);
 
   static DeclaredIdentifier declaredIdentifier2(
-          Keyword keyword, TypeName type, String identifier) =>
+          Keyword keyword, TypeAnnotation type, String identifier) =>
       astFactory.declaredIdentifier(
           null,
           null,
@@ -379,7 +380,7 @@
       declaredIdentifier2(Keyword.VAR, null, identifier);
 
   static DeclaredIdentifier declaredIdentifier4(
-          TypeName type, String identifier) =>
+          TypeAnnotation type, String identifier) =>
       declaredIdentifier2(null, type, identifier);
 
   static Comment documentationComment(
@@ -459,7 +460,7 @@
       TokenFactory.tokenFromKeyword(Keyword.EXTENDS), type);
 
   static FieldDeclaration fieldDeclaration(bool isStatic, Keyword keyword,
-          TypeName type, List<VariableDeclaration> variables) =>
+          TypeAnnotation type, List<VariableDeclaration> variables) =>
       astFactory.fieldDeclaration(
           null,
           null,
@@ -472,7 +473,7 @@
       fieldDeclaration(isStatic, keyword, null, variables);
 
   static FieldFormalParameter fieldFormalParameter(
-          Keyword keyword, TypeName type, String identifier,
+          Keyword keyword, TypeAnnotation type, String identifier,
           [FormalParameterList parameterList]) =>
       astFactory.fieldFormalParameter(
           null,
@@ -549,8 +550,11 @@
           TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
           body);
 
-  static FunctionDeclaration functionDeclaration(TypeName type, Keyword keyword,
-          String name, FunctionExpression functionExpression) =>
+  static FunctionDeclaration functionDeclaration(
+          TypeAnnotation type,
+          Keyword keyword,
+          String name,
+          FunctionExpression functionExpression) =>
       astFactory.functionDeclaration(
           null,
           null,
@@ -561,7 +565,7 @@
           functionExpression);
 
   static FunctionDeclarationStatement functionDeclarationStatement(
-          TypeName type,
+          TypeAnnotation type,
           Keyword keyword,
           String name,
           FunctionExpression functionExpression) =>
@@ -594,7 +598,7 @@
           function, typeArguments, argumentList(arguments));
 
   static FunctionTypedFormalParameter functionTypedFormalParameter(
-          TypeName returnType, String identifier,
+          TypeAnnotation returnType, String identifier,
           [List<FormalParameter> parameters]) =>
       astFactory.functionTypedFormalParameter(null, null, returnType,
           identifier3(identifier), null, formalParameterList(parameters));
@@ -737,7 +741,7 @@
           TokenFactory.tokenFromString(contents), value);
 
   static IsExpression isExpression(
-          Expression expression, bool negated, TypeName type) =>
+          Expression expression, bool negated, TypeAnnotation type) =>
       astFactory.isExpression(
           expression,
           TokenFactory.tokenFromKeyword(Keyword.IS),
@@ -813,7 +817,7 @@
 
   static MethodDeclaration methodDeclaration(
           Keyword modifier,
-          TypeName returnType,
+          TypeAnnotation returnType,
           Keyword property,
           Keyword operator,
           SimpleIdentifier name,
@@ -833,7 +837,7 @@
 
   static MethodDeclaration methodDeclaration2(
           Keyword modifier,
-          TypeName returnType,
+          TypeAnnotation returnType,
           Keyword property,
           Keyword operator,
           SimpleIdentifier name,
@@ -854,7 +858,7 @@
 
   static MethodDeclaration methodDeclaration3(
           Keyword modifier,
-          TypeName returnType,
+          TypeAnnotation returnType,
           Keyword property,
           Keyword operator,
           SimpleIdentifier name,
@@ -877,7 +881,7 @@
   static MethodDeclaration methodDeclaration4(
           {bool external: false,
           Keyword modifier,
-          TypeName returnType,
+          TypeAnnotation returnType,
           Keyword property,
           bool operator: false,
           String name,
@@ -1051,7 +1055,7 @@
       simpleFormalParameter2(keyword, null, parameterName);
 
   static SimpleFormalParameter simpleFormalParameter2(
-          Keyword keyword, TypeName type, String parameterName) =>
+          Keyword keyword, TypeAnnotation type, String parameterName) =>
       astFactory.simpleFormalParameter(
           null,
           null,
@@ -1063,7 +1067,7 @@
       simpleFormalParameter2(null, null, parameterName);
 
   static SimpleFormalParameter simpleFormalParameter4(
-          TypeName type, String parameterName) =>
+          TypeAnnotation type, String parameterName) =>
       simpleFormalParameter2(null, type, parameterName);
 
   static StringInterpolation string([List<InterpolationElement> elements]) =>
@@ -1153,7 +1157,7 @@
 
   static TopLevelVariableDeclaration topLevelVariableDeclaration(
           Keyword keyword,
-          TypeName type,
+          TypeAnnotation type,
           List<VariableDeclaration> variables) =>
       astFactory.topLevelVariableDeclaration(
           null,
@@ -1187,7 +1191,7 @@
               : TokenFactory.tokenFromKeyword(Keyword.FINALLY),
           finallyClause);
 
-  static FunctionTypeAlias typeAlias(TypeName returnType, String name,
+  static FunctionTypeAlias typeAlias(TypeAnnotation returnType, String name,
           TypeParameterList typeParameters, FormalParameterList parameters) =>
       astFactory.functionTypeAlias(
           null,
@@ -1199,12 +1203,12 @@
           parameters,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
-  static TypeArgumentList typeArgumentList(List<TypeName> typeNames) {
-    if (typeNames == null || typeNames.length == 0) {
+  static TypeArgumentList typeArgumentList(List<TypeAnnotation> types) {
+    if (types == null || types.length == 0) {
       return null;
     }
     return astFactory.typeArgumentList(TokenFactory.tokenFromType(TokenType.LT),
-        typeNames, TokenFactory.tokenFromType(TokenType.GT));
+        types, TokenFactory.tokenFromType(TokenType.GT));
   }
 
   /**
@@ -1214,7 +1218,8 @@
    * <b>Note:</b> This method does not correctly handle class elements that have
    * type parameters.
    */
-  static TypeName typeName(ClassElement element, [List<TypeName> arguments]) {
+  static TypeName typeName(ClassElement element,
+      [List<TypeAnnotation> arguments]) {
     SimpleIdentifier name = identifier3(element.name);
     name.staticElement = element;
     TypeName typeName = typeName3(name, arguments);
@@ -1222,16 +1227,17 @@
     return typeName;
   }
 
-  static TypeName typeName3(Identifier name, [List<TypeName> arguments]) =>
+  static TypeName typeName3(Identifier name,
+          [List<TypeAnnotation> arguments]) =>
       astFactory.typeName(name, typeArgumentList(arguments));
 
-  static TypeName typeName4(String name, [List<TypeName> arguments]) =>
+  static TypeName typeName4(String name, [List<TypeAnnotation> arguments]) =>
       astFactory.typeName(identifier3(name), typeArgumentList(arguments));
 
   static TypeParameter typeParameter(String name) =>
       astFactory.typeParameter(null, null, identifier3(name), null, null);
 
-  static TypeParameter typeParameter2(String name, TypeName bound) =>
+  static TypeParameter typeParameter2(String name, TypeAnnotation bound) =>
       astFactory.typeParameter(null, null, identifier3(name),
           TokenFactory.tokenFromKeyword(Keyword.EXTENDS), bound);
 
@@ -1258,7 +1264,7 @@
           TokenFactory.tokenFromType(TokenType.EQ), initializer);
 
   static VariableDeclarationList variableDeclarationList(Keyword keyword,
-          TypeName type, List<VariableDeclaration> variables) =>
+          TypeAnnotation type, List<VariableDeclaration> variables) =>
       astFactory.variableDeclarationList(
           null,
           null,
@@ -1272,7 +1278,7 @@
 
   static VariableDeclarationStatement variableDeclarationStatement(
           Keyword keyword,
-          TypeName type,
+          TypeAnnotation type,
           List<VariableDeclaration> variables) =>
       astFactory.variableDeclarationStatement(
           variableDeclarationList(keyword, type, variables),
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 69298a5..73f6b8a 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -477,17 +477,18 @@
           _pushList(null);
           break;
         case UnlinkedExprOperation.makeTypedList:
-          TypeName itemType = _newTypeName();
-          _pushList(AstTestFactory.typeArgumentList(<TypeName>[itemType]));
+          TypeAnnotation itemType = _newTypeName();
+          _pushList(
+              AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
           break;
         case UnlinkedExprOperation.makeUntypedMap:
           _pushMap(null);
           break;
         case UnlinkedExprOperation.makeTypedMap:
-          TypeName keyType = _newTypeName();
-          TypeName valueType = _newTypeName();
-          _pushMap(
-              AstTestFactory.typeArgumentList(<TypeName>[keyType, valueType]));
+          TypeAnnotation keyType = _newTypeName();
+          TypeAnnotation valueType = _newTypeName();
+          _pushMap(AstTestFactory
+              .typeArgumentList(<TypeAnnotation>[keyType, valueType]));
           break;
         case UnlinkedExprOperation.pushReference:
           _pushReference();
@@ -579,8 +580,8 @@
     return AstTestFactory.propertyAccess(enclosing, property);
   }
 
-  TypeName _buildTypeAst(DartType type) {
-    List<TypeName> argumentNodes;
+  TypeAnnotation _buildTypeAst(DartType type) {
+    List<TypeAnnotation> argumentNodes;
     if (type is ParameterizedType) {
       if (!resynthesizer.libraryResynthesizer.typesWithImplicitTypeArguments
           .contains(type)) {
@@ -614,7 +615,7 @@
    * Convert the next reference to the [DartType] and return the AST
    * corresponding to this type.
    */
-  TypeName _newTypeName() {
+  TypeAnnotation _newTypeName() {
     EntityRef typeRef = uc.references[refPtr++];
     DartType type =
         resynthesizer.buildType(typeRef, context?.typeParameterContext);
@@ -724,7 +725,8 @@
     TypeArgumentList typeArguments;
     int numTypeArguments = uc.ints[intPtr++];
     if (numTypeArguments > 0) {
-      List<TypeName> typeNames = new List<TypeName>(numTypeArguments);
+      List<TypeAnnotation> typeNames =
+          new List<TypeAnnotation>(numTypeArguments);
       for (int i = 0; i < numTypeArguments; i++) {
         typeNames[i] = _newTypeName();
       }
@@ -1309,7 +1311,7 @@
       // If type arguments are specified, use them.
       // Otherwise, delay until they are requested.
       if (numTypeParameters == 0) {
-        typeArguments = const <DartType>[];
+        return element.type;
       } else if (numTypeArguments == numTypeParameters) {
         typeArguments = new List<DartType>(numTypeParameters);
         for (int i = 0; i < numTypeParameters; i++) {
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 46b7b2d..7eb3ad5 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -567,7 +567,7 @@
       NodeList<Annotation> annotations,
       bool isFinal,
       bool isConst,
-      TypeName type,
+      TypeAnnotation type,
       bool assignPropagatedTypeSlot,
       SimpleIdentifier declaredIdentifier) {
     UnlinkedVariableBuilder b = new UnlinkedVariableBuilder();
@@ -615,7 +615,7 @@
       int nameOffset,
       bool isGetter,
       bool isSetter,
-      TypeName returnType,
+      TypeAnnotation returnType,
       FormalParameterList formalParameters,
       FunctionBody body,
       bool isTopLevel,
@@ -764,7 +764,7 @@
    * parameter and store them in [b].
    */
   void serializeFunctionTypedParameterDetails(UnlinkedParamBuilder b,
-      TypeName returnType, FormalParameterList parameters) {
+      TypeAnnotation returnType, FormalParameterList parameters) {
     EntityRefBuilder serializedReturnType = serializeTypeName(returnType);
     if (serializedReturnType != null) {
       b.type = serializedReturnType;
@@ -933,8 +933,13 @@
    * a [EntityRef].  Note that this method does the right thing if the
    * name doesn't refer to an entity other than a type (e.g. a class member).
    */
-  EntityRefBuilder serializeTypeName(TypeName node) {
-    return serializeType(node?.name, node?.typeArguments);
+  EntityRefBuilder serializeTypeName(TypeAnnotation node) {
+    if (node is TypeName) {
+      return serializeType(node?.name, node?.typeArguments);
+    } else if (node != null) {
+      throw new ArgumentError('Cannot serialize a ${node.runtimeType}');
+    }
+    return null;
   }
 
   /**
@@ -1397,14 +1402,6 @@
   }
 
   /**
-   * Helper method to determine if a given [typeName] refers to `dynamic`.
-   */
-  static bool isDynamic(TypeName typeName) {
-    Identifier name = typeName.name;
-    return name is SimpleIdentifier && name.name == 'dynamic';
-  }
-
-  /**
    * Compute the API signature of the unit and record it.
    */
   static void _computeApiSignature(UnlinkedUnitBuilder b) {
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index 5a8702a..e3a9017 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -178,8 +178,12 @@
   /**
    * Return [EntityRefBuilder] that corresponds to the given [type].
    */
-  EntityRefBuilder serializeTypeName(TypeName type) {
-    return serializeType(type?.type, type?.name, type?.typeArguments);
+  EntityRefBuilder serializeTypeName(TypeAnnotation type) {
+    if (type is TypeName) {
+      return serializeType(type?.type, type?.name, type?.typeArguments);
+    }
+    throw new ArgumentError(
+        'Cannot serialize an instance of ${type.runtimeType}');
   }
 
   /**
@@ -649,8 +653,8 @@
       ints.add(0);
     } else {
       ints.add(typeArguments.arguments.length);
-      for (TypeName typeName in typeArguments.arguments) {
-        references.add(serializeTypeName(typeName));
+      for (TypeAnnotation type in typeArguments.arguments) {
+        references.add(serializeTypeName(type));
       }
     }
   }
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index c528c65c..7ccdcc9 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -217,8 +217,8 @@
     }
   }
 
-  DartType getType(TypeName name) {
-    return (name == null) ? DynamicTypeImpl.instance : name.type;
+  DartType getType(TypeAnnotation type) {
+    return type?.type ?? DynamicTypeImpl.instance;
   }
 
   void reset() {
@@ -492,7 +492,7 @@
   void visitListLiteral(ListLiteral node) {
     DartType type = DynamicTypeImpl.instance;
     if (node.typeArguments != null) {
-      NodeList<TypeName> targs = node.typeArguments.arguments;
+      NodeList<TypeAnnotation> targs = node.typeArguments.arguments;
       if (targs.length > 0) {
         type = targs[0].type;
       }
@@ -517,7 +517,7 @@
     DartType ktype = DynamicTypeImpl.instance;
     DartType vtype = DynamicTypeImpl.instance;
     if (node.typeArguments != null) {
-      NodeList<TypeName> targs = node.typeArguments.arguments;
+      NodeList<TypeAnnotation> targs = node.typeArguments.arguments;
       if (targs.length > 0) {
         ktype = targs[0].type;
       }
@@ -657,7 +657,7 @@
 
   @override
   void visitVariableDeclarationList(VariableDeclarationList node) {
-    TypeName type = node.type;
+    TypeAnnotation type = node.type;
     if (type == null) {
       // No checks are needed when the type is var. Although internally the
       // typing rules may have inferred a more precise type for the variable
@@ -876,8 +876,8 @@
     if (expression != null) checkAssignment(expression, type);
   }
 
-  void _checkRuntimeTypeCheck(AstNode node, TypeName typeName) {
-    var type = getType(typeName);
+  void _checkRuntimeTypeCheck(AstNode node, TypeAnnotation annotation) {
+    var type = getType(annotation);
     if (!rules.isGroundType(type)) {
       _recordMessage(node, StrongModeCode.NON_GROUND_TYPE_CHECK_INFO, [type]);
     }
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 6229305..5a0a1ba 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -4,6 +4,8 @@
 
 library analyzer.test.generated.all_the_rest_test;
 
+import 'dart:async';
+
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -93,7 +95,7 @@
 
 @reflectiveTest
 class ContentCacheTest {
-  void test_setContents() {
+  test_setContents() async {
     Source source = new TestSource();
     ContentCache cache = new ContentCache();
     expect(cache.getContents(source), isNull);
@@ -363,11 +365,11 @@
   void reset() {
     AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl();
     analysisOptions.hint = false;
-    resetWithOptions(analysisOptions);
+    resetWith(options: analysisOptions);
   }
 
-  void test_locate_AssignmentExpression() {
-    AstNode id = _findNodeIn(
+  test_locate_AssignmentExpression() async {
+    AstNode id = await _findNodeIn(
         "+=",
         r'''
 int x = 0;
@@ -379,29 +381,29 @@
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_BinaryExpression() {
-    AstNode id = _findNodeIn("+", "var x = 3 + 4;");
+  test_locate_BinaryExpression() async {
+    AstNode id = await _findNodeIn("+", "var x = 3 + 4;");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_ClassDeclaration() {
-    AstNode id = _findNodeIn("class", "class A { }");
+  test_locate_ClassDeclaration() async {
+    AstNode id = await _findNodeIn("class", "class A { }");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is ClassElement, ClassElement, element);
   }
 
-  void test_locate_CompilationUnit() {
-    CompilationUnit cu = _resolveContents("// only comment");
+  test_locate_CompilationUnit() async {
+    CompilationUnit cu = await _resolveContents("// only comment");
     expect(cu.element, isNotNull);
     Element element = ElementLocator.locate(cu);
     expect(element, same(cu.element));
   }
 
-  void test_locate_ConstructorDeclaration() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_ConstructorDeclaration() async {
+    AstNode id = await _findNodeIndexedIn(
         "bar",
         0,
         r'''
@@ -415,15 +417,15 @@
         (obj) => obj is ConstructorElement, ConstructorElement, element);
   }
 
-  void test_locate_ExportDirective() {
-    AstNode id = _findNodeIn("export", "export 'dart:core';");
+  test_locate_ExportDirective() async {
+    AstNode id = await _findNodeIn("export", "export 'dart:core';");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is ExportElement, ExportElement, element);
   }
 
-  void test_locate_FunctionDeclaration() {
-    AstNode id = _findNodeIn("f", "int f() => 3;");
+  test_locate_FunctionDeclaration() async {
+    AstNode id = await _findNodeIn("f", "int f() => 3;");
     FunctionDeclaration declaration =
         id.getAncestor((node) => node is FunctionDeclaration);
     Element element = ElementLocator.locate(declaration);
@@ -431,9 +433,8 @@
         (obj) => obj is FunctionElement, FunctionElement, element);
   }
 
-  void
-      test_locate_Identifier_annotationClass_namedConstructor_forSimpleFormalParameter() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_Identifier_annotationClass_namedConstructor_forSimpleFormalParameter() async {
+    AstNode id = await _findNodeIndexedIn(
         "Class",
         2,
         r'''
@@ -447,9 +448,8 @@
         (obj) => obj is ClassElement, ClassElement, element);
   }
 
-  void
-      test_locate_Identifier_annotationClass_unnamedConstructor_forSimpleFormalParameter() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_Identifier_annotationClass_unnamedConstructor_forSimpleFormalParameter() async {
+    AstNode id = await _findNodeIndexedIn(
         "Class",
         2,
         r'''
@@ -463,15 +463,15 @@
         (obj) => obj is ConstructorElement, ConstructorElement, element);
   }
 
-  void test_locate_Identifier_className() {
-    AstNode id = _findNodeIn("A", "class A { }");
+  test_locate_Identifier_className() async {
+    AstNode id = await _findNodeIn("A", "class A { }");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is ClassElement, ClassElement, element);
   }
 
-  void test_locate_Identifier_constructor_named() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_Identifier_constructor_named() async {
+    AstNode id = await _findNodeIndexedIn(
         "bar",
         0,
         r'''
@@ -483,8 +483,8 @@
         (obj) => obj is ConstructorElement, ConstructorElement, element);
   }
 
-  void test_locate_Identifier_constructor_unnamed() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_Identifier_constructor_unnamed() async {
+    AstNode id = await _findNodeIndexedIn(
         "A",
         1,
         r'''
@@ -496,22 +496,22 @@
         (obj) => obj is ConstructorElement, ConstructorElement, element);
   }
 
-  void test_locate_Identifier_fieldName() {
-    AstNode id = _findNodeIn("x", "class A { var x; }");
+  test_locate_Identifier_fieldName() async {
+    AstNode id = await _findNodeIn("x", "class A { var x; }");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is FieldElement, FieldElement, element);
   }
 
-  void test_locate_Identifier_libraryDirective() {
-    AstNode id = _findNodeIn("foo", "library foo.bar;");
+  test_locate_Identifier_libraryDirective() async {
+    AstNode id = await _findNodeIn("foo", "library foo.bar;");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is LibraryElement, LibraryElement, element);
   }
 
-  void test_locate_Identifier_propertyAccess() {
-    AstNode id = _findNodeIn(
+  test_locate_Identifier_propertyAccess() async {
+    AstNode id = await _findNodeIn(
         "length",
         r'''
 void main() {
@@ -522,15 +522,15 @@
         PropertyAccessorElement, element);
   }
 
-  void test_locate_ImportDirective() {
-    AstNode id = _findNodeIn("import", "import 'dart:core';");
+  test_locate_ImportDirective() async {
+    AstNode id = await _findNodeIn("import", "import 'dart:core';");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is ImportElement, ImportElement, element);
   }
 
-  void test_locate_IndexExpression() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_IndexExpression() async {
+    AstNode id = await _findNodeIndexedIn(
         "\\[",
         1,
         r'''
@@ -543,8 +543,8 @@
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_InstanceCreationExpression() {
-    AstNode node = _findNodeIndexedIn(
+  test_locate_InstanceCreationExpression() async {
+    AstNode node = await _findNodeIndexedIn(
         "A(",
         0,
         r'''
@@ -557,7 +557,7 @@
         (obj) => obj is ConstructorElement, ConstructorElement, element);
   }
 
-  void test_locate_InstanceCreationExpression_type_prefixedIdentifier() {
+  test_locate_InstanceCreationExpression_type_prefixedIdentifier() async {
     // prepare: new pref.A()
     SimpleIdentifier identifier = AstTestFactory.identifier3("A");
     PrefixedIdentifier prefixedIdentifier =
@@ -577,7 +577,7 @@
     expect(element, same(classElement));
   }
 
-  void test_locate_InstanceCreationExpression_type_simpleIdentifier() {
+  test_locate_InstanceCreationExpression_type_simpleIdentifier() async {
     // prepare: new A()
     SimpleIdentifier identifier = AstTestFactory.identifier3("A");
     InstanceCreationExpression creation =
@@ -595,15 +595,15 @@
     expect(element, same(classElement));
   }
 
-  void test_locate_LibraryDirective() {
-    AstNode id = _findNodeIn("library", "library foo;");
+  test_locate_LibraryDirective() async {
+    AstNode id = await _findNodeIn("library", "library foo;");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is LibraryElement, LibraryElement, element);
   }
 
-  void test_locate_MethodDeclaration() {
-    AstNode id = _findNodeIn(
+  test_locate_MethodDeclaration() async {
+    AstNode id = await _findNodeIn(
         "m",
         r'''
 class A {
@@ -616,8 +616,8 @@
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_MethodInvocation_method() {
-    AstNode id = _findNodeIndexedIn(
+  test_locate_MethodInvocation_method() async {
+    AstNode id = await _findNodeIndexedIn(
         "bar",
         1,
         r'''
@@ -632,13 +632,13 @@
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_MethodInvocation_topLevel() {
+  test_locate_MethodInvocation_topLevel() async {
     String code = r'''
 foo(x) {}
 void main() {
  foo(0);
 }''';
-    CompilationUnit cu = _resolveContents(code);
+    CompilationUnit cu = await _resolveContents(code);
     int offset = code.indexOf('foo(0)');
     AstNode node = new NodeLocator(offset).searchWithin(cu);
     MethodInvocation invocation =
@@ -648,7 +648,7 @@
         (obj) => obj is FunctionElement, FunctionElement, element);
   }
 
-  void test_locate_PartOfDirective() {
+  test_locate_PartOfDirective() async {
     Source librarySource = addNamedSource(
         '/lib.dart',
         '''
@@ -668,15 +668,15 @@
         (obj) => obj is LibraryElement, LibraryElement, element);
   }
 
-  void test_locate_PostfixExpression() {
-    AstNode id = _findNodeIn("++", "int addOne(int x) => x++;");
+  test_locate_PostfixExpression() async {
+    AstNode id = await _findNodeIn("++", "int addOne(int x) => x++;");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_PrefixedIdentifier() {
-    AstNode id = _findNodeIn(
+  test_locate_PrefixedIdentifier() async {
+    AstNode id = await _findNodeIn(
         "int",
         r'''
 import 'dart:core' as core;
@@ -688,46 +688,47 @@
         (obj) => obj is ClassElement, ClassElement, element);
   }
 
-  void test_locate_PrefixExpression() {
-    AstNode id = _findNodeIn("++", "int addOne(int x) => ++x;");
+  test_locate_PrefixExpression() async {
+    AstNode id = await _findNodeIn("++", "int addOne(int x) => ++x;");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is MethodElement, MethodElement, element);
   }
 
-  void test_locate_StringLiteral_exportUri() {
+  test_locate_StringLiteral_exportUri() async {
     addNamedSource("/foo.dart", "library foo;");
-    AstNode id = _findNodeIn("'foo.dart'", "export 'foo.dart';");
+    AstNode id = await _findNodeIn("'foo.dart'", "export 'foo.dart';");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is LibraryElement, LibraryElement, element);
   }
 
-  void test_locate_StringLiteral_expression() {
-    AstNode id = _findNodeIn("abc", "var x = 'abc';");
+  test_locate_StringLiteral_expression() async {
+    AstNode id = await _findNodeIn("abc", "var x = 'abc';");
     Element element = ElementLocator.locate(id);
     expect(element, isNull);
   }
 
-  void test_locate_StringLiteral_importUri() {
+  test_locate_StringLiteral_importUri() async {
     addNamedSource("/foo.dart", "library foo; class A {}");
-    AstNode id =
-        _findNodeIn("'foo.dart'", "import 'foo.dart'; class B extends A {}");
+    AstNode id = await _findNodeIn(
+        "'foo.dart'", "import 'foo.dart'; class B extends A {}");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is LibraryElement, LibraryElement, element);
   }
 
-  void test_locate_StringLiteral_partUri() {
+  test_locate_StringLiteral_partUri() async {
     addNamedSource("/foo.dart", "part of app;");
-    AstNode id = _findNodeIn("'foo.dart'", "library app; part 'foo.dart';");
+    AstNode id =
+        await _findNodeIn("'foo.dart'", "library app; part 'foo.dart';");
     Element element = ElementLocator.locate(id);
     EngineTestCase.assertInstanceOf((obj) => obj is CompilationUnitElement,
         CompilationUnitElement, element);
   }
 
-  void test_locate_VariableDeclaration() {
-    AstNode id = _findNodeIn("x", "var x = 'abc';");
+  test_locate_VariableDeclaration() async {
+    AstNode id = await _findNodeIn("x", "var x = 'abc';");
     VariableDeclaration declaration =
         id.getAncestor((node) => node is VariableDeclaration);
     Element element = ElementLocator.locate(declaration);
@@ -742,8 +743,8 @@
    * [code] the code to resolve.
    * Returns the matched node in the resolved AST for the given source lines.
    */
-  AstNode _findNodeIn(String nodePattern, String code) {
-    return _findNodeIndexedIn(nodePattern, 0, code);
+  Future<AstNode> _findNodeIn(String nodePattern, String code) async {
+    return await _findNodeIndexedIn(nodePattern, 0, code);
   }
 
   /**
@@ -755,8 +756,9 @@
    * [code] the code to resolve.
    * Returns the matched node in the resolved AST for the given source lines
    */
-  AstNode _findNodeIndexedIn(String nodePattern, int index, String code) {
-    CompilationUnit cu = _resolveContents(code);
+  Future<AstNode> _findNodeIndexedIn(
+      String nodePattern, int index, String code) async {
+    CompilationUnit cu = await _resolveContents(code);
     int start = _getOffsetOfMatch(code, nodePattern, index);
     int end = start + nodePattern.length;
     return new NodeLocator(start, end).searchWithin(cu);
@@ -782,9 +784,10 @@
    *
    * Throws if source cannot be verified.
    */
-  CompilationUnit _resolveContents(String code) {
+  Future<CompilationUnit> _resolveContents(String code) async {
     Source source = addSource(code);
     LibraryElement library = resolve2(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
     return analysisContext.resolveCompilationUnit(source, library);
@@ -793,7 +796,7 @@
 
 @reflectiveTest
 class EnumMemberBuilderTest extends EngineTestCase {
-  void test_visitEnumDeclaration_multiple() {
+  test_visitEnumDeclaration_multiple() async {
     String firstName = "ONE";
     String secondName = "TWO";
     String thirdName = "THREE";
@@ -826,7 +829,7 @@
     _assertGetter(constant);
   }
 
-  void test_visitEnumDeclaration_single() {
+  test_visitEnumDeclaration_single() async {
     String firstName = "ONE";
     EnumDeclaration enumDeclaration =
         AstTestFactory.enumDeclaration2("E", [firstName]);
@@ -901,13 +904,13 @@
     return element.type;
   }
 
-  void test_creation() {
+  test_creation() async {
     GatheringErrorListener listener = new GatheringErrorListener();
     TestSource source = new TestSource();
     expect(new ErrorReporter(listener, source), isNotNull);
   }
 
-  void test_reportErrorForElement_named() {
+  test_reportErrorForElement_named() async {
     DartType type = createType("/test1.dart", "A");
     ClassElement element = type.element;
     GatheringErrorListener listener = new GatheringErrorListener();
@@ -920,7 +923,7 @@
     expect(error.offset, element.nameOffset);
   }
 
-  void test_reportErrorForElement_unnamed() {
+  test_reportErrorForElement_unnamed() async {
     ImportElementImpl element =
         ElementFactory.importFor(ElementFactory.library(null, ''), null);
     GatheringErrorListener listener = new GatheringErrorListener();
@@ -936,7 +939,7 @@
     expect(error.offset, element.nameOffset);
   }
 
-  void test_reportErrorForSpan() {
+  test_reportErrorForSpan() async {
     GatheringErrorListener listener = new GatheringErrorListener();
     ErrorReporter reporter = new ErrorReporter(listener, new TestSource());
 
@@ -959,7 +962,7 @@
     expect(listener.errors.first.length, length);
   }
 
-  void test_reportTypeErrorForNode_differentNames() {
+  test_reportTypeErrorForNode_differentNames() async {
     DartType firstType = createType("/test1.dart", "A");
     DartType secondType = createType("/test2.dart", "B");
     GatheringErrorListener listener = new GatheringErrorListener();
@@ -973,7 +976,7 @@
     expect(error.message.indexOf("(") < 0, isTrue);
   }
 
-  void test_reportTypeErrorForNode_sameName() {
+  test_reportTypeErrorForNode_sameName() async {
     String typeName = "A";
     DartType firstType = createType("/test1.dart", typeName);
     DartType secondType = createType("/test2.dart", typeName);
@@ -991,47 +994,47 @@
 
 @reflectiveTest
 class ErrorSeverityTest extends EngineTestCase {
-  void test_max_error_error() {
+  test_max_error_error() async {
     expect(ErrorSeverity.ERROR.max(ErrorSeverity.ERROR),
         same(ErrorSeverity.ERROR));
   }
 
-  void test_max_error_none() {
+  test_max_error_none() async {
     expect(
         ErrorSeverity.ERROR.max(ErrorSeverity.NONE), same(ErrorSeverity.ERROR));
   }
 
-  void test_max_error_warning() {
+  test_max_error_warning() async {
     expect(ErrorSeverity.ERROR.max(ErrorSeverity.WARNING),
         same(ErrorSeverity.ERROR));
   }
 
-  void test_max_none_error() {
+  test_max_none_error() async {
     expect(
         ErrorSeverity.NONE.max(ErrorSeverity.ERROR), same(ErrorSeverity.ERROR));
   }
 
-  void test_max_none_none() {
+  test_max_none_none() async {
     expect(
         ErrorSeverity.NONE.max(ErrorSeverity.NONE), same(ErrorSeverity.NONE));
   }
 
-  void test_max_none_warning() {
+  test_max_none_warning() async {
     expect(ErrorSeverity.NONE.max(ErrorSeverity.WARNING),
         same(ErrorSeverity.WARNING));
   }
 
-  void test_max_warning_error() {
+  test_max_warning_error() async {
     expect(ErrorSeverity.WARNING.max(ErrorSeverity.ERROR),
         same(ErrorSeverity.ERROR));
   }
 
-  void test_max_warning_none() {
+  test_max_warning_none() async {
     expect(ErrorSeverity.WARNING.max(ErrorSeverity.NONE),
         same(ErrorSeverity.WARNING));
   }
 
-  void test_max_warning_warning() {
+  test_max_warning_warning() async {
     expect(ErrorSeverity.WARNING.max(ErrorSeverity.WARNING),
         same(ErrorSeverity.WARNING));
   }
@@ -1044,220 +1047,220 @@
  */
 @reflectiveTest
 class ExitDetectorTest extends ParserTestCase {
-  void test_asExpression() {
+  test_asExpression() async {
     _assertFalse("a as Object;");
   }
 
-  void test_asExpression_throw() {
+  test_asExpression_throw() async {
     _assertTrue("throw '' as Object;");
   }
 
-  void test_assertStatement() {
+  test_assertStatement() async {
     _assertFalse("assert(a);");
   }
 
-  void test_assertStatement_throw() {
+  test_assertStatement_throw() async {
     _assertFalse("assert((throw 0));");
   }
 
-  void test_assignmentExpression() {
+  test_assignmentExpression() async {
     _assertFalse("v = 1;");
   }
 
-  void test_assignmentExpression_compound_lazy() {
+  test_assignmentExpression_compound_lazy() async {
     enableLazyAssignmentOperators = true;
     _assertFalse("v ||= false;");
   }
 
-  void test_assignmentExpression_lhs_throw() {
+  test_assignmentExpression_lhs_throw() async {
     _assertTrue("a[throw ''] = 0;");
   }
 
-  void test_assignmentExpression_rhs_throw() {
+  test_assignmentExpression_rhs_throw() async {
     _assertTrue("v = throw '';");
   }
 
-  void test_await_false() {
+  test_await_false() async {
     _assertFalse("await x;");
   }
 
-  void test_await_throw_true() {
+  test_await_throw_true() async {
     _assertTrue("bool b = await (throw '' || true);");
   }
 
-  void test_binaryExpression_and() {
+  test_binaryExpression_and() async {
     _assertFalse("a && b;");
   }
 
-  void test_binaryExpression_and_lhs() {
+  test_binaryExpression_and_lhs() async {
     _assertTrue("throw '' && b;");
   }
 
-  void test_binaryExpression_and_rhs() {
+  test_binaryExpression_and_rhs() async {
     _assertFalse("a && (throw '');");
   }
 
-  void test_binaryExpression_and_rhs2() {
+  test_binaryExpression_and_rhs2() async {
     _assertFalse("false && (throw '');");
   }
 
-  void test_binaryExpression_and_rhs3() {
+  test_binaryExpression_and_rhs3() async {
     _assertTrue("true && (throw '');");
   }
 
-  void test_binaryExpression_ifNull() {
+  test_binaryExpression_ifNull() async {
     _assertFalse("a ?? b;");
   }
 
-  void test_binaryExpression_ifNull_lhs() {
+  test_binaryExpression_ifNull_lhs() async {
     _assertTrue("throw '' ?? b;");
   }
 
-  void test_binaryExpression_ifNull_rhs() {
+  test_binaryExpression_ifNull_rhs() async {
     _assertFalse("a ?? (throw '');");
   }
 
-  void test_binaryExpression_ifNull_rhs2() {
+  test_binaryExpression_ifNull_rhs2() async {
     _assertFalse("null ?? (throw '');");
   }
 
-  void test_binaryExpression_or() {
+  test_binaryExpression_or() async {
     _assertFalse("a || b;");
   }
 
-  void test_binaryExpression_or_lhs() {
+  test_binaryExpression_or_lhs() async {
     _assertTrue("throw '' || b;");
   }
 
-  void test_binaryExpression_or_rhs() {
+  test_binaryExpression_or_rhs() async {
     _assertFalse("a || (throw '');");
   }
 
-  void test_binaryExpression_or_rhs2() {
+  test_binaryExpression_or_rhs2() async {
     _assertFalse("true || (throw '');");
   }
 
-  void test_binaryExpression_or_rhs3() {
+  test_binaryExpression_or_rhs3() async {
     _assertTrue("false || (throw '');");
   }
 
-  void test_block_empty() {
+  test_block_empty() async {
     _assertFalse("{}");
   }
 
-  void test_block_noReturn() {
+  test_block_noReturn() async {
     _assertFalse("{ int i = 0; }");
   }
 
-  void test_block_return() {
+  test_block_return() async {
     _assertTrue("{ return 0; }");
   }
 
-  void test_block_returnNotLast() {
+  test_block_returnNotLast() async {
     _assertTrue("{ return 0; throw 'a'; }");
   }
 
-  void test_block_throwNotLast() {
+  test_block_throwNotLast() async {
     _assertTrue("{ throw 0; x = null; }");
   }
 
-  void test_cascadeExpression_argument() {
+  test_cascadeExpression_argument() async {
     _assertTrue("a..b(throw '');");
   }
 
-  void test_cascadeExpression_index() {
+  test_cascadeExpression_index() async {
     _assertTrue("a..[throw ''];");
   }
 
-  void test_cascadeExpression_target() {
+  test_cascadeExpression_target() async {
     _assertTrue("throw ''..b();");
   }
 
-  void test_conditional_ifElse_bothThrows() {
+  test_conditional_ifElse_bothThrows() async {
     _assertTrue("c ? throw '' : throw '';");
   }
 
-  void test_conditional_ifElse_elseThrows() {
+  test_conditional_ifElse_elseThrows() async {
     _assertFalse("c ? i : throw '';");
   }
 
-  void test_conditional_ifElse_noThrow() {
+  test_conditional_ifElse_noThrow() async {
     _assertFalse("c ? i : j;");
   }
 
-  void test_conditional_ifElse_thenThrow() {
+  test_conditional_ifElse_thenThrow() async {
     _assertFalse("c ? throw '' : j;");
   }
 
-  void test_conditionalAccess() {
+  test_conditionalAccess() async {
     _assertFalse("a?.b;");
   }
 
-  void test_conditionalAccess_lhs() {
+  test_conditionalAccess_lhs() async {
     _assertTrue("(throw '')?.b;");
   }
 
-  void test_conditionalAccessAssign() {
+  test_conditionalAccessAssign() async {
     _assertFalse("a?.b = c;");
   }
 
-  void test_conditionalAccessAssign_lhs() {
+  test_conditionalAccessAssign_lhs() async {
     _assertTrue("(throw '')?.b = c;");
   }
 
-  void test_conditionalAccessAssign_rhs() {
+  test_conditionalAccessAssign_rhs() async {
     _assertFalse("a?.b = throw '';");
   }
 
-  void test_conditionalAccessAssign_rhs2() {
+  test_conditionalAccessAssign_rhs2() async {
     _assertFalse("null?.b = throw '';");
   }
 
-  void test_conditionalAccessIfNullAssign() {
+  test_conditionalAccessIfNullAssign() async {
     _assertFalse("a?.b ??= c;");
   }
 
-  void test_conditionalAccessIfNullAssign_lhs() {
+  test_conditionalAccessIfNullAssign_lhs() async {
     _assertTrue("(throw '')?.b ??= c;");
   }
 
-  void test_conditionalAccessIfNullAssign_rhs() {
+  test_conditionalAccessIfNullAssign_rhs() async {
     _assertFalse("a?.b ??= throw '';");
   }
 
-  void test_conditionalAccessIfNullAssign_rhs2() {
+  test_conditionalAccessIfNullAssign_rhs2() async {
     _assertFalse("null?.b ??= throw '';");
   }
 
-  void test_conditionalCall() {
+  test_conditionalCall() async {
     _assertFalse("a?.b(c);");
   }
 
-  void test_conditionalCall_lhs() {
+  test_conditionalCall_lhs() async {
     _assertTrue("(throw '')?.b(c);");
   }
 
-  void test_conditionalCall_rhs() {
+  test_conditionalCall_rhs() async {
     _assertFalse("a?.b(throw '');");
   }
 
-  void test_conditionalCall_rhs2() {
+  test_conditionalCall_rhs2() async {
     _assertFalse("null?.b(throw '');");
   }
 
-  void test_creation() {
+  test_creation() async {
     expect(new ExitDetector(), isNotNull);
   }
 
-  void test_doStatement_break_and_throw() {
+  test_doStatement_break_and_throw() async {
     _assertFalse("{ do { if (1==1) break; throw 'T'; } while (0==1); }");
   }
 
-  void test_doStatement_continue_and_throw() {
+  test_doStatement_continue_and_throw() async {
     _assertFalse("{ do { if (1==1) continue; throw 'T'; } while (0==1); }");
   }
 
-  void test_doStatement_continueDoInSwitch_and_throw() {
+  test_doStatement_continueDoInSwitch_and_throw() async {
     _assertFalse('''
 {
   D: do {
@@ -1270,7 +1273,7 @@
 }''');
   }
 
-  void test_doStatement_continueInSwitch_and_throw() {
+  test_doStatement_continueInSwitch_and_throw() async {
     _assertFalse('''
 {
   do {
@@ -1283,287 +1286,287 @@
 }''');
   }
 
-  void test_doStatement_return() {
+  test_doStatement_return() async {
     _assertTrue("{ do { return null; } while (1 == 2); }");
   }
 
-  void test_doStatement_throwCondition() {
+  test_doStatement_throwCondition() async {
     _assertTrue("{ do {} while (throw ''); }");
   }
 
-  void test_doStatement_true_break() {
+  test_doStatement_true_break() async {
     _assertFalse("{ do { break; } while (true); }");
   }
 
-  void test_doStatement_true_continue() {
+  test_doStatement_true_continue() async {
     _assertTrue("{ do { continue; } while (true); }");
   }
 
-  void test_doStatement_true_continueWithLabel() {
+  test_doStatement_true_continueWithLabel() async {
     _assertTrue("{ x: do { continue x; } while (true); }");
   }
 
-  void test_doStatement_true_if_return() {
+  test_doStatement_true_if_return() async {
     _assertTrue("{ do { if (true) {return null;} } while (true); }");
   }
 
-  void test_doStatement_true_noBreak() {
+  test_doStatement_true_noBreak() async {
     _assertTrue("{ do {} while (true); }");
   }
 
-  void test_doStatement_true_return() {
+  test_doStatement_true_return() async {
     _assertTrue("{ do { return null; } while (true);  }");
   }
 
-  void test_emptyStatement() {
+  test_emptyStatement() async {
     _assertFalse(";");
   }
 
-  void test_forEachStatement() {
+  test_forEachStatement() async {
     _assertFalse("for (element in list) {}");
   }
 
-  void test_forEachStatement_throw() {
+  test_forEachStatement_throw() async {
     _assertTrue("for (element in throw '') {}");
   }
 
-  void test_forStatement_condition() {
+  test_forStatement_condition() async {
     _assertTrue("for (; throw 0;) {}");
   }
 
-  void test_forStatement_implicitTrue() {
+  test_forStatement_implicitTrue() async {
     _assertTrue("for (;;) {}");
   }
 
-  void test_forStatement_implicitTrue_break() {
+  test_forStatement_implicitTrue_break() async {
     _assertFalse("for (;;) { break; }");
   }
 
-  void test_forStatement_implicitTrue_if_break() {
+  test_forStatement_implicitTrue_if_break() async {
     _assertFalse("{ for (;;) { if (1==2) { var a = 1; } else { break; } } }");
   }
 
-  void test_forStatement_initialization() {
+  test_forStatement_initialization() async {
     _assertTrue("for (i = throw 0;;) {}");
   }
 
-  void test_forStatement_true() {
+  test_forStatement_true() async {
     _assertTrue("for (; true; ) {}");
   }
 
-  void test_forStatement_true_break() {
+  test_forStatement_true_break() async {
     _assertFalse("{ for (; true; ) { break; } }");
   }
 
-  void test_forStatement_true_continue() {
+  test_forStatement_true_continue() async {
     _assertTrue("{ for (; true; ) { continue; } }");
   }
 
-  void test_forStatement_true_if_return() {
+  test_forStatement_true_if_return() async {
     _assertTrue("{ for (; true; ) { if (true) {return null;} } }");
   }
 
-  void test_forStatement_true_noBreak() {
+  test_forStatement_true_noBreak() async {
     _assertTrue("{ for (; true; ) {} }");
   }
 
-  void test_forStatement_updaters() {
+  test_forStatement_updaters() async {
     _assertTrue("for (;; i++, throw 0) {}");
   }
 
-  void test_forStatement_variableDeclaration() {
+  test_forStatement_variableDeclaration() async {
     _assertTrue("for (int i = throw 0;;) {}");
   }
 
-  void test_functionExpression() {
+  test_functionExpression() async {
     _assertFalse("(){};");
   }
 
-  void test_functionExpression_bodyThrows() {
+  test_functionExpression_bodyThrows() async {
     _assertFalse("(int i) => throw '';");
   }
 
-  void test_functionExpressionInvocation() {
+  test_functionExpressionInvocation() async {
     _assertFalse("f(g);");
   }
 
-  void test_functionExpressionInvocation_argumentThrows() {
+  test_functionExpressionInvocation_argumentThrows() async {
     _assertTrue("f(throw '');");
   }
 
-  void test_functionExpressionInvocation_targetThrows() {
+  test_functionExpressionInvocation_targetThrows() async {
     _assertTrue("throw ''(g);");
   }
 
-  void test_identifier_prefixedIdentifier() {
+  test_identifier_prefixedIdentifier() async {
     _assertFalse("a.b;");
   }
 
-  void test_identifier_simpleIdentifier() {
+  test_identifier_simpleIdentifier() async {
     _assertFalse("a;");
   }
 
-  void test_if_false_else_return() {
+  test_if_false_else_return() async {
     _assertTrue("if (false) {} else { return 0; }");
   }
 
-  void test_if_false_noReturn() {
+  test_if_false_noReturn() async {
     _assertFalse("if (false) {}");
   }
 
-  void test_if_false_return() {
+  test_if_false_return() async {
     _assertFalse("if (false) { return 0; }");
   }
 
-  void test_if_noReturn() {
+  test_if_noReturn() async {
     _assertFalse("if (c) i++;");
   }
 
-  void test_if_return() {
+  test_if_return() async {
     _assertFalse("if (c) return 0;");
   }
 
-  void test_if_true_noReturn() {
+  test_if_true_noReturn() async {
     _assertFalse("if (true) {}");
   }
 
-  void test_if_true_return() {
+  test_if_true_return() async {
     _assertTrue("if (true) { return 0; }");
   }
 
-  void test_ifElse_bothReturn() {
+  test_ifElse_bothReturn() async {
     _assertTrue("if (c) return 0; else return 1;");
   }
 
-  void test_ifElse_elseReturn() {
+  test_ifElse_elseReturn() async {
     _assertFalse("if (c) i++; else return 1;");
   }
 
-  void test_ifElse_noReturn() {
+  test_ifElse_noReturn() async {
     _assertFalse("if (c) i++; else j++;");
   }
 
-  void test_ifElse_thenReturn() {
+  test_ifElse_thenReturn() async {
     _assertFalse("if (c) return 0; else j++;");
   }
 
-  void test_ifNullAssign() {
+  test_ifNullAssign() async {
     _assertFalse("a ??= b;");
   }
 
-  void test_ifNullAssign_rhs() {
+  test_ifNullAssign_rhs() async {
     _assertFalse("a ??= throw '';");
   }
 
-  void test_indexExpression() {
+  test_indexExpression() async {
     _assertFalse("a[b];");
   }
 
-  void test_indexExpression_index() {
+  test_indexExpression_index() async {
     _assertTrue("a[throw ''];");
   }
 
-  void test_indexExpression_target() {
+  test_indexExpression_target() async {
     _assertTrue("throw ''[b];");
   }
 
-  void test_instanceCreationExpression() {
+  test_instanceCreationExpression() async {
     _assertFalse("new A(b);");
   }
 
-  void test_instanceCreationExpression_argumentThrows() {
+  test_instanceCreationExpression_argumentThrows() async {
     _assertTrue("new A(throw '');");
   }
 
-  void test_isExpression() {
+  test_isExpression() async {
     _assertFalse("A is B;");
   }
 
-  void test_isExpression_throws() {
+  test_isExpression_throws() async {
     _assertTrue("throw '' is B;");
   }
 
-  void test_labeledStatement() {
+  test_labeledStatement() async {
     _assertFalse("label: a;");
   }
 
-  void test_labeledStatement_throws() {
+  test_labeledStatement_throws() async {
     _assertTrue("label: throw '';");
   }
 
-  void test_literal_boolean() {
+  test_literal_boolean() async {
     _assertFalse("true;");
   }
 
-  void test_literal_double() {
+  test_literal_double() async {
     _assertFalse("1.1;");
   }
 
-  void test_literal_integer() {
+  test_literal_integer() async {
     _assertFalse("1;");
   }
 
-  void test_literal_null() {
+  test_literal_null() async {
     _assertFalse("null;");
   }
 
-  void test_literal_String() {
+  test_literal_String() async {
     _assertFalse("'str';");
   }
 
-  void test_methodInvocation() {
+  test_methodInvocation() async {
     _assertFalse("a.b(c);");
   }
 
-  void test_methodInvocation_argument() {
+  test_methodInvocation_argument() async {
     _assertTrue("a.b(throw '');");
   }
 
-  void test_methodInvocation_target() {
+  test_methodInvocation_target() async {
     _assertTrue("throw ''.b(c);");
   }
 
-  void test_parenthesizedExpression() {
+  test_parenthesizedExpression() async {
     _assertFalse("(a);");
   }
 
-  void test_parenthesizedExpression_throw() {
+  test_parenthesizedExpression_throw() async {
     _assertTrue("(throw '');");
   }
 
-  void test_propertyAccess() {
+  test_propertyAccess() async {
     _assertFalse("new Object().a;");
   }
 
-  void test_propertyAccess_throws() {
+  test_propertyAccess_throws() async {
     _assertTrue("(throw '').a;");
   }
 
-  void test_rethrow() {
+  test_rethrow() async {
     _assertTrue("rethrow;");
   }
 
-  void test_return() {
+  test_return() async {
     _assertTrue("return 0;");
   }
 
-  void test_superExpression() {
+  test_superExpression() async {
     _assertFalse("super.a;");
   }
 
-  void test_switch_allReturn() {
+  test_switch_allReturn() async {
     _assertTrue("switch (i) { case 0: return 0; default: return 1; }");
   }
 
-  void test_switch_defaultWithNoStatements() {
+  test_switch_defaultWithNoStatements() async {
     _assertFalse("switch (i) { case 0: return 0; default: }");
   }
 
-  void test_switch_fallThroughToNotReturn() {
+  test_switch_fallThroughToNotReturn() async {
     _assertFalse("switch (i) { case 0: case 1: break; default: return 1; }");
   }
 
-  void test_switch_fallThroughToReturn() {
+  test_switch_fallThroughToReturn() async {
     _assertTrue("switch (i) { case 0: case 1: return 0; default: return 1; }");
   }
 
@@ -1571,7 +1574,7 @@
   // determine that `case 0` exits, `case 1` continues to an exiting case, and
   // `default` exits, so the switch exits.
   @failingTest
-  void test_switch_includesContinue() {
+  test_switch_includesContinue() async {
     _assertTrue('''
 switch (i) {
   zero: case 0: return 0;
@@ -1580,63 +1583,63 @@
 }''');
   }
 
-  void test_switch_noDefault() {
+  test_switch_noDefault() async {
     _assertFalse("switch (i) { case 0: return 0; }");
   }
 
-  void test_switch_nonReturn() {
+  test_switch_nonReturn() async {
     _assertFalse("switch (i) { case 0: i++; default: return 1; }");
   }
 
-  void test_thisExpression() {
+  test_thisExpression() async {
     _assertFalse("this.a;");
   }
 
-  void test_throwExpression() {
+  test_throwExpression() async {
     _assertTrue("throw new Object();");
   }
 
-  void test_tryStatement_noReturn() {
+  test_tryStatement_noReturn() async {
     _assertFalse("try {} catch (e, s) {} finally {}");
   }
 
-  void test_tryStatement_noReturn_noFinally() {
+  test_tryStatement_noReturn_noFinally() async {
     _assertFalse("try {} catch (e, s) {}");
   }
 
-  void test_tryStatement_return_catch() {
+  test_tryStatement_return_catch() async {
     _assertFalse("try {} catch (e, s) { return 1; } finally {}");
   }
 
-  void test_tryStatement_return_catch_noFinally() {
+  test_tryStatement_return_catch_noFinally() async {
     _assertFalse("try {} catch (e, s) { return 1; }");
   }
 
-  void test_tryStatement_return_finally() {
+  test_tryStatement_return_finally() async {
     _assertTrue("try {} catch (e, s) {} finally { return 1; }");
   }
 
-  void test_tryStatement_return_try_noCatch() {
+  test_tryStatement_return_try_noCatch() async {
     _assertTrue("try { return 1; } finally {}");
   }
 
-  void test_tryStatement_return_try_oneCatchDoesNotExit() {
+  test_tryStatement_return_try_oneCatchDoesNotExit() async {
     _assertFalse("try { return 1; } catch (e, s) {} finally {}");
   }
 
-  void test_tryStatement_return_try_oneCatchDoesNotExit_noFinally() {
+  test_tryStatement_return_try_oneCatchDoesNotExit_noFinally() async {
     _assertFalse("try { return 1; } catch (e, s) {}");
   }
 
-  void test_tryStatement_return_try_oneCatchExits() {
+  test_tryStatement_return_try_oneCatchExits() async {
     _assertTrue("try { return 1; } catch (e, s) { return 1; } finally {}");
   }
 
-  void test_tryStatement_return_try_oneCatchExits_noFinally() {
+  test_tryStatement_return_try_oneCatchExits_noFinally() async {
     _assertTrue("try { return 1; } catch (e, s) { return 1; }");
   }
 
-  void test_tryStatement_return_try_twoCatchesDoExit() {
+  test_tryStatement_return_try_twoCatchesDoExit() async {
     _assertTrue('''
 try { return 1; }
 on int catch (e, s) { return 1; }
@@ -1644,14 +1647,14 @@
 finally {}''');
   }
 
-  void test_tryStatement_return_try_twoCatchesDoExit_noFinally() {
+  test_tryStatement_return_try_twoCatchesDoExit_noFinally() async {
     _assertTrue('''
 try { return 1; }
 on int catch (e, s) { return 1; }
 on String catch (e, s) { return 1; }''');
   }
 
-  void test_tryStatement_return_try_twoCatchesDoNotExit() {
+  test_tryStatement_return_try_twoCatchesDoNotExit() async {
     _assertFalse('''
 try { return 1; }
 on int catch (e, s) {}
@@ -1659,14 +1662,14 @@
 finally {}''');
   }
 
-  void test_tryStatement_return_try_twoCatchesDoNotExit_noFinally() {
+  test_tryStatement_return_try_twoCatchesDoNotExit_noFinally() async {
     _assertFalse('''
 try { return 1; }
 on int catch (e, s) {}
 on String catch (e, s) {}''');
   }
 
-  void test_tryStatement_return_try_twoCatchesMixed() {
+  test_tryStatement_return_try_twoCatchesMixed() async {
     _assertFalse('''
 try { return 1; }
 on int catch (e, s) {}
@@ -1674,66 +1677,66 @@
 finally {}''');
   }
 
-  void test_tryStatement_return_try_twoCatchesMixed_noFinally() {
+  test_tryStatement_return_try_twoCatchesMixed_noFinally() async {
     _assertFalse('''
 try { return 1; }
 on int catch (e, s) {}
 on String catch (e, s) { return 1; }''');
   }
 
-  void test_variableDeclarationStatement_noInitializer() {
+  test_variableDeclarationStatement_noInitializer() async {
     _assertFalse("int i;");
   }
 
-  void test_variableDeclarationStatement_noThrow() {
+  test_variableDeclarationStatement_noThrow() async {
     _assertFalse("int i = 0;");
   }
 
-  void test_variableDeclarationStatement_throw() {
+  test_variableDeclarationStatement_throw() async {
     _assertTrue("int i = throw new Object();");
   }
 
-  void test_whileStatement_false_nonReturn() {
+  test_whileStatement_false_nonReturn() async {
     _assertFalse("{ while (false) {} }");
   }
 
-  void test_whileStatement_throwCondition() {
+  test_whileStatement_throwCondition() async {
     _assertTrue("{ while (throw '') {} }");
   }
 
-  void test_whileStatement_true_break() {
+  test_whileStatement_true_break() async {
     _assertFalse("{ while (true) { break; } }");
   }
 
-  void test_whileStatement_true_break_and_throw() {
+  test_whileStatement_true_break_and_throw() async {
     _assertFalse("{ while (true) { if (1==1) break; throw 'T'; } }");
   }
 
-  void test_whileStatement_true_continue() {
+  test_whileStatement_true_continue() async {
     _assertTrue("{ while (true) { continue; } }");
   }
 
-  void test_whileStatement_true_continueWithLabel() {
+  test_whileStatement_true_continueWithLabel() async {
     _assertTrue("{ x: while (true) { continue x; } }");
   }
 
-  void test_whileStatement_true_doStatement_scopeRequired() {
+  test_whileStatement_true_doStatement_scopeRequired() async {
     _assertTrue("{ while (true) { x: do { continue x; } while (true); } }");
   }
 
-  void test_whileStatement_true_if_return() {
+  test_whileStatement_true_if_return() async {
     _assertTrue("{ while (true) { if (true) {return null;} } }");
   }
 
-  void test_whileStatement_true_noBreak() {
+  test_whileStatement_true_noBreak() async {
     _assertTrue("{ while (true) {} }");
   }
 
-  void test_whileStatement_true_return() {
+  test_whileStatement_true_return() async {
     _assertTrue("{ while (true) { return null; } }");
   }
 
-  void test_whileStatement_true_throw() {
+  test_whileStatement_true_throw() async {
     _assertTrue("{ while (true) { throw ''; } }");
   }
 
@@ -1759,7 +1762,7 @@
  */
 @reflectiveTest
 class ExitDetectorTest2 extends ResolverTestCase {
-  void test_forStatement_implicitTrue_breakWithLabel() {
+  test_forStatement_implicitTrue_breakWithLabel() async {
     Source source = addSource(r'''
 void f() {
   x: for (;;) {
@@ -1773,7 +1776,7 @@
     _assertNthStatementDoesNotExit(source, 0);
   }
 
-  void test_switch_withEnum_false_noDefault() {
+  test_switch_withEnum_false_noDefault() async {
     Source source = addSource(r'''
 enum E { A, B }
 String f(E e) {
@@ -1790,7 +1793,7 @@
     _assertNthStatementDoesNotExit(source, 1);
   }
 
-  void test_switch_withEnum_false_withDefault() {
+  test_switch_withEnum_false_withDefault() async {
     Source source = addSource(r'''
 enum E { A, B }
 String f(E e) {
@@ -1807,7 +1810,7 @@
     _assertNthStatementDoesNotExit(source, 1);
   }
 
-  void test_switch_withEnum_true_noDefault() {
+  test_switch_withEnum_true_noDefault() async {
     Source source = addSource(r'''
 enum E { A, B }
 String f(E e) {
@@ -1822,7 +1825,7 @@
     _assertNthStatementDoesNotExit(source, 0);
   }
 
-  void test_switch_withEnum_true_withExitingDefault() {
+  test_switch_withEnum_true_withExitingDefault() async {
     Source source = addSource(r'''
 enum E { A, B }
 String f(E e) {
@@ -1837,7 +1840,7 @@
     _assertNthStatementExits(source, 0);
   }
 
-  void test_switch_withEnum_true_withNonExitingDefault() {
+  test_switch_withEnum_true_withNonExitingDefault() async {
     Source source = addSource(r'''
 enum E { A, B }
 String f(E e) {
@@ -1853,7 +1856,7 @@
     _assertNthStatementDoesNotExit(source, 1);
   }
 
-  void test_whileStatement_breakWithLabel() {
+  test_whileStatement_breakWithLabel() async {
     Source source = addSource(r'''
 void f() {
   x: while (true) {
@@ -1867,7 +1870,7 @@
     _assertNthStatementDoesNotExit(source, 0);
   }
 
-  void test_whileStatement_breakWithLabel_afterExiting() {
+  test_whileStatement_breakWithLabel_afterExiting() async {
     Source source = addSource(r'''
 void f() {
   x: while (true) {
@@ -1881,7 +1884,7 @@
     _assertNthStatementExits(source, 0);
   }
 
-  void test_whileStatement_switchWithBreakWithLabel() {
+  test_whileStatement_switchWithBreakWithLabel() async {
     Source source = addSource(r'''
 void f() {
   x: while (true) {
@@ -1895,7 +1898,7 @@
     _assertNthStatementDoesNotExit(source, 0);
   }
 
-  void test_yieldStatement_plain() {
+  test_yieldStatement_plain() async {
     Source source = addSource(r'''
 void f() sync* {
   yield 1;
@@ -1904,7 +1907,7 @@
     _assertNthStatementDoesNotExit(source, 0);
   }
 
-  void test_yieldStatement_star_plain() {
+  test_yieldStatement_star_plain() async {
     Source source = addSource(r'''
 void f() sync* {
   yield* 1;
@@ -1913,7 +1916,7 @@
     _assertNthStatementDoesNotExit(source, 0);
   }
 
-  void test_yieldStatement_star_throw() {
+  test_yieldStatement_star_throw() async {
     Source source = addSource(r'''
 void f() sync* {
   yield* throw '';
@@ -1922,7 +1925,7 @@
     _assertNthStatementExits(source, 0);
   }
 
-  void test_yieldStatement_throw() {
+  test_yieldStatement_throw() async {
     Source source = addSource(r'''
 void f() sync* {
   yield throw '';
@@ -1955,7 +1958,7 @@
 
 @reflectiveTest
 class FileBasedSourceTest {
-  void test_equals_false_differentFiles() {
+  test_equals_false_differentFiles() async {
     JavaFile file1 = FileUtilities2.createFile("/does/not/exist1.dart");
     JavaFile file2 = FileUtilities2.createFile("/does/not/exist2.dart");
     FileBasedSource source1 = new FileBasedSource(file1);
@@ -1963,13 +1966,13 @@
     expect(source1 == source2, isFalse);
   }
 
-  void test_equals_false_null() {
+  test_equals_false_null() async {
     JavaFile file = FileUtilities2.createFile("/does/not/exist1.dart");
     FileBasedSource source1 = new FileBasedSource(file);
     expect(source1 == null, isFalse);
   }
 
-  void test_equals_true() {
+  test_equals_true() async {
     JavaFile file1 = FileUtilities2.createFile("/does/not/exist.dart");
     JavaFile file2 = FileUtilities2.createFile("/does/not/exist.dart");
     FileBasedSource source1 = new FileBasedSource(file1);
@@ -1977,7 +1980,7 @@
     expect(source1 == source2, isTrue);
   }
 
-  void test_fileReadMode() {
+  test_fileReadMode() async {
     expect(FileBasedSource.fileReadMode('a'), 'a');
     expect(FileBasedSource.fileReadMode('a\n'), 'a\n');
     expect(FileBasedSource.fileReadMode('ab'), 'ab');
@@ -1987,7 +1990,7 @@
     expect(FileBasedSource.fileReadMode('a\r\nb'), 'a\r\nb');
   }
 
-  void test_fileReadMode_changed() {
+  test_fileReadMode_changed() async {
     FileBasedSource.fileReadMode = (String s) => s + 'xyz';
     expect(FileBasedSource.fileReadMode('a'), 'axyz');
     expect(FileBasedSource.fileReadMode('a\n'), 'a\nxyz');
@@ -1996,7 +1999,7 @@
     FileBasedSource.fileReadMode = (String s) => s;
   }
 
-  void test_fileReadMode_normalize_eol_always() {
+  test_fileReadMode_normalize_eol_always() async {
     FileBasedSource.fileReadMode =
         PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS;
     expect(FileBasedSource.fileReadMode('a'), 'a');
@@ -2019,7 +2022,7 @@
     FileBasedSource.fileReadMode = (String s) => s;
   }
 
-  void test_getEncoding() {
+  test_getEncoding() async {
     SourceFactory factory = new SourceFactory(
         [new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)]);
     String fullPath = "/does/not/exist.dart";
@@ -2028,20 +2031,20 @@
     expect(factory.fromEncoding(source.encoding), source);
   }
 
-  void test_getFullName() {
+  test_getFullName() async {
     String fullPath = "/does/not/exist.dart";
     JavaFile file = FileUtilities2.createFile(fullPath);
     FileBasedSource source = new FileBasedSource(file);
     expect(source.fullName, file.getAbsolutePath());
   }
 
-  void test_getShortName() {
+  test_getShortName() async {
     JavaFile file = FileUtilities2.createFile("/does/not/exist.dart");
     FileBasedSource source = new FileBasedSource(file);
     expect(source.shortName, "exist.dart");
   }
 
-  void test_hashCode() {
+  test_hashCode() async {
     JavaFile file1 = FileUtilities2.createFile("/does/not/exist.dart");
     JavaFile file2 = FileUtilities2.createFile("/does/not/exist.dart");
     FileBasedSource source1 = new FileBasedSource(file1);
@@ -2049,7 +2052,7 @@
     expect(source2.hashCode, source1.hashCode);
   }
 
-  void test_isInSystemLibrary_contagious() {
+  test_isInSystemLibrary_contagious() async {
     DartSdk sdk = _createSdk();
     UriResolver resolver = new DartUriResolver(sdk);
     SourceFactory factory = new SourceFactory([resolver]);
@@ -2063,7 +2066,7 @@
     expect(partSource.isInSystemLibrary, isTrue);
   }
 
-  void test_isInSystemLibrary_false() {
+  test_isInSystemLibrary_false() async {
     JavaFile file = FileUtilities2.createFile("/does/not/exist.dart");
     FileBasedSource source = new FileBasedSource(file);
     expect(source, isNotNull);
@@ -2071,7 +2074,7 @@
     expect(source.isInSystemLibrary, isFalse);
   }
 
-  void test_issue14500() {
+  test_issue14500() async {
     // see https://code.google.com/p/dart/issues/detail?id=14500
     FileBasedSource source = new FileBasedSource(
         FileUtilities2.createFile("/some/packages/foo:bar.dart"));
@@ -2079,7 +2082,7 @@
     expect(source.exists(), isFalse);
   }
 
-  void test_resolveRelative_file_fileName() {
+  test_resolveRelative_file_fileName() async {
     if (OSUtilities.isWindows()) {
       // On Windows, the URI that is produced includes a drive letter,
       // which I believe is not consistent across all machines that might run
@@ -2094,7 +2097,7 @@
     expect(relative.toString(), "file:///a/b/lib.dart");
   }
 
-  void test_resolveRelative_file_filePath() {
+  test_resolveRelative_file_filePath() async {
     if (OSUtilities.isWindows()) {
       // On Windows, the URI that is produced includes a drive letter,
       // which I believe is not consistent across all machines that might run
@@ -2109,7 +2112,7 @@
     expect(relative.toString(), "file:///a/b/c/lib.dart");
   }
 
-  void test_resolveRelative_file_filePathWithParent() {
+  test_resolveRelative_file_filePathWithParent() async {
     if (OSUtilities.isWindows()) {
       // On Windows, the URI that is produced includes a drive letter, which I
       // believe is not consistent across all machines that might run this test.
@@ -2123,7 +2126,7 @@
     expect(relative.toString(), "file:///a/c/lib.dart");
   }
 
-  void test_system() {
+  test_system() async {
     JavaFile file = FileUtilities2.createFile("/does/not/exist.dart");
     FileBasedSource source = new FileBasedSource(file, Uri.parse("dart:core"));
     expect(source, isNotNull);
@@ -2134,44 +2137,44 @@
 
 @reflectiveTest
 class ResolveRelativeUriTest {
-  void test_resolveRelative_dart_dartUri() {
+  test_resolveRelative_dart_dartUri() async {
     _assertResolve('dart:foo', 'dart:bar', 'dart:bar');
   }
 
-  void test_resolveRelative_dart_fileName() {
+  test_resolveRelative_dart_fileName() async {
     _assertResolve('dart:test', 'lib.dart', 'dart:test/lib.dart');
   }
 
-  void test_resolveRelative_dart_filePath() {
+  test_resolveRelative_dart_filePath() async {
     _assertResolve('dart:test', 'c/lib.dart', 'dart:test/c/lib.dart');
   }
 
-  void test_resolveRelative_dart_filePathWithParent() {
+  test_resolveRelative_dart_filePathWithParent() async {
     _assertResolve(
         'dart:test/b/test.dart', '../c/lib.dart', 'dart:test/c/lib.dart');
   }
 
-  void test_resolveRelative_package_dartUri() {
+  test_resolveRelative_package_dartUri() async {
     _assertResolve('package:foo/bar.dart', 'dart:test', 'dart:test');
   }
 
-  void test_resolveRelative_package_emptyPath() {
+  test_resolveRelative_package_emptyPath() async {
     _assertResolve('package:foo/bar.dart', '', 'package:foo/bar.dart');
   }
 
-  void test_resolveRelative_package_fileName() {
+  test_resolveRelative_package_fileName() async {
     _assertResolve('package:b/test.dart', 'lib.dart', 'package:b/lib.dart');
   }
 
-  void test_resolveRelative_package_fileNameWithoutPackageName() {
+  test_resolveRelative_package_fileNameWithoutPackageName() async {
     _assertResolve('package:test.dart', 'lib.dart', 'package:lib.dart');
   }
 
-  void test_resolveRelative_package_filePath() {
+  test_resolveRelative_package_filePath() async {
     _assertResolve('package:b/test.dart', 'c/lib.dart', 'package:b/c/lib.dart');
   }
 
-  void test_resolveRelative_package_filePathWithParent() {
+  test_resolveRelative_package_filePathWithParent() async {
     _assertResolve(
         'package:a/b/test.dart', '../c/lib.dart', 'package:a/c/lib.dart');
   }
@@ -2188,7 +2191,7 @@
 @deprecated
 @reflectiveTest
 class SDKLibrariesReaderTest extends EngineTestCase {
-  void test_readFrom_dart2js() {
+  test_readFrom_dart2js() async {
     LibraryMap libraryMap = new SdkLibrariesReader(true).readFromFile(
         FileUtilities2.createFile("/libs.dart"),
         r'''
@@ -2213,14 +2216,14 @@
     expect(first.isVmLibrary, true);
   }
 
-  void test_readFrom_empty() {
+  test_readFrom_empty() async {
     LibraryMap libraryMap = new SdkLibrariesReader(false)
         .readFromFile(FileUtilities2.createFile("/libs.dart"), "");
     expect(libraryMap, isNotNull);
     expect(libraryMap.size(), 0);
   }
 
-  void test_readFrom_normal() {
+  test_readFrom_normal() async {
     LibraryMap libraryMap = new SdkLibrariesReader(false).readFromFile(
         FileUtilities2.createFile("/libs.dart"),
         r'''
@@ -2263,14 +2266,14 @@
 
 @reflectiveTest
 class UriKindTest {
-  void test_fromEncoding() {
+  test_fromEncoding() async {
     expect(UriKind.fromEncoding(0x64), same(UriKind.DART_URI));
     expect(UriKind.fromEncoding(0x66), same(UriKind.FILE_URI));
     expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI));
     expect(UriKind.fromEncoding(0x58), same(null));
   }
 
-  void test_getEncoding() {
+  test_getEncoding() async {
     expect(UriKind.DART_URI.encoding, 0x64);
     expect(UriKind.FILE_URI.encoding, 0x66);
     expect(UriKind.PACKAGE_URI.encoding, 0x70);
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
index 7fa42f2..e948278 100644
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
@@ -13,12 +13,13 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest);
+    defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest_Driver);
   });
 }
 
 @reflectiveTest
 class CheckedModeCompileTimeErrorCodeTest extends ResolverTestCase {
-  void test_fieldFormalParameterAssignableToField_extends() {
+  test_fieldFormalParameterAssignableToField_extends() async {
     // According to checked-mode type checking rules, a value of type B is
     // assignable to a field of type A, because B extends A (and hence is a
     // subtype of A).
@@ -34,12 +35,12 @@
   const C(this.a);
 }
 var v = const C(const B());''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() {
+  test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
     Source source = addSource(r'''
@@ -48,12 +49,12 @@
   const A(String this.x);
 }
 var v = const A(null);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_implements() {
+  test_fieldFormalParameterAssignableToField_implements() async {
     // According to checked-mode type checking rules, a value of type B is
     // assignable to a field of type A, because B implements A (and hence is a
     // subtype of A).
@@ -67,36 +68,36 @@
   const C(this.a);
 }
 var v = const C(const B());''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_list_dynamic() {
+  test_fieldFormalParameterAssignableToField_list_dynamic() async {
     // [1, 2, 3] has type List<dynamic>, which is a subtype of List<int>.
     Source source = addSource(r'''
 class A {
   const A(List<int> x);
 }
 var x = const A(const [1, 2, 3]);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_list_nonDynamic() {
+  test_fieldFormalParameterAssignableToField_list_nonDynamic() async {
     // <int>[1, 2, 3] has type List<int>, which is a subtype of List<num>.
     Source source = addSource(r'''
 class A {
   const A(List<num> x);
 }
 var x = const A(const <int>[1, 2, 3]);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_map_dynamic() {
+  test_fieldFormalParameterAssignableToField_map_dynamic() async {
     // {1: 2} has type Map<dynamic, dynamic>, which is a subtype of
     // Map<int, int>.
     Source source = addSource(r'''
@@ -104,12 +105,12 @@
   const A(Map<int, int> x);
 }
 var x = const A(const {1: 2});''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_map_keyDifferent() {
+  test_fieldFormalParameterAssignableToField_map_keyDifferent() async {
     // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
     // Map<num, int>.
     Source source = addSource(r'''
@@ -117,12 +118,12 @@
   const A(Map<num, int> x);
 }
 var x = const A(const <int, int>{1: 2});''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_map_valueDifferent() {
+  test_fieldFormalParameterAssignableToField_map_valueDifferent() async {
     // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
     // Map<int, num>.
     Source source = addSource(r'''
@@ -130,12 +131,12 @@
   const A(Map<int, num> x);
 }
 var x = const A(const <int, int>{1: 2});''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_notype() {
+  test_fieldFormalParameterAssignableToField_notype() async {
     // If a field is declared without a type, then any value may be assigned to
     // it.
     Source source = addSource(r'''
@@ -144,12 +145,12 @@
   const A(this.x);
 }
 var v = const A(5);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_null() {
+  test_fieldFormalParameterAssignableToField_null() async {
     // Null is assignable to anything.
     Source source = addSource(r'''
 class A {
@@ -157,12 +158,12 @@
   const A(this.x);
 }
 var v = const A(null);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_typedef() {
+  test_fieldFormalParameterAssignableToField_typedef() async {
     // foo has the runtime type dynamic -> dynamic, so it should be assignable
     // to A.f.
     Source source = addSource(r'''
@@ -173,12 +174,12 @@
 }
 foo(x) => 1;
 var v = const A(foo);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterAssignableToField_typeSubstitution() {
+  test_fieldFormalParameterAssignableToField_typeSubstitution() async {
     // foo has the runtime type dynamic -> dynamic, so it should be assignable
     // to A.f.
     Source source = addSource(r'''
@@ -187,19 +188,19 @@
   const A(this.x);
 }
 var v = const A<int>(3);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField() {
+  test_fieldFormalParameterNotAssignableToField() async {
     Source source = addSource(r'''
 class A {
   final int x;
   const A(this.x);
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -207,7 +208,7 @@
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_extends() {
+  test_fieldFormalParameterNotAssignableToField_extends() async {
     // According to checked-mode type checking rules, a value of type A is not
     // assignable to a field of type B, because B extends A (the subtyping
     // relationship is in the wrong direction).
@@ -223,21 +224,21 @@
   const C(this.b);
 }
 var v = const C(const A());''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_fieldType() {
+  test_fieldFormalParameterNotAssignableToField_fieldType() async {
     Source source = addSource(r'''
 class A {
   final int x;
   const A(String this.x);
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
@@ -245,14 +246,14 @@
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() {
+  test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() async {
     Source source = addSource(r'''
 class A {
   final Unresolved x;
   const A(String this.x);
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
@@ -260,7 +261,7 @@
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_implements() {
+  test_fieldFormalParameterNotAssignableToField_implements() async {
     // According to checked-mode type checking rules, a value of type A is not
     // assignable to a field of type B, because B implements A (the subtyping
     // relationship is in the wrong direction).
@@ -274,28 +275,28 @@
   const C(this.b);
 }
 var v = const C(const A());''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_list() {
+  test_fieldFormalParameterNotAssignableToField_list() async {
     // <num>[1, 2, 3] has type List<num>, which is not a subtype of List<int>.
     Source source = addSource(r'''
 class A {
   const A(List<int> x);
 }
 var x = const A(const <num>[1, 2, 3]);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_map_keyMismatch() {
+  test_fieldFormalParameterNotAssignableToField_map_keyMismatch() async {
     // <num, int>{1: 2} has type Map<num, int>, which is not a subtype of
     // Map<int, int>.
     Source source = addSource(r'''
@@ -303,14 +304,14 @@
   const A(Map<int, int> x);
 }
 var x = const A(const <num, int>{1: 2});''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_map_valueMismatch() {
+  test_fieldFormalParameterNotAssignableToField_map_valueMismatch() async {
     // <int, num>{1: 2} has type Map<int, num>, which is not a subtype of
     // Map<int, int>.
     Source source = addSource(r'''
@@ -318,21 +319,21 @@
   const A(Map<int, int> x);
 }
 var x = const A(const <int, num>{1: 2});''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_optional() {
+  test_fieldFormalParameterNotAssignableToField_optional() async {
     Source source = addSource(r'''
 class A {
   final int x;
   const A([this.x = 'foo']);
 }
 var v = const A();''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticTypeWarningCode.INVALID_ASSIGNMENT
@@ -340,7 +341,7 @@
     verify([source]);
   }
 
-  void test_fieldFormalParameterNotAssignableToField_typedef() {
+  test_fieldFormalParameterNotAssignableToField_typedef() async {
     // foo has the runtime type String -> int, so it should not be assignable
     // to A.f (A.f requires it to be int -> String).
     Source source = addSource(r'''
@@ -351,7 +352,7 @@
 }
 int foo(String x) => 1;
 var v = const A(foo);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -359,13 +360,13 @@
     verify([source]);
   }
 
-  void test_fieldInitializerNotAssignable() {
+  test_fieldInitializerNotAssignable() async {
     Source source = addSource(r'''
 class A {
   final int x;
   const A() : x = '';
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
       StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE
@@ -373,21 +374,21 @@
     verify([source]);
   }
 
-  void test_fieldTypeMismatch() {
+  test_fieldTypeMismatch() async {
     Source source = addSource(r'''
 class A {
   const A(x) : y = x;
   final int y;
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_fieldTypeMismatch_generic() {
+  test_fieldTypeMismatch_generic() async {
     Source source = addSource(r'''
 class C<T> {
   final T x = y;
@@ -396,7 +397,7 @@
 const int y = 1;
 var v = const C<String>();
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
       StaticTypeWarningCode.INVALID_ASSIGNMENT
@@ -404,14 +405,14 @@
     verify([source]);
   }
 
-  void test_fieldTypeMismatch_unresolved() {
+  test_fieldTypeMismatch_unresolved() async {
     Source source = addSource(r'''
 class A {
   const A(x) : y = x;
   final Unresolved y;
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
@@ -419,7 +420,7 @@
     verify([source]);
   }
 
-  void test_fieldTypeOk_generic() {
+  test_fieldTypeOk_generic() async {
     Source source = addSource(r'''
 class C<T> {
   final T x = y;
@@ -428,24 +429,24 @@
 const int y = 1;
 var v = const C<int>();
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
   }
 
-  void test_fieldTypeOk_null() {
+  test_fieldTypeOk_null() async {
     Source source = addSource(r'''
 class A {
   const A(x) : y = x;
   final int y;
 }
 var v = const A(null);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_fieldTypeOk_unresolved_null() {
+  test_fieldTypeOk_unresolved_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
     Source source = addSource(r'''
@@ -454,14 +455,14 @@
   final Unresolved y;
 }
 var v = const A(null);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
     verify([source]);
   }
 
-  void test_listElementTypeNotAssignable() {
+  test_listElementTypeNotAssignable() async {
     Source source = addSource("var v = const <String> [42];");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
       StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
@@ -469,9 +470,9 @@
     verify([source]);
   }
 
-  void test_mapKeyTypeNotAssignable() {
+  test_mapKeyTypeNotAssignable() async {
     Source source = addSource("var v = const <String, int > {1 : 2};");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
       StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE
@@ -479,9 +480,9 @@
     verify([source]);
   }
 
-  void test_mapValueTypeNotAssignable() {
+  test_mapValueTypeNotAssignable() async {
     Source source = addSource("var v = const <String, String> {'a' : 2};");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
       StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE
@@ -489,30 +490,30 @@
     verify([source]);
   }
 
-  void test_parameterAssignable_null() {
+  test_parameterAssignable_null() async {
     // Null is assignable to anything.
     Source source = addSource(r'''
 class A {
   const A(int x);
 }
 var v = const A(null);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_parameterAssignable_typeSubstitution() {
+  test_parameterAssignable_typeSubstitution() async {
     Source source = addSource(r'''
 class A<T> {
   const A(T x);
 }
 var v = const A<int>(3);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_parameterAssignable_undefined_null() {
+  test_parameterAssignable_undefined_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
     Source source = addSource(r'''
@@ -520,18 +521,18 @@
   const A(Unresolved x);
 }
 var v = const A(null);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
     verify([source]);
   }
 
-  void test_parameterNotAssignable() {
+  test_parameterNotAssignable() async {
     Source source = addSource(r'''
 class A {
   const A(int x);
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -539,13 +540,13 @@
     verify([source]);
   }
 
-  void test_parameterNotAssignable_typeSubstitution() {
+  test_parameterNotAssignable_typeSubstitution() async {
     Source source = addSource(r'''
 class A<T> {
   const A(T x);
 }
 var v = const A<int>('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -553,13 +554,13 @@
     verify([source]);
   }
 
-  void test_parameterNotAssignable_undefined() {
+  test_parameterNotAssignable_undefined() async {
     Source source = addSource(r'''
 class A {
   const A(Unresolved x);
 }
 var v = const A('foo');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
@@ -567,39 +568,39 @@
     verify([source]);
   }
 
-  void test_redirectingConstructor_paramTypeMismatch() {
+  test_redirectingConstructor_paramTypeMismatch() async {
     Source source = addSource(r'''
 class A {
   const A.a1(x) : this.a2(x);
   const A.a2(String x);
 }
 var v = const A.a1(0);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
     ]);
     verify([source]);
   }
 
-  void test_topLevelVarAssignable_null() {
+  test_topLevelVarAssignable_null() async {
     Source source = addSource("const int x = null;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_topLevelVarAssignable_undefined_null() {
+  test_topLevelVarAssignable_undefined_null() async {
     // Null always passes runtime type checks, even when the type is
     // unresolved.
     Source source = addSource("const Unresolved x = null;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
     verify([source]);
   }
 
-  void test_topLevelVarNotAssignable() {
+  test_topLevelVarNotAssignable() async {
     Source source = addSource("const int x = 'foo';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
       StaticTypeWarningCode.INVALID_ASSIGNMENT
@@ -607,9 +608,9 @@
     verify([source]);
   }
 
-  void test_topLevelVarNotAssignable_undefined() {
+  test_topLevelVarNotAssignable_undefined() async {
     Source source = addSource("const Unresolved x = 'foo';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
       StaticWarningCode.UNDEFINED_CLASS
@@ -617,3 +618,10 @@
     verify([source]);
   }
 }
+
+@reflectiveTest
+class CheckedModeCompileTimeErrorCodeTest_Driver
+    extends CheckedModeCompileTimeErrorCodeTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart
new file mode 100644
index 0000000..96200ce
--- /dev/null
+++ b/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart
@@ -0,0 +1,104 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'compile_time_error_code_test.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CompileTimeErrorCodeTest_Driver);
+  });
+}
+
+@reflectiveTest
+class CompileTimeErrorCodeTest_Driver extends CompileTimeErrorCodeTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  @failingTest
+  @override
+  test_exportOfNonLibrary() {
+    return super.test_exportOfNonLibrary();
+  }
+
+  @failingTest
+  @override
+  test_fieldInitializerOutsideConstructor_inFunctionTypeParameter() {
+    return super
+        .test_fieldInitializerOutsideConstructor_inFunctionTypeParameter();
+  }
+
+  @failingTest
+  @override
+  test_fromEnvironment_bool_badDefault_whenDefined() {
+    return super.test_fromEnvironment_bool_badDefault_whenDefined();
+  }
+
+  @failingTest
+  @override
+  test_importOfNonLibrary() {
+    return super.test_importOfNonLibrary();
+  }
+
+  @failingTest
+  @override
+  test_nonConstValueInInitializer_assert_condition() {
+    return super.test_nonConstValueInInitializer_assert_condition();
+  }
+
+  @failingTest
+  @override
+  test_nonConstValueInInitializer_assert_message() {
+    return super.test_nonConstValueInInitializer_assert_message();
+  }
+
+  @failingTest
+  @override
+  test_prefixCollidesWithTopLevelMembers_functionTypeAlias() {
+    return super.test_prefixCollidesWithTopLevelMembers_functionTypeAlias();
+  }
+
+  @failingTest
+  @override
+  test_prefixCollidesWithTopLevelMembers_topLevelFunction() {
+    return super.test_prefixCollidesWithTopLevelMembers_topLevelFunction();
+  }
+
+  @failingTest
+  @override
+  test_prefixCollidesWithTopLevelMembers_topLevelVariable() {
+    return super.test_prefixCollidesWithTopLevelMembers_topLevelVariable();
+  }
+
+  @failingTest
+  @override
+  test_prefixCollidesWithTopLevelMembers_type() {
+    return super.test_prefixCollidesWithTopLevelMembers_type();
+  }
+
+  @failingTest
+  @override
+  test_typeAliasCannotReferenceItself_typeVariableBounds() {
+    return super.test_typeAliasCannotReferenceItself_typeVariableBounds();
+  }
+
+  @failingTest
+  @override
+  test_uriDoesNotExist_import_appears_after_deleting_target() {
+    return super.test_uriDoesNotExist_import_appears_after_deleting_target();
+  }
+
+  @failingTest
+  @override
+  test_uriDoesNotExist_import_disappears_when_fixed() {
+    return super.test_uriDoesNotExist_import_disappears_when_fixed();
+  }
+
+  @failingTest
+  @override
+  test_uriWithInterpolation_nonConstant() {
+    return super.test_uriWithInterpolation_nonConstant();
+  }
+}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 098ff94..b3e4254 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -4,6 +4,8 @@
 
 library analyzer.test.generated.compile_time_error_code_test;
 
+import 'dart:async';
+
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -22,7 +24,7 @@
 
 @reflectiveTest
 class CompileTimeErrorCodeTest extends ResolverTestCase {
-  void fail_awaitInWrongContext_sync() {
+  fail_awaitInWrongContext_sync() async {
     // This test requires better error recovery than we currently have. In
     // particular, we need to be able to distinguish between an await expression
     // in the wrong context, and the use of 'await' as an identifier.
@@ -30,12 +32,12 @@
 f(x) {
   return await x;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
     verify([source]);
   }
 
-  void fail_awaitInWrongContext_syncStar() {
+  fail_awaitInWrongContext_syncStar() async {
     // This test requires better error recovery than we currently have. In
     // particular, we need to be able to distinguish between an await expression
     // in the wrong context, and the use of 'await' as an identifier.
@@ -43,24 +45,24 @@
 f(x) sync* {
   yield await x;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
     verify([source]);
   }
 
-  void fail_constEvalThrowsException() {
+  fail_constEvalThrowsException() async {
     Source source = addSource(r'''
 class C {
   const C();
 }
 f() { return const C(); }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION]);
     verify([source]);
   }
 
-  void fail_invalidIdentifierInAsync_async() {
+  fail_invalidIdentifierInAsync_async() async {
     // TODO(brianwilkerson) Report this error.
     Source source = addSource(r'''
 class A {
@@ -68,12 +70,12 @@
     int async;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
     verify([source]);
   }
 
-  void fail_invalidIdentifierInAsync_await() {
+  fail_invalidIdentifierInAsync_await() async {
     // TODO(brianwilkerson) Report this error.
     Source source = addSource(r'''
 class A {
@@ -81,12 +83,12 @@
     int await;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
     verify([source]);
   }
 
-  void fail_invalidIdentifierInAsync_yield() {
+  fail_invalidIdentifierInAsync_yield() async {
     // TODO(brianwilkerson) Report this error.
     Source source = addSource(r'''
 class A {
@@ -94,109 +96,109 @@
     int yield;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
     verify([source]);
   }
 
-  void fail_mixinDeclaresConstructor() {
+  fail_mixinDeclaresConstructor() async {
     Source source = addSource(r'''
 class A {
   A() {}
 }
 class B extends Object mixin A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void fail_mixinOfNonClass() {
+  fail_mixinOfNonClass() async {
     // TODO(brianwilkerson) Compare with MIXIN_WITH_NON_CLASS_SUPERCLASS.
     Source source = addSource(r'''
 var A;
 class B extends Object mixin A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
     verify([source]);
   }
 
-  void fail_objectCannotExtendAnotherClass() {
+  fail_objectCannotExtendAnotherClass() async {
     Source source = addSource(r'''
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS]);
     verify([source]);
   }
 
-  void fail_superInitializerInObject() {
+  fail_superInitializerInObject() async {
     Source source = addSource(r'''
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT]);
     verify([source]);
   }
 
-  void fail_yieldEachInNonGenerator_async() {
+  fail_yieldEachInNonGenerator_async() async {
     // TODO(brianwilkerson) We are currently parsing the yield statement as a
     // binary expression.
     Source source = addSource(r'''
 f() async {
   yield* 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
     verify([source]);
   }
 
-  void fail_yieldEachInNonGenerator_sync() {
+  fail_yieldEachInNonGenerator_sync() async {
     // TODO(brianwilkerson) We are currently parsing the yield statement as a
     // binary expression.
     Source source = addSource(r'''
 f() {
   yield* 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
     verify([source]);
   }
 
-  void fail_yieldInNonGenerator_async() {
+  fail_yieldInNonGenerator_async() async {
     // TODO(brianwilkerson) We are currently trying to parse the yield statement
     // as a binary expression.
     Source source = addSource(r'''
 f() async {
   yield 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
     verify([source]);
   }
 
-  void fail_yieldInNonGenerator_sync() {
+  fail_yieldInNonGenerator_sync() async {
     // TODO(brianwilkerson) We are currently trying to parse the yield statement
     // as a binary expression.
     Source source = addSource(r'''
 f() {
   yield 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
     verify([source]);
   }
 
-  void test_accessPrivateEnumField() {
+  test_accessPrivateEnumField() async {
     Source source = addSource(r'''
 enum E { ONE }
 String name(E e) {
   return e._name;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD]);
     // Cannot verify because "_name" cannot be resolved.
   }
 
-  void test_ambiguousExport() {
+  test_ambiguousExport() async {
     Source source = addSource(r'''
 library L;
 export 'lib1.dart';
@@ -211,12 +213,12 @@
         r'''
 library lib2;
 class N {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.AMBIGUOUS_EXPORT]);
     verify([source]);
   }
 
-  void test_annotationWithNotClass() {
+  test_annotationWithNotClass() async {
     Source source = addSource('''
 class Property {
   final int value;
@@ -229,12 +231,12 @@
 main() {
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
     verify([source]);
   }
 
-  void test_annotationWithNotClass_prefixed() {
+  test_annotationWithNotClass_prefixed() async {
     addNamedSource(
         "/annotations.dart",
         r'''
@@ -251,12 +253,12 @@
 main() {
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_annotation() {
+  test_async_used_as_identifier_in_annotation() async {
     Source source = addSource('''
 const int async = 0;
 f() async {
@@ -264,12 +266,12 @@
   g(0);
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_argument_label() {
+  test_async_used_as_identifier_in_argument_label() async {
     Source source = addSource('''
 @proxy
 class C {}
@@ -277,35 +279,35 @@
   new C().g(async: 0);
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     // Note: we don't call verify([source]) because verify() doesn't understand
     // about @proxy.
   }
 
-  void test_async_used_as_identifier_in_async_method() {
+  test_async_used_as_identifier_in_async_method() async {
     Source source = addSource('''
 f() async {
   var async = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_async_star_method() {
+  test_async_used_as_identifier_in_async_star_method() async {
     Source source = addSource('''
 f() async* {
   var async = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_break_statement() {
+  test_async_used_as_identifier_in_break_statement() async {
     Source source = addSource('''
 f() async {
   while (true) {
@@ -313,7 +315,7 @@
   }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
       CompileTimeErrorCode.LABEL_UNDEFINED
@@ -322,7 +324,7 @@
     // "async" label is unresolved.
   }
 
-  void test_async_used_as_identifier_in_cascaded_invocation() {
+  test_async_used_as_identifier_in_cascaded_invocation() async {
     Source source = addSource('''
 class C {
   int async() => 1;
@@ -331,12 +333,12 @@
   return new C()..async();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_cascaded_setter_invocation() {
+  test_async_used_as_identifier_in_cascaded_setter_invocation() async {
     Source source = addSource('''
 class C {
   void set async(int i) {}
@@ -345,12 +347,12 @@
   return new C()..async = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_catch_exception_argument() {
+  test_async_used_as_identifier_in_catch_exception_argument() async {
     Source source = addSource('''
 g() {}
 f() async {
@@ -359,12 +361,12 @@
   } catch (async) { }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_catch_stacktrace_argument() {
+  test_async_used_as_identifier_in_catch_stacktrace_argument() async {
     Source source = addSource('''
 g() {}
 f() async {
@@ -373,12 +375,12 @@
   } catch (e, async) { }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_continue_statement() {
+  test_async_used_as_identifier_in_continue_statement() async {
     Source source = addSource('''
 f() async {
   while (true) {
@@ -386,7 +388,7 @@
   }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
       CompileTimeErrorCode.LABEL_UNDEFINED
@@ -395,31 +397,31 @@
     // "async" label is unresolved.
   }
 
-  void test_async_used_as_identifier_in_for_statement() {
+  test_async_used_as_identifier_in_for_statement() async {
     Source source = addSource('''
 var async;
 f() async {
   for (async in []) {}
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_formal_parameter_name() {
+  test_async_used_as_identifier_in_formal_parameter_name() async {
     Source source = addSource('''
 f() async {
   g(int async) {}
   g(0);
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_getter_name() {
+  test_async_used_as_identifier_in_getter_name() async {
     Source source = addSource('''
 class C {
   int get async => 1;
@@ -428,12 +430,12 @@
   return new C().async;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_invocation() {
+  test_async_used_as_identifier_in_invocation() async {
     Source source = addSource('''
 class C {
   int async() => 1;
@@ -442,35 +444,35 @@
   return new C().async();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_local_function_name() {
+  test_async_used_as_identifier_in_local_function_name() async {
     Source source = addSource('''
 f() async {
   int async() => null;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_prefix() {
+  test_async_used_as_identifier_in_prefix() async {
     Source source = addSource('''
 import 'dart:async' as async;
 f() async {
   return new async.Future.value(0);
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_setter_name() {
+  test_async_used_as_identifier_in_setter_name() async {
     Source source = addSource('''
 class C {
   void set async(int i) {}
@@ -479,36 +481,36 @@
   new C().async = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_statement_label() {
+  test_async_used_as_identifier_in_statement_label() async {
     Source source = addSource('''
 f() async {
   async: g();
 }
 g() {}
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_string_interpolation() {
+  test_async_used_as_identifier_in_string_interpolation() async {
     Source source = addSource(r'''
 int async = 1;
 f() async {
   return "$async";
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_suffix() {
+  test_async_used_as_identifier_in_suffix() async {
     addNamedSource(
         "/lib1.dart",
         r'''
@@ -521,12 +523,12 @@
   return l.async;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_switch_label() {
+  test_async_used_as_identifier_in_switch_label() async {
     Source source = addSource('''
 f() async {
   switch (0) {
@@ -534,67 +536,67 @@
   }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_async_used_as_identifier_in_sync_star_method() {
+  test_async_used_as_identifier_in_sync_star_method() async {
     Source source = addSource('''
 f() sync* {
   var async = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_asyncForInWrongContext() {
+  test_asyncForInWrongContext() async {
     Source source = addSource(r'''
 f(list) {
   await for (var e in list) {
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT]);
     verify([source]);
   }
 
-  void test_await_used_as_identifier_in_async_method() {
+  test_await_used_as_identifier_in_async_method() async {
     Source source = addSource('''
 f() async {
   var await = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_await_used_as_identifier_in_async_star_method() {
+  test_await_used_as_identifier_in_async_star_method() async {
     Source source = addSource('''
 f() async* {
   var await = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_await_used_as_identifier_in_sync_star_method() {
+  test_await_used_as_identifier_in_sync_star_method() async {
     Source source = addSource('''
 f() sync* {
   var await = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_bug_23176() {
+  test_bug_23176() async {
     Source source = addSource('''
 class A {
   const A([x]);
@@ -603,7 +605,7 @@
   dynamic @A(const A()) x;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       ParserErrorCode.EXPECTED_CLASS_MEMBER,
       ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
@@ -611,72 +613,72 @@
     verify([source]);
   }
 
-  void test_builtInIdentifierAsMixinName_classTypeAlias() {
+  test_builtInIdentifierAsMixinName_classTypeAlias() async {
     Source source = addSource(r'''
 class A {}
 class B {}
 class as = A with B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
     verify([source]);
   }
 
-  void test_builtInIdentifierAsType_formalParameter_field() {
+  test_builtInIdentifierAsType_formalParameter_field() async {
     Source source = addSource(r'''
 class A {
   var x;
   A(static this.x);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
     verify([source]);
   }
 
-  void test_builtInIdentifierAsType_formalParameter_simple() {
+  test_builtInIdentifierAsType_formalParameter_simple() async {
     Source source = addSource(r'''
 f(static x) {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
     verify([source]);
   }
 
-  void test_builtInIdentifierAsType_variableDeclaration() {
+  test_builtInIdentifierAsType_variableDeclaration() async {
     Source source = addSource(r'''
 f() {
   typedef x;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
     verify([source]);
   }
 
-  void test_builtInIdentifierAsTypedefName_functionTypeAlias() {
+  test_builtInIdentifierAsTypedefName_functionTypeAlias() async {
     Source source = addSource("typedef bool as();");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
     verify([source]);
   }
 
-  void test_builtInIdentifierAsTypeName() {
+  test_builtInIdentifierAsTypeName() async {
     Source source = addSource("class as {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
     verify([source]);
   }
 
-  void test_builtInIdentifierAsTypeParameterName() {
+  test_builtInIdentifierAsTypeParameterName() async {
     Source source = addSource("class A<as> {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME]);
     verify([source]);
   }
 
-  void test_caseExpressionTypeImplementsEquals() {
+  test_caseExpressionTypeImplementsEquals() async {
     Source source = addSource(r'''
 class IntWrapper {
   final int value;
@@ -693,37 +695,37 @@
     default: return 0;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
     verify([source]);
   }
 
-  void test_conflictingConstructorNameAndMember_field() {
+  test_conflictingConstructorNameAndMember_field() async {
     Source source = addSource(r'''
 class A {
   int x;
   A.x() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD]);
     verify([source]);
   }
 
-  void test_conflictingConstructorNameAndMember_method() {
+  test_conflictingConstructorNameAndMember_method() async {
     Source source = addSource(r'''
 class A {
   const A.x();
   void x() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD]);
     verify([source]);
   }
 
-  void test_conflictingGetterAndMethod_field_method() {
+  test_conflictingGetterAndMethod_field_method() async {
     Source source = addSource(r'''
 class A {
   final int m = 0;
@@ -731,12 +733,12 @@
 class B extends A {
   m() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
     verify([source]);
   }
 
-  void test_conflictingGetterAndMethod_getter_method() {
+  test_conflictingGetterAndMethod_getter_method() async {
     Source source = addSource(r'''
 class A {
   get m => 0;
@@ -744,12 +746,12 @@
 class B extends A {
   m() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
     verify([source]);
   }
 
-  void test_conflictingGetterAndMethod_method_field() {
+  test_conflictingGetterAndMethod_method_field() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -757,12 +759,12 @@
 class B extends A {
   int m;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
     verify([source]);
   }
 
-  void test_conflictingGetterAndMethod_method_getter() {
+  test_conflictingGetterAndMethod_method_getter() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -770,77 +772,77 @@
 class B extends A {
   get m => 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
     verify([source]);
   }
 
-  void test_conflictingTypeVariableAndClass() {
+  test_conflictingTypeVariableAndClass() async {
     Source source = addSource(r'''
 class T<T> {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS]);
     verify([source]);
   }
 
-  void test_conflictingTypeVariableAndMember_field() {
+  test_conflictingTypeVariableAndMember_field() async {
     Source source = addSource(r'''
 class A<T> {
   var T;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
     verify([source]);
   }
 
-  void test_conflictingTypeVariableAndMember_getter() {
+  test_conflictingTypeVariableAndMember_getter() async {
     Source source = addSource(r'''
 class A<T> {
   get T => null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
     verify([source]);
   }
 
-  void test_conflictingTypeVariableAndMember_method() {
+  test_conflictingTypeVariableAndMember_method() async {
     Source source = addSource(r'''
 class A<T> {
   T() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
     verify([source]);
   }
 
-  void test_conflictingTypeVariableAndMember_method_static() {
+  test_conflictingTypeVariableAndMember_method_static() async {
     Source source = addSource(r'''
 class A<T> {
   static T() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
     verify([source]);
   }
 
-  void test_conflictingTypeVariableAndMember_setter() {
+  test_conflictingTypeVariableAndMember_setter() async {
     Source source = addSource(r'''
 class A<T> {
   set T(x) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
     verify([source]);
   }
 
-  void test_consistentCaseExpressionTypes_dynamic() {
+  test_consistentCaseExpressionTypes_dynamic() async {
     // Even though A.S and S have a static type of "dynamic", we should see
     // that they match 'abc', because they are constant strings.
     Source source = addSource(r'''
@@ -860,12 +862,12 @@
       break;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_constConstructorWithFieldInitializedByNonConst() {
+  test_constConstructorWithFieldInitializedByNonConst() async {
     Source source = addSource(r'''
 class A {
   final int i = f();
@@ -874,9 +876,9 @@
 int f() {
   return 3;
 }''');
-    computeLibrarySourceErrors(source);
     // TODO(paulberry): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
     // redundant and ought to be suppressed.
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode
           .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
@@ -885,7 +887,7 @@
     verify([source]);
   }
 
-  void test_constConstructorWithFieldInitializedByNonConst_static() {
+  test_constConstructorWithFieldInitializedByNonConst_static() async {
     Source source = addSource(r'''
 class A {
   static final int i = f();
@@ -894,24 +896,24 @@
 int f() {
   return 3;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_constConstructorWithMixin() {
+  test_constConstructorWithMixin() async {
     Source source = addSource(r'''
 class M {
 }
 class A extends Object with M {
   const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN]);
     verify([source]);
   }
 
-  void test_constConstructorWithNonConstSuper_explicit() {
+  test_constConstructorWithNonConstSuper_explicit() async {
     Source source = addSource(r'''
 class A {
   A();
@@ -919,13 +921,13 @@
 class B extends A {
   const B(): super();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
     verify([source]);
   }
 
-  void test_constConstructorWithNonConstSuper_implicit() {
+  test_constConstructorWithNonConstSuper_implicit() async {
     Source source = addSource(r'''
 class A {
   A();
@@ -933,13 +935,13 @@
 class B extends A {
   const B();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
     verify([source]);
   }
 
-  void test_constConstructorWithNonFinalField_mixin() {
+  test_constConstructorWithNonFinalField_mixin() async {
     Source source = addSource(r'''
 class A {
   var a;
@@ -947,7 +949,7 @@
 class B extends Object with A {
   const B();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
@@ -955,7 +957,7 @@
     verify([source]);
   }
 
-  void test_constConstructorWithNonFinalField_super() {
+  test_constConstructorWithNonFinalField_super() async {
     Source source = addSource(r'''
 class A {
   var a;
@@ -963,7 +965,7 @@
 class B extends A {
   const B();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER
@@ -971,20 +973,20 @@
     verify([source]);
   }
 
-  void test_constConstructorWithNonFinalField_this() {
+  test_constConstructorWithNonFinalField_this() async {
     Source source = addSource(r'''
 class A {
   int x;
   const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
     verify([source]);
   }
 
-  void test_constDeferredClass() {
-    resolveWithErrors(<String>[
+  test_constDeferredClass() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {
@@ -1001,8 +1003,8 @@
     ]);
   }
 
-  void test_constDeferredClass_namedConstructor() {
-    resolveWithErrors(<String>[
+  test_constDeferredClass_namedConstructor() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {
@@ -1019,19 +1021,19 @@
     ]);
   }
 
-  void test_constEval_newInstance_constConstructor() {
+  test_constEval_newInstance_constConstructor() async {
     Source source = addSource(r'''
 class A {
   const A();
 }
 const a = new A();''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
 
-  void test_constEval_newInstance_externalFactoryConstConstructor() {
+  test_constEval_newInstance_externalFactoryConstConstructor() async {
     // We can't evaluate "const A()" because its constructor is external.  But
     // the code is correct--we shouldn't report an error.
     Source source = addSource(r'''
@@ -1039,12 +1041,12 @@
   external factory const A();
 }
 const x = const A();''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_constEval_nonStaticField_inGenericClass() {
+  test_constEval_nonStaticField_inGenericClass() async {
     Source source = addSource('''
 class C<T> {
   const C();
@@ -1052,13 +1054,13 @@
 }
 
 const x = const C().t;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
 
-  void test_constEval_propertyExtraction_targetNotConst() {
+  test_constEval_propertyExtraction_targetNotConst() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -1066,30 +1068,30 @@
 }
 final a = const A();
 const C = a.m;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
 
-  void test_constEvalThrowsException_binaryMinus_null() {
-    _check_constEvalThrowsException_binary_null("null - 5", false);
-    _check_constEvalThrowsException_binary_null("5 - null", true);
+  test_constEvalThrowsException_binaryMinus_null() async {
+    await _check_constEvalThrowsException_binary_null("null - 5", false);
+    await _check_constEvalThrowsException_binary_null("5 - null", true);
   }
 
-  void test_constEvalThrowsException_binaryPlus_null() {
-    _check_constEvalThrowsException_binary_null("null + 5", false);
-    _check_constEvalThrowsException_binary_null("5 + null", true);
+  test_constEvalThrowsException_binaryPlus_null() async {
+    await _check_constEvalThrowsException_binary_null("null + 5", false);
+    await _check_constEvalThrowsException_binary_null("5 + null", true);
   }
 
-  void test_constEvalThrowsException_divisionByZero() {
+  test_constEvalThrowsException_divisionByZero() async {
     Source source = addSource("const C = 1 ~/ 0;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE]);
     verify([source]);
   }
 
-  void test_constEvalThrowsException_finalAlreadySet_initializer() {
+  test_constEvalThrowsException_finalAlreadySet_initializer() async {
     // If a final variable has an initializer at the site of its declaration,
     // and at the site of the constructor, then invoking that constructor would
     // produce a runtime error; hence invoking that constructor via the "const"
@@ -1101,7 +1103,7 @@
 }
 var x = const C();
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
@@ -1109,7 +1111,7 @@
     verify([source]);
   }
 
-  void test_constEvalThrowsException_finalAlreadySet_initializing_formal() {
+  test_constEvalThrowsException_finalAlreadySet_initializing_formal() async {
     // If a final variable has an initializer at the site of its declaration,
     // and it is initialized using an initializing formal at the site of the
     // constructor, then invoking that constructor would produce a runtime
@@ -1122,7 +1124,7 @@
 }
 var x = const C(2);
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
@@ -1130,35 +1132,35 @@
     verify([source]);
   }
 
-  void test_constEvalThrowsException_unaryBitNot_null() {
+  test_constEvalThrowsException_unaryBitNot_null() async {
     Source source = addSource("const C = ~null;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
     // no verify(), '~null' is not resolved
   }
 
-  void test_constEvalThrowsException_unaryNegated_null() {
+  test_constEvalThrowsException_unaryNegated_null() async {
     Source source = addSource("const C = -null;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
     // no verify(), '-null' is not resolved
   }
 
-  void test_constEvalThrowsException_unaryNot_null() {
+  test_constEvalThrowsException_unaryNot_null() async {
     Source source = addSource("const C = !null;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
     verify([source]);
   }
 
-  void test_constEvalTypeBool_binary() {
-    _check_constEvalTypeBool_withParameter_binary("p && ''");
-    _check_constEvalTypeBool_withParameter_binary("p || ''");
+  test_constEvalTypeBool_binary() async {
+    await _check_constEvalTypeBool_withParameter_binary("p && ''");
+    await _check_constEvalTypeBool_withParameter_binary("p || ''");
   }
 
-  void test_constEvalTypeBool_binary_leftTrue() {
+  test_constEvalTypeBool_binary_leftTrue() async {
     Source source = addSource("const C = (true || 0);");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
       StaticTypeWarningCode.NON_BOOL_OPERAND,
@@ -1167,7 +1169,7 @@
     verify([source]);
   }
 
-  void test_constEvalTypeBoolNumString_equal() {
+  test_constEvalTypeBoolNumString_equal() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -1176,13 +1178,13 @@
   final a;
   const B(num p) : a = p == const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
     verify([source]);
   }
 
-  void test_constEvalTypeBoolNumString_notEqual() {
+  test_constEvalTypeBoolNumString_notEqual() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -1191,63 +1193,63 @@
   final a;
   const B(String p) : a = p != const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
     verify([source]);
   }
 
-  void test_constEvalTypeInt_binary() {
-    _check_constEvalTypeInt_withParameter_binary("p ^ ''");
-    _check_constEvalTypeInt_withParameter_binary("p & ''");
-    _check_constEvalTypeInt_withParameter_binary("p | ''");
-    _check_constEvalTypeInt_withParameter_binary("p >> ''");
-    _check_constEvalTypeInt_withParameter_binary("p << ''");
+  test_constEvalTypeInt_binary() async {
+    await _check_constEvalTypeInt_withParameter_binary("p ^ ''");
+    await _check_constEvalTypeInt_withParameter_binary("p & ''");
+    await _check_constEvalTypeInt_withParameter_binary("p | ''");
+    await _check_constEvalTypeInt_withParameter_binary("p >> ''");
+    await _check_constEvalTypeInt_withParameter_binary("p << ''");
   }
 
-  void test_constEvalTypeNum_binary() {
-    _check_constEvalTypeNum_withParameter_binary("p + ''");
-    _check_constEvalTypeNum_withParameter_binary("p - ''");
-    _check_constEvalTypeNum_withParameter_binary("p * ''");
-    _check_constEvalTypeNum_withParameter_binary("p / ''");
-    _check_constEvalTypeNum_withParameter_binary("p ~/ ''");
-    _check_constEvalTypeNum_withParameter_binary("p > ''");
-    _check_constEvalTypeNum_withParameter_binary("p < ''");
-    _check_constEvalTypeNum_withParameter_binary("p >= ''");
-    _check_constEvalTypeNum_withParameter_binary("p <= ''");
-    _check_constEvalTypeNum_withParameter_binary("p % ''");
+  test_constEvalTypeNum_binary() async {
+    await _check_constEvalTypeNum_withParameter_binary("p + ''");
+    await _check_constEvalTypeNum_withParameter_binary("p - ''");
+    await _check_constEvalTypeNum_withParameter_binary("p * ''");
+    await _check_constEvalTypeNum_withParameter_binary("p / ''");
+    await _check_constEvalTypeNum_withParameter_binary("p ~/ ''");
+    await _check_constEvalTypeNum_withParameter_binary("p > ''");
+    await _check_constEvalTypeNum_withParameter_binary("p < ''");
+    await _check_constEvalTypeNum_withParameter_binary("p >= ''");
+    await _check_constEvalTypeNum_withParameter_binary("p <= ''");
+    await _check_constEvalTypeNum_withParameter_binary("p % ''");
   }
 
-  void test_constFormalParameter_fieldFormalParameter() {
+  test_constFormalParameter_fieldFormalParameter() async {
     Source source = addSource(r'''
 class A {
   var x;
   A(const this.x) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_FORMAL_PARAMETER]);
     verify([source]);
   }
 
-  void test_constFormalParameter_simpleFormalParameter() {
+  test_constFormalParameter_simpleFormalParameter() async {
     Source source = addSource("f(const x) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_FORMAL_PARAMETER]);
     verify([source]);
   }
 
-  void test_constInitializedWithNonConstValue() {
+  test_constInitializedWithNonConstValue() async {
     Source source = addSource(r'''
 f(p) {
   const C = p;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
 
-  void test_constInitializedWithNonConstValue_finalField() {
+  test_constInitializedWithNonConstValue_finalField() async {
     // Regression test for bug #25526 which previously
     // caused two errors to be reported.
     Source source = addSource(r'''
@@ -1256,29 +1258,29 @@
   foo([int x = field]) {}
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_constInitializedWithNonConstValue_missingConstInListLiteral() {
+  test_constInitializedWithNonConstValue_missingConstInListLiteral() async {
     Source source = addSource("const List L = [0];");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
 
-  void test_constInitializedWithNonConstValue_missingConstInMapLiteral() {
+  test_constInitializedWithNonConstValue_missingConstInMapLiteral() async {
     Source source = addSource("const Map M = {'a' : 0};");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
 
-  void test_constInitializedWithNonConstValueFromDeferredClass() {
-    resolveWithErrors(<String>[
+  test_constInitializedWithNonConstValueFromDeferredClass() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const V = 1;''',
@@ -1292,8 +1294,8 @@
     ]);
   }
 
-  void test_constInitializedWithNonConstValueFromDeferredClass_nested() {
-    resolveWithErrors(<String>[
+  test_constInitializedWithNonConstValueFromDeferredClass_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const V = 1;''',
@@ -1307,17 +1309,17 @@
     ]);
   }
 
-  void test_constInstanceField() {
+  test_constInstanceField() async {
     Source source = addSource(r'''
 class C {
   const int f = 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
     verify([source]);
   }
 
-  void test_constMapKeyTypeImplementsEquals_direct() {
+  test_constMapKeyTypeImplementsEquals_direct() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -1326,13 +1328,13 @@
 main() {
   const {const A() : 0};
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
     verify([source]);
   }
 
-  void test_constMapKeyTypeImplementsEquals_dynamic() {
+  test_constMapKeyTypeImplementsEquals_dynamic() async {
     // Note: static type of B.a is "dynamic", but actual type of the const
     // object is A.  We need to make sure we examine the actual type when
     // deciding whether there is a problem with operator==.
@@ -1347,13 +1349,13 @@
 main() {
   const {B.a : 0};
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
     verify([source]);
   }
 
-  void test_constMapKeyTypeImplementsEquals_factory() {
+  test_constMapKeyTypeImplementsEquals_factory() async {
     Source source = addSource(r'''
 class A { const factory A() = B; }
 
@@ -1366,13 +1368,13 @@
 main() {
   var m = const { const A(): 42 };
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
     verify([source]);
   }
 
-  void test_constMapKeyTypeImplementsEquals_super() {
+  test_constMapKeyTypeImplementsEquals_super() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -1384,25 +1386,25 @@
 main() {
   const {const B() : 0};
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
     verify([source]);
   }
 
-  void test_constWithInvalidTypeParameters() {
+  test_constWithInvalidTypeParameters() async {
     Source source = addSource(r'''
 class A {
   const A();
 }
 f() { return const A<A>(); }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
     verify([source]);
   }
 
-  void test_constWithInvalidTypeParameters_tooFew() {
+  test_constWithInvalidTypeParameters_tooFew() async {
     Source source = addSource(r'''
 class A {}
 class C<K, V> {
@@ -1411,13 +1413,13 @@
 f(p) {
   return const C<A>();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
     verify([source]);
   }
 
-  void test_constWithInvalidTypeParameters_tooMany() {
+  test_constWithInvalidTypeParameters_tooMany() async {
     Source source = addSource(r'''
 class A {}
 class C<E> {
@@ -1426,24 +1428,24 @@
 f(p) {
   return const C<A, A>();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
     verify([source]);
   }
 
-  void test_constWithNonConst() {
+  test_constWithNonConst() async {
     Source source = addSource(r'''
 class T {
   T(a, b, {c, d}) {}
 }
 f() { return const T(0, 1, c: 2, d: 3); }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
     verify([source]);
   }
 
-  void test_constWithNonConst_with() {
+  test_constWithNonConst_with() async {
     Source source = addSource(r'''
 class B {
   const B();
@@ -1455,12 +1457,12 @@
   print(x);
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
     verify([source]);
   }
 
-  void test_constWithNonConstantArgument_annotation() {
+  test_constWithNonConstantArgument_annotation() async {
     Source source = addSource(r'''
 class A {
   const A(int p);
@@ -1469,21 +1471,21 @@
 @A(v)
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
     verify([source]);
   }
 
-  void test_constWithNonConstantArgument_instanceCreation() {
+  test_constWithNonConstantArgument_instanceCreation() async {
     Source source = addSource(r'''
 class A {
   const A(a);
 }
 f(p) { return const A(p); }''');
-    computeLibrarySourceErrors(source);
     // TODO(paulberry): the error INVALID_CONSTAT is redundant and ought to be
     // suppressed.
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
       CompileTimeErrorCode.INVALID_CONSTANT
@@ -1491,18 +1493,18 @@
     verify([source]);
   }
 
-  void test_constWithNonType() {
+  test_constWithNonType() async {
     Source source = addSource(r'''
 int A;
 f() {
   return const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
     verify([source]);
   }
 
-  void test_constWithNonType_fromLibrary() {
+  test_constWithNonType_fromLibrary() async {
     Source source1 = addNamedSource("/lib.dart", "");
     Source source2 = addNamedSource(
         "/lib2.dart",
@@ -1511,19 +1513,19 @@
 void f() {
   const lib.A();
 }''');
-    computeLibrarySourceErrors(source1);
-    computeLibrarySourceErrors(source2);
+    await computeAnalysisResult(source1);
+    await computeAnalysisResult(source2);
     assertErrors(source2, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
     verify([source1]);
   }
 
-  void test_constWithTypeParameters_direct() {
+  test_constWithTypeParameters_direct() async {
     Source source = addSource(r'''
 class A<T> {
   static const V = const A<T>();
   const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
       StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
@@ -1531,13 +1533,13 @@
     verify([source]);
   }
 
-  void test_constWithTypeParameters_indirect() {
+  test_constWithTypeParameters_indirect() async {
     Source source = addSource(r'''
 class A<T> {
   static const V = const A<List<T>>();
   const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
       StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
@@ -1545,7 +1547,7 @@
     verify([source]);
   }
 
-  void test_constWithUndefinedConstructor() {
+  test_constWithUndefinedConstructor() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -1553,13 +1555,13 @@
 f() {
   return const A.noSuchConstructor();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
     // no verify(), 'noSuchConstructor' is not resolved
   }
 
-  void test_constWithUndefinedConstructorDefault() {
+  test_constWithUndefinedConstructorDefault() async {
     Source source = addSource(r'''
 class A {
   const A.name();
@@ -1567,37 +1569,37 @@
 f() {
   return const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
     verify([source]);
   }
 
-  void test_defaultValueInFunctionTypeAlias() {
+  test_defaultValueInFunctionTypeAlias() async {
     Source source = addSource("typedef F([x = 0]);");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS]);
     verify([source]);
   }
 
-  void test_defaultValueInFunctionTypedParameter_named() {
+  test_defaultValueInFunctionTypedParameter_named() async {
     Source source = addSource("f(g({p: null})) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER]);
     verify([source]);
   }
 
-  void test_defaultValueInFunctionTypedParameter_optional() {
+  test_defaultValueInFunctionTypedParameter_optional() async {
     Source source = addSource("f(g([p = null])) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER]);
     verify([source]);
   }
 
-  void test_defaultValueInRedirectingFactoryConstructor() {
+  test_defaultValueInRedirectingFactoryConstructor() async {
     Source source = addSource(r'''
 class A {
   factory A([int x = 0]) = B;
@@ -1606,20 +1608,20 @@
 class B implements A {
   B([int x = 1]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR
     ]);
     verify([source]);
   }
 
-  void test_duplicateConstructorName_named() {
+  test_duplicateConstructorName_named() async {
     Source source = addSource(r'''
 class A {
   A.a() {}
   A.a() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME,
       CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME
@@ -1627,13 +1629,13 @@
     verify([source]);
   }
 
-  void test_duplicateConstructorName_unnamed() {
+  test_duplicateConstructorName_unnamed() async {
     Source source = addSource(r'''
 class A {
   A() {}
   A() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT,
       CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT
@@ -1641,7 +1643,7 @@
     verify([source]);
   }
 
-  void test_duplicateDefinition_acrossLibraries() {
+  test_duplicateDefinition_acrossLibraries() async {
     Source librarySource = addNamedSource(
         "/lib.dart",
         r'''
@@ -1661,56 +1663,58 @@
 part of lib;
 
 class A {}''');
-    computeLibrarySourceErrors(librarySource);
-    assertErrors(sourceB, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    await computeAnalysisResult(librarySource);
+    await computeAnalysisResult(sourceA);
+    await computeAnalysisResult(sourceB);
     assertNoErrors(librarySource);
+    assertErrors(sourceB, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([librarySource, sourceA, sourceB]);
   }
 
-  void test_duplicateDefinition_catch() {
+  test_duplicateDefinition_catch() async {
     Source source = addSource(r'''
 main() {
   try {} catch (e, e) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_classMembers_fields() {
+  test_duplicateDefinition_classMembers_fields() async {
     Source source = addSource(r'''
 class A {
   int a;
   int a;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_classMembers_fields_oneStatic() {
+  test_duplicateDefinition_classMembers_fields_oneStatic() async {
     Source source = addSource(r'''
 class A {
   int x;
   static int x;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_classMembers_methods() {
+  test_duplicateDefinition_classMembers_methods() async {
     Source source = addSource(r'''
 class A {
   m() {}
   m() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_inPart() {
+  test_duplicateDefinition_inPart() async {
     Source librarySource = addNamedSource(
         "/lib.dart",
         r'''
@@ -1722,13 +1726,14 @@
         r'''
 part of test;
 class A {}''');
-    computeLibrarySourceErrors(librarySource);
-    assertErrors(sourceA, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    await computeAnalysisResult(librarySource);
+    await computeAnalysisResult(sourceA);
     assertNoErrors(librarySource);
+    assertErrors(sourceA, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([librarySource, sourceA]);
   }
 
-  void test_duplicateDefinition_locals_inCase() {
+  test_duplicateDefinition_locals_inCase() async {
     Source source = addSource(r'''
 main() {
   switch(1) {
@@ -1737,23 +1742,23 @@
       var a;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_locals_inFunctionBlock() {
+  test_duplicateDefinition_locals_inFunctionBlock() async {
     Source source = addSource(r'''
 main() {
   int m = 0;
   m(a) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_locals_inIf() {
+  test_duplicateDefinition_locals_inIf() async {
     Source source = addSource(r'''
 main(int p) {
   if (p != 0) {
@@ -1761,12 +1766,12 @@
     var a;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_locals_inMethodBlock() {
+  test_duplicateDefinition_locals_inMethodBlock() async {
     Source source = addSource(r'''
 class A {
   m() {
@@ -1774,72 +1779,72 @@
     int a;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_parameters_inConstructor() {
+  test_duplicateDefinition_parameters_inConstructor() async {
     Source source = addSource(r'''
 class A {
   int a;
   A(int a, this.a);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_parameters_inFunctionTypeAlias() {
+  test_duplicateDefinition_parameters_inFunctionTypeAlias() async {
     Source source = addSource(r'''
 typedef F(int a, double a);
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_parameters_inLocalFunction() {
+  test_duplicateDefinition_parameters_inLocalFunction() async {
     Source source = addSource(r'''
 main() {
   f(int a, double a) {
   };
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_parameters_inMethod() {
+  test_duplicateDefinition_parameters_inMethod() async {
     Source source = addSource(r'''
 class A {
   m(int a, double a) {
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_parameters_inTopLevelFunction() {
+  test_duplicateDefinition_parameters_inTopLevelFunction() async {
     Source source = addSource(r'''
 f(int a, double a) {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinition_typeParameters() {
+  test_duplicateDefinition_typeParameters() async {
     Source source = addSource(r'''
 class A<T, T> {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
 
-  void test_duplicateDefinitionInheritance_instanceGetter_staticGetter() {
+  test_duplicateDefinitionInheritance_instanceGetter_staticGetter() async {
     Source source = addSource(r'''
 class A {
   int get x => 0;
@@ -1847,14 +1852,13 @@
 class B extends A {
   static int get x => 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
 
-  void
-      test_duplicateDefinitionInheritance_instanceGetterAbstract_staticGetter() {
+  test_duplicateDefinitionInheritance_instanceGetterAbstract_staticGetter() async {
     Source source = addSource(r'''
 abstract class A {
   int get x;
@@ -1862,13 +1866,13 @@
 class B extends A {
   static int get x => 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
 
-  void test_duplicateDefinitionInheritance_instanceMethod_staticMethod() {
+  test_duplicateDefinitionInheritance_instanceMethod_staticMethod() async {
     Source source = addSource(r'''
 class A {
   x() {}
@@ -1876,14 +1880,13 @@
 class B extends A {
   static x() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
 
-  void
-      test_duplicateDefinitionInheritance_instanceMethodAbstract_staticMethod() {
+  test_duplicateDefinitionInheritance_instanceMethodAbstract_staticMethod() async {
     Source source = addSource(r'''
 abstract class A {
   x();
@@ -1891,13 +1894,13 @@
 abstract class B extends A {
   static x() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
 
-  void test_duplicateDefinitionInheritance_instanceSetter_staticSetter() {
+  test_duplicateDefinitionInheritance_instanceSetter_staticSetter() async {
     Source source = addSource(r'''
 class A {
   set x(value) {}
@@ -1905,14 +1908,13 @@
 class B extends A {
   static set x(value) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
 
-  void
-      test_duplicateDefinitionInheritance_instanceSetterAbstract_staticSetter() {
+  test_duplicateDefinitionInheritance_instanceSetterAbstract_staticSetter() async {
     Source source = addSource(r'''
 abstract class A {
   set x(value);
@@ -1920,66 +1922,66 @@
 class B extends A {
   static set x(value) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
 
-  void test_duplicateNamedArgument() {
+  test_duplicateNamedArgument() async {
     Source source = addSource(r'''
 f({a, b}) {}
 main() {
   f(a: 1, a: 2);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT]);
     verify([source]);
   }
 
-  void test_duplicatePart_sameSource() {
+  test_duplicatePart_sameSource() async {
     addNamedSource('/part.dart', 'part of lib;');
     Source source = addSource(r'''
 library lib;
 part 'part.dart';
 part 'foo/../part.dart';
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
     verify([source]);
   }
 
-  void test_duplicatePart_sameUri() {
+  test_duplicatePart_sameUri() async {
     addNamedSource('/part.dart', 'part of lib;');
     Source source = addSource(r'''
 library lib;
 part 'part.dart';
 part 'part.dart';
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
     verify([source]);
   }
 
-  void test_exportInternalLibrary() {
+  test_exportInternalLibrary() async {
     Source source = addSource("export 'dart:_interceptors';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
     verify([source]);
   }
 
-  void test_exportOfNonLibrary() {
+  test_exportOfNonLibrary() async {
     Source source = addSource(r'''
 library L;
 export 'lib1.dart';''');
     addNamedSource("/lib1.dart", "part of lib;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY]);
     verify([source]);
   }
 
-  void test_extendsDeferredClass() {
-    resolveWithErrors(<String>[
+  test_extendsDeferredClass() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {}''',
@@ -1992,8 +1994,8 @@
     ]);
   }
 
-  void test_extendsDeferredClass_classTypeAlias() {
-    resolveWithErrors(<String>[
+  test_extendsDeferredClass_classTypeAlias() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {}''',
@@ -2007,9 +2009,9 @@
     ]);
   }
 
-  void test_extendsDisallowedClass_class_bool() {
+  test_extendsDisallowedClass_class_bool() async {
     Source source = addSource("class A extends bool {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
@@ -2017,16 +2019,16 @@
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_class_double() {
+  test_extendsDisallowedClass_class_double() async {
     Source source = addSource("class A extends double {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_class_int() {
+  test_extendsDisallowedClass_class_int() async {
     Source source = addSource("class A extends int {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
@@ -2034,9 +2036,9 @@
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_class_Null() {
+  test_extendsDisallowedClass_class_Null() async {
     Source source = addSource("class A extends Null {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
@@ -2044,16 +2046,16 @@
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_class_num() {
+  test_extendsDisallowedClass_class_num() async {
     Source source = addSource("class A extends num {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_class_String() {
+  test_extendsDisallowedClass_class_String() async {
     Source source = addSource("class A extends String {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
@@ -2061,86 +2063,86 @@
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_classTypeAlias_bool() {
+  test_extendsDisallowedClass_classTypeAlias_bool() async {
     Source source = addSource(r'''
 class M {}
 class C = bool with M;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_classTypeAlias_double() {
+  test_extendsDisallowedClass_classTypeAlias_double() async {
     Source source = addSource(r'''
 class M {}
 class C = double with M;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_classTypeAlias_int() {
+  test_extendsDisallowedClass_classTypeAlias_int() async {
     Source source = addSource(r'''
 class M {}
 class C = int with M;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_classTypeAlias_Null() {
+  test_extendsDisallowedClass_classTypeAlias_Null() async {
     Source source = addSource(r'''
 class M {}
 class C = Null with M;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_classTypeAlias_num() {
+  test_extendsDisallowedClass_classTypeAlias_num() async {
     Source source = addSource(r'''
 class M {}
 class C = num with M;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsDisallowedClass_classTypeAlias_String() {
+  test_extendsDisallowedClass_classTypeAlias_String() async {
     Source source = addSource(r'''
 class M {}
 class C = String with M;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_extendsEnum() {
+  test_extendsEnum() async {
     Source source = addSource(r'''
 enum E { ONE }
 class A extends E {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_ENUM]);
     verify([source]);
   }
 
-  void test_extendsNonClass_class() {
+  test_extendsNonClass_class() async {
     Source source = addSource(r'''
 int A;
 class B extends A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_NON_CLASS]);
     verify([source]);
   }
 
-  void test_extendsNonClass_dynamic() {
+  test_extendsNonClass_dynamic() async {
     Source source = addSource("class B extends dynamic {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTENDS_NON_CLASS]);
     verify([source]);
   }
 
-  void test_extraPositionalArguments_const() {
+  test_extraPositionalArguments_const() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -2148,12 +2150,12 @@
 main() {
   const A(0);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
     verify([source]);
   }
 
-  void test_extraPositionalArguments_const_super() {
+  test_extraPositionalArguments_const_super() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -2161,42 +2163,42 @@
 class B extends A {
   const B() : super(0);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
     verify([source]);
   }
 
-  void test_fieldFormalParameter_assignedInInitializer() {
+  test_fieldFormalParameter_assignedInInitializer() async {
     Source source = addSource(r'''
 class A {
   int x;
   A(this.x) : x = 3 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
     verify([source]);
   }
 
-  void test_fieldInitializedByMultipleInitializers() {
+  test_fieldInitializedByMultipleInitializers() async {
     Source source = addSource(r'''
 class A {
   int x;
   A() : x = 0, x = 1 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
     verify([source]);
   }
 
-  void test_fieldInitializedByMultipleInitializers_multipleInits() {
+  test_fieldInitializedByMultipleInitializers_multipleInits() async {
     Source source = addSource(r'''
 class A {
   int x;
   A() : x = 0, x = 1, x = 2 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
@@ -2204,14 +2206,14 @@
     verify([source]);
   }
 
-  void test_fieldInitializedByMultipleInitializers_multipleNames() {
+  test_fieldInitializedByMultipleInitializers_multipleNames() async {
     Source source = addSource(r'''
 class A {
   int x;
   int y;
   A() : x = 0, x = 1, y = 0, y = 1 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
@@ -2219,38 +2221,38 @@
     verify([source]);
   }
 
-  void test_fieldInitializedInParameterAndInitializer() {
+  test_fieldInitializedInParameterAndInitializer() async {
     Source source = addSource(r'''
 class A {
   int x;
   A(this.x) : x = 1 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
     verify([source]);
   }
 
-  void test_fieldInitializerFactoryConstructor() {
+  test_fieldInitializerFactoryConstructor() async {
     Source source = addSource(r'''
 class A {
   int x;
   factory A(this.x) => null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_fieldInitializerOutsideConstructor() {
+  test_fieldInitializerOutsideConstructor() async {
     // TODO(brianwilkerson) Fix the duplicate error messages.
     Source source = addSource(r'''
 class A {
   int x;
   m(this.x) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
       CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
@@ -2258,76 +2260,76 @@
     verify([source]);
   }
 
-  void test_fieldInitializerOutsideConstructor_defaultParameter() {
+  test_fieldInitializerOutsideConstructor_defaultParameter() async {
     Source source = addSource(r'''
 class A {
   int x;
   m([this.x]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_fieldInitializerOutsideConstructor_inFunctionTypeParameter() {
+  test_fieldInitializerOutsideConstructor_inFunctionTypeParameter() async {
     Source source = addSource(r'''
 class A {
   int x;
   A(int p(this.x));
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_fieldInitializerRedirectingConstructor_afterRedirection() {
+  test_fieldInitializerRedirectingConstructor_afterRedirection() async {
     Source source = addSource(r'''
 class A {
   int x;
   A.named() {}
   A() : this.named(), x = 42;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_fieldInitializerRedirectingConstructor_beforeRedirection() {
+  test_fieldInitializerRedirectingConstructor_beforeRedirection() async {
     Source source = addSource(r'''
 class A {
   int x;
   A.named() {}
   A() : x = 42, this.named();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_fieldInitializingFormalRedirectingConstructor() {
+  test_fieldInitializingFormalRedirectingConstructor() async {
     Source source = addSource(r'''
 class A {
   int x;
   A.named() {}
   A(this.x) : this.named();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_finalInitializedMultipleTimes_initializers() {
+  test_finalInitializedMultipleTimes_initializers() async {
     Source source = addSource(r'''
 class A {
   final x;
   A() : x = 0, x = 0 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
     verify([source]);
@@ -2341,26 +2343,26 @@
    * Note: FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER covers a subset of
    * FINAL_INITIALIZED_MULTIPLE_TIMES, since it more specific, we use it instead of the broader code
    */
-  void test_finalInitializedMultipleTimes_initializingFormal_initializer() {
+  test_finalInitializedMultipleTimes_initializingFormal_initializer() async {
     Source source = addSource(r'''
 class A {
   final x;
   A(this.x) : x = 0 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
     verify([source]);
   }
 
-  void test_finalInitializedMultipleTimes_initializingFormals() {
+  test_finalInitializedMultipleTimes_initializingFormals() async {
     Source source = addSource(r'''
 class A {
   final x;
   A(this.x, this.x) {}
 }''');
-    computeLibrarySourceErrors(source);
     // TODO(brianwilkerson) There should only be one error here.
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.DUPLICATE_DEFINITION,
       CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES
@@ -2368,38 +2370,38 @@
     verify([source]);
   }
 
-  void test_finalNotInitialized_instanceField_const_static() {
+  test_finalNotInitialized_instanceField_const_static() async {
     Source source = addSource(r'''
 class A {
   static const F;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
     verify([source]);
   }
 
-  void test_finalNotInitialized_library_const() {
+  test_finalNotInitialized_library_const() async {
     Source source = addSource("const F;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
     verify([source]);
   }
 
-  void test_finalNotInitialized_local_const() {
+  test_finalNotInitialized_local_const() async {
     Source source = addSource(r'''
 f() {
   const int x;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
     verify([source]);
   }
 
-  void test_fromEnvironment_bool_badArgs() {
+  test_fromEnvironment_bool_badArgs() async {
     Source source = addSource(r'''
 var b1 = const bool.fromEnvironment(1);
 var b2 = const bool.fromEnvironment('x', defaultValue: 1);''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
@@ -2409,13 +2411,13 @@
     verify([source]);
   }
 
-  void test_fromEnvironment_bool_badDefault_whenDefined() {
+  test_fromEnvironment_bool_badDefault_whenDefined() async {
     // The type of the defaultValue needs to be correct even when the default
     // value isn't used (because the variable is defined in the environment).
     analysisContext2.declaredVariables.define("x", "true");
     Source source =
         addSource("var b = const bool.fromEnvironment('x', defaultValue: 1);");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -2423,20 +2425,20 @@
     verify([source]);
   }
 
-  void test_getterAndMethodWithSameName() {
+  test_getterAndMethodWithSameName() async {
     Source source = addSource(r'''
 class A {
   x(y) {}
   get x => 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME]);
     verify([source]);
   }
 
-  void test_implementsDeferredClass() {
-    resolveWithErrors(<String>[
+  test_implementsDeferredClass() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {}''',
@@ -2449,8 +2451,8 @@
     ]);
   }
 
-  void test_implementsDeferredClass_classTypeAlias() {
-    resolveWithErrors(<String>[
+  test_implementsDeferredClass_classTypeAlias() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {}''',
@@ -2465,51 +2467,51 @@
     ]);
   }
 
-  void test_implementsDisallowedClass_class_bool() {
+  test_implementsDisallowedClass_class_bool() async {
     Source source = addSource("class A implements bool {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_class_double() {
+  test_implementsDisallowedClass_class_double() async {
     Source source = addSource("class A implements double {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_class_int() {
+  test_implementsDisallowedClass_class_int() async {
     Source source = addSource("class A implements int {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_class_Null() {
+  test_implementsDisallowedClass_class_Null() async {
     Source source = addSource("class A implements Null {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_class_num() {
+  test_implementsDisallowedClass_class_num() async {
     Source source = addSource("class A implements num {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_class_String() {
+  test_implementsDisallowedClass_class_String() async {
     Source source = addSource("class A implements String {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_class_String_num() {
+  test_implementsDisallowedClass_class_String_num() async {
     Source source = addSource("class A implements String, num {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
       CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
@@ -2517,72 +2519,72 @@
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_bool() {
+  test_implementsDisallowedClass_classTypeAlias_bool() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements bool;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_double() {
+  test_implementsDisallowedClass_classTypeAlias_double() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements double;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_int() {
+  test_implementsDisallowedClass_classTypeAlias_int() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements int;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_Null() {
+  test_implementsDisallowedClass_classTypeAlias_Null() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements Null;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_num() {
+  test_implementsDisallowedClass_classTypeAlias_num() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements num;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_String() {
+  test_implementsDisallowedClass_classTypeAlias_String() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements String;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_implementsDisallowedClass_classTypeAlias_String_num() {
+  test_implementsDisallowedClass_classTypeAlias_String_num() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class C = A with M implements String, num;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
       CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
@@ -2590,56 +2592,56 @@
     verify([source]);
   }
 
-  void test_implementsDynamic() {
+  test_implementsDynamic() async {
     Source source = addSource("class A implements dynamic {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DYNAMIC]);
     verify([source]);
   }
 
-  void test_implementsEnum() {
+  test_implementsEnum() async {
     Source source = addSource(r'''
 enum E { ONE }
 class A implements E {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_ENUM]);
     verify([source]);
   }
 
-  void test_implementsNonClass_class() {
+  test_implementsNonClass_class() async {
     Source source = addSource(r'''
 int A;
 class B implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
     verify([source]);
   }
 
-  void test_implementsNonClass_typeAlias() {
+  test_implementsNonClass_typeAlias() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 int B;
 class C = A with M implements B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
     verify([source]);
   }
 
-  void test_implementsRepeated() {
+  test_implementsRepeated() async {
     Source source = addSource(r'''
 class A {}
 class B implements A, A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
     verify([source]);
   }
 
-  void test_implementsRepeated_3times() {
+  test_implementsRepeated_3times() async {
     Source source = addSource(r'''
 class A {} class C{}
 class B implements A, A, A, A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.IMPLEMENTS_REPEATED,
       CompileTimeErrorCode.IMPLEMENTS_REPEATED,
@@ -2648,87 +2650,86 @@
     verify([source]);
   }
 
-  void test_implementsSuperClass() {
+  test_implementsSuperClass() async {
     Source source = addSource(r'''
 class A {}
 class B extends A implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
     verify([source]);
   }
 
-  void test_implementsSuperClass_Object() {
+  test_implementsSuperClass_Object() async {
     Source source = addSource("class A implements Object {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
     verify([source]);
   }
 
-  void test_implicitThisReferenceInInitializer_field() {
+  test_implicitThisReferenceInInitializer_field() async {
     Source source = addSource(r'''
 class A {
   var v;
   A() : v = f;
   var f;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_implicitThisReferenceInInitializer_field2() {
+  test_implicitThisReferenceInInitializer_field2() async {
     Source source = addSource(r'''
 class A {
   final x = 0;
   final y = x;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_implicitThisReferenceInInitializer_invocation() {
+  test_implicitThisReferenceInInitializer_invocation() async {
     Source source = addSource(r'''
 class A {
   var v;
   A() : v = f();
   f() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_implicitThisReferenceInInitializer_invocationInStatic() {
+  test_implicitThisReferenceInInitializer_invocationInStatic() async {
     Source source = addSource(r'''
 class A {
   static var F = m();
   m() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void
-      test_implicitThisReferenceInInitializer_redirectingConstructorInvocation() {
+  test_implicitThisReferenceInInitializer_redirectingConstructorInvocation() async {
     Source source = addSource(r'''
 class A {
   A(p) {}
   A.named() : this(f);
   var f;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_implicitThisReferenceInInitializer_superConstructorInvocation() {
+  test_implicitThisReferenceInInitializer_superConstructorInvocation() async {
     Source source = addSource(r'''
 class A {
   A(p) {}
@@ -2737,39 +2738,39 @@
   B() : super(f);
   var f;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_importInternalLibrary() {
+  test_importInternalLibrary() async {
     Source source = addSource("import 'dart:_interceptors';");
-    computeLibrarySourceErrors(source);
     // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
     // we could prevent the hint from being generated by testing the import
     // directive for the error, this is such a minor corner case that we don't
     // think we should add the additional computation time to figure out such
     // cases.
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
     verify([source]);
   }
 
-  void test_importInternalLibrary_js_helper() {
+  test_importInternalLibrary_js_helper() async {
     Source source = addSource("import 'dart:_js_helper';");
-    computeLibrarySourceErrors(source);
     // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
     // we could prevent the hint from being generated by testing the import
     // directive for the error, this is such a minor corner case that we don't
     // think we should add the additional computation time to figure out such
     // cases.
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
     verify([source]);
   }
 
-  void test_importOfNonLibrary() {
+  test_importOfNonLibrary() async {
     Source source = addSource(r'''
 library lib;
 import 'part.dart';
@@ -2779,12 +2780,12 @@
         r'''
 part of lib;
 class A{}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]);
     verify([source]);
   }
 
-  void test_inconsistentCaseExpressionTypes() {
+  test_inconsistentCaseExpressionTypes() async {
     Source source = addSource(r'''
 f(var p) {
   switch (p) {
@@ -2794,13 +2795,13 @@
       break;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
     verify([source]);
   }
 
-  void test_inconsistentCaseExpressionTypes_dynamic() {
+  test_inconsistentCaseExpressionTypes_dynamic() async {
     // Even though A.S and S have a static type of "dynamic", we should see
     // that they fail to match 3, because they are constant strings.
     Source source = addSource(r'''
@@ -2820,7 +2821,7 @@
       break;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES
@@ -2828,7 +2829,7 @@
     verify([source]);
   }
 
-  void test_inconsistentCaseExpressionTypes_repeated() {
+  test_inconsistentCaseExpressionTypes_repeated() async {
     Source source = addSource(r'''
 f(var p) {
   switch (p) {
@@ -2840,7 +2841,7 @@
       break;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES
@@ -2848,7 +2849,7 @@
     verify([source]);
   }
 
-  void test_initializerForNonExistent_const() {
+  test_initializerForNonExistent_const() async {
     // Check that the absence of a matching field doesn't cause a
     // crash during constant evaluation.
     Source source = addSource(r'''
@@ -2856,44 +2857,44 @@
   const A() : x = 'foo';
 }
 A a = const A();''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD]);
   }
 
-  void test_initializerForNonExistent_initializer() {
+  test_initializerForNonExistent_initializer() async {
     Source source = addSource(r'''
 class A {
   A() : x = 0 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD]);
   }
 
-  void test_initializerForStaticField() {
+  test_initializerForStaticField() async {
     Source source = addSource(r'''
 class A {
   static int x;
   A() : x = 0 {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
     verify([source]);
   }
 
-  void test_initializingFormalForNonExistentField() {
+  test_initializingFormalForNonExistentField() async {
     Source source = addSource(r'''
 class A {
   A(this.x) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
     verify([source]);
   }
 
-  void test_initializingFormalForNonExistentField_notInEnclosingClass() {
+  test_initializingFormalForNonExistentField_notInEnclosingClass() async {
     Source source = addSource(r'''
 class A {
 int x;
@@ -2901,48 +2902,48 @@
 class B extends A {
   B(this.x) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
     verify([source]);
   }
 
-  void test_initializingFormalForNonExistentField_optional() {
+  test_initializingFormalForNonExistentField_optional() async {
     Source source = addSource(r'''
 class A {
   A([this.x]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
     verify([source]);
   }
 
-  void test_initializingFormalForNonExistentField_synthetic() {
+  test_initializingFormalForNonExistentField_synthetic() async {
     Source source = addSource(r'''
 class A {
   int get x => 1;
   A(this.x) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
     verify([source]);
   }
 
-  void test_initializingFormalForStaticField() {
+  test_initializingFormalForStaticField() async {
     Source source = addSource(r'''
 class A {
   static int x;
   A([this.x]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
     verify([source]);
   }
 
-  void test_instanceMemberAccessFromFactory_named() {
+  test_instanceMemberAccessFromFactory_named() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -2952,13 +2953,13 @@
     return new A();
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
     verify([source]);
   }
 
-  void test_instanceMemberAccessFromFactory_unnamed() {
+  test_instanceMemberAccessFromFactory_unnamed() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -2968,13 +2969,13 @@
     return new A._();
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
     verify([source]);
   }
 
-  void test_instanceMemberAccessFromStatic_field() {
+  test_instanceMemberAccessFromStatic_field() async {
     Source source = addSource(r'''
 class A {
   int f;
@@ -2982,13 +2983,13 @@
     f;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
     verify([source]);
   }
 
-  void test_instanceMemberAccessFromStatic_getter() {
+  test_instanceMemberAccessFromStatic_getter() async {
     Source source = addSource(r'''
 class A {
   get g => null;
@@ -2996,13 +2997,13 @@
     g;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
     verify([source]);
   }
 
-  void test_instanceMemberAccessFromStatic_method() {
+  test_instanceMemberAccessFromStatic_method() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -3010,46 +3011,46 @@
     m();
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
     verify([source]);
   }
 
-  void test_instantiateEnum_const() {
+  test_instantiateEnum_const() async {
     Source source = addSource(r'''
 enum E { ONE }
 E e(String name) {
   return const E();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INSTANTIATE_ENUM]);
     verify([source]);
   }
 
-  void test_instantiateEnum_new() {
+  test_instantiateEnum_new() async {
     Source source = addSource(r'''
 enum E { ONE }
 E e(String name) {
   return new E();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INSTANTIATE_ENUM]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_getter() {
+  test_invalidAnnotation_getter() async {
     Source source = addSource(r'''
 get V => 0;
 @V
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_importWithPrefix_getter() {
+  test_invalidAnnotation_importWithPrefix_getter() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -3060,12 +3061,12 @@
 @p.V
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_importWithPrefix_notConstantVariable() {
+  test_invalidAnnotation_importWithPrefix_notConstantVariable() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -3076,13 +3077,12 @@
 @p.V
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void
-      test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() {
+  test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -3093,34 +3093,34 @@
 @p.V
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_notConstantVariable() {
+  test_invalidAnnotation_notConstantVariable() async {
     Source source = addSource(r'''
 final V = 0;
 @V
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_notVariableOrConstructorInvocation() {
+  test_invalidAnnotation_notVariableOrConstructorInvocation() async {
     Source source = addSource(r'''
 typedef V();
 @V
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_staticMethodReference() {
+  test_invalidAnnotation_staticMethodReference() async {
     Source source = addSource(r'''
 class A {
   static f() {}
@@ -3128,52 +3128,52 @@
 @A.f
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
   }
 
-  void test_invalidAnnotation_unresolved_identifier() {
+  test_invalidAnnotation_unresolved_identifier() async {
     Source source = addSource(r'''
 @unresolved
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
-  void test_invalidAnnotation_unresolved_invocation() {
+  test_invalidAnnotation_unresolved_invocation() async {
     Source source = addSource(r'''
 @Unresolved()
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
-  void test_invalidAnnotation_unresolved_prefixedIdentifier() {
+  test_invalidAnnotation_unresolved_prefixedIdentifier() async {
     Source source = addSource(r'''
 import 'dart:math' as p;
 @p.unresolved
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
-  void test_invalidAnnotation_useLibraryScope() {
+  test_invalidAnnotation_useLibraryScope() async {
     Source source = addSource(r'''
 @foo
 class A {
   static const foo = null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
-  void test_invalidAnnotationFromDeferredLibrary() {
+  test_invalidAnnotationFromDeferredLibrary() async {
     // See test_invalidAnnotation_notConstantVariable
-    resolveWithErrors(<String>[
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class V { const V(); }
@@ -3187,9 +3187,9 @@
     ]);
   }
 
-  void test_invalidAnnotationFromDeferredLibrary_constructor() {
+  test_invalidAnnotationFromDeferredLibrary_constructor() async {
     // See test_invalidAnnotation_notConstantVariable
-    resolveWithErrors(<String>[
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class C { const C(); }''',
@@ -3202,9 +3202,9 @@
     ]);
   }
 
-  void test_invalidAnnotationFromDeferredLibrary_namedConstructor() {
+  test_invalidAnnotationFromDeferredLibrary_namedConstructor() async {
     // See test_invalidAnnotation_notConstantVariable
-    resolveWithErrors(<String>[
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class C { const C.name(); }''',
@@ -3217,186 +3217,186 @@
     ]);
   }
 
-  void test_invalidConstructorName_notEnclosingClassName_defined() {
+  test_invalidConstructorName_notEnclosingClassName_defined() async {
     Source source = addSource(r'''
 class A {
   B() : super();
 }
 class B {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
     // no verify() call, "B" is not resolved
   }
 
-  void test_invalidConstructorName_notEnclosingClassName_undefined() {
+  test_invalidConstructorName_notEnclosingClassName_undefined() async {
     Source source = addSource(r'''
 class A {
   B() : super();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
     // no verify() call, "B" is not resolved
   }
 
-  void test_invalidFactoryNameNotAClass_notClassName() {
+  test_invalidFactoryNameNotAClass_notClassName() async {
     Source source = addSource(r'''
 int B;
 class A {
   factory B() => null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
     verify([source]);
   }
 
-  void test_invalidFactoryNameNotAClass_notEnclosingClassName() {
+  test_invalidFactoryNameNotAClass_notEnclosingClassName() async {
     Source source = addSource(r'''
 class A {
   factory B() => null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
     // no verify() call, "B" is not resolved
   }
 
-  void test_invalidModifierOnConstructor_async() {
+  test_invalidModifierOnConstructor_async() async {
     Source source = addSource(r'''
 class A {
   A() async {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_invalidModifierOnConstructor_asyncStar() {
+  test_invalidModifierOnConstructor_asyncStar() async {
     Source source = addSource(r'''
 class A {
   A() async* {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_invalidModifierOnConstructor_syncStar() {
+  test_invalidModifierOnConstructor_syncStar() async {
     Source source = addSource(r'''
 class A {
   A() sync* {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_invalidModifierOnSetter_member_async() {
+  test_invalidModifierOnSetter_member_async() async {
     Source source = addSource(r'''
 class A {
   set x(v) async {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
     verify([source]);
   }
 
-  void test_invalidModifierOnSetter_member_asyncStar() {
+  test_invalidModifierOnSetter_member_asyncStar() async {
     Source source = addSource(r'''
 class A {
   set x(v) async* {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
     verify([source]);
   }
 
-  void test_invalidModifierOnSetter_member_syncStar() {
+  test_invalidModifierOnSetter_member_syncStar() async {
     Source source = addSource(r'''
 class A {
   set x(v) sync* {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
     verify([source]);
   }
 
-  void test_invalidModifierOnSetter_topLevel_async() {
+  test_invalidModifierOnSetter_topLevel_async() async {
     Source source = addSource("set x(v) async {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
     verify([source]);
   }
 
-  void test_invalidModifierOnSetter_topLevel_asyncStar() {
+  test_invalidModifierOnSetter_topLevel_asyncStar() async {
     Source source = addSource("set x(v) async* {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
     verify([source]);
   }
 
-  void test_invalidModifierOnSetter_topLevel_syncStar() {
+  test_invalidModifierOnSetter_topLevel_syncStar() async {
     Source source = addSource("set x(v) sync* {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_factoryConstructor() {
+  test_invalidReferenceToThis_factoryConstructor() async {
     Source source = addSource(r'''
 class A {
   factory A() { return this; }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_instanceVariableInitializer_inConstructor() {
+  test_invalidReferenceToThis_instanceVariableInitializer_inConstructor() async {
     Source source = addSource(r'''
 class A {
   var f;
   A() : f = this;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_instanceVariableInitializer_inDeclaration() {
+  test_invalidReferenceToThis_instanceVariableInitializer_inDeclaration() async {
     Source source = addSource(r'''
 class A {
   var f = this;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_staticMethod() {
+  test_invalidReferenceToThis_staticMethod() async {
     Source source = addSource(r'''
 class A {
   static m() { return this; }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_staticVariableInitializer() {
+  test_invalidReferenceToThis_staticVariableInitializer() async {
     Source source = addSource(r'''
 class A {
   static A f = this;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_superInitializer() {
+  test_invalidReferenceToThis_superInitializer() async {
     Source source = addSource(r'''
 class A {
   A(var x) {}
@@ -3404,72 +3404,72 @@
 class B extends A {
   B() : super(this);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_topLevelFunction() {
+  test_invalidReferenceToThis_topLevelFunction() async {
     Source source = addSource("f() { return this; }");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidReferenceToThis_variableInitializer() {
+  test_invalidReferenceToThis_variableInitializer() async {
     Source source = addSource("int x = this;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
     verify([source]);
   }
 
-  void test_invalidTypeArgumentInConstList() {
+  test_invalidTypeArgumentInConstList() async {
     Source source = addSource(r'''
 class A<E> {
   m() {
     return const <E>[];
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
     verify([source]);
   }
 
-  void test_invalidTypeArgumentInConstMap() {
+  test_invalidTypeArgumentInConstMap() async {
     Source source = addSource(r'''
 class A<E> {
   m() {
     return const <String, E>{};
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
     verify([source]);
   }
 
-  void test_invalidUri_export() {
+  test_invalidUri_export() async {
     Source source = addSource("export 'ht:';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
   }
 
-  void test_invalidUri_import() {
+  test_invalidUri_import() async {
     Source source = addSource("import 'ht:';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
   }
 
-  void test_invalidUri_part() {
+  test_invalidUri_part() async {
     Source source = addSource(r'''
 library lib;
 part 'ht:';''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
   }
 
-  void test_isInConstInstanceCreation_restored() {
+  test_isInConstInstanceCreation_restored() async {
     // If ErrorVerifier._isInConstInstanceCreation is not properly restored on
     // exit from visitInstanceCreationExpression, the error at (1) will be
     // treated as a warning rather than an error.
@@ -3480,13 +3480,13 @@
 const x = const Foo<int>(const Foo<int>(0, 1),
     const <Foo<String>>[]); // (1)
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
 
-  void test_isInInstanceVariableInitializer_restored() {
+  test_isInInstanceVariableInitializer_restored() async {
     // If ErrorVerifier._isInInstanceVariableInitializer is not properly
     // restored on exit from visitVariableDeclaration, the error at (1)
     // won't be detected.
@@ -3502,13 +3502,13 @@
   _foo() {
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_labelInOuterScope() {
+  test_labelInOuterScope() async {
     Source source = addSource(r'''
 class A {
   void m(int i) {
@@ -3519,40 +3519,40 @@
     }
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE]);
     // We cannot verify resolution with unresolvable labels
   }
 
-  void test_labelUndefined_break() {
+  test_labelUndefined_break() async {
     Source source = addSource(r'''
 f() {
   x: while (true) {
     break y;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.LABEL_UNDEFINED]);
     // We cannot verify resolution with undefined labels
   }
 
-  void test_labelUndefined_continue() {
+  test_labelUndefined_continue() async {
     Source source = addSource(r'''
 f() {
   x: while (true) {
     continue y;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.LABEL_UNDEFINED]);
     // We cannot verify resolution with undefined labels
   }
 
-  void test_length_of_erroneous_constant() {
+  test_length_of_erroneous_constant() async {
     // Attempting to compute the length of constant that couldn't be evaluated
     // (due to an error) should not crash the analyzer (see dartbug.com/23383)
     Source source = addSource("const int i = (1 ? 'alpha' : 'beta').length;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
@@ -3561,76 +3561,76 @@
     verify([source]);
   }
 
-  void test_memberWithClassName_field() {
+  test_memberWithClassName_field() async {
     Source source = addSource(r'''
 class A {
   int A = 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
     verify([source]);
   }
 
-  void test_memberWithClassName_field2() {
+  test_memberWithClassName_field2() async {
     Source source = addSource(r'''
 class A {
   int z, A, b = 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
     verify([source]);
   }
 
-  void test_memberWithClassName_getter() {
+  test_memberWithClassName_getter() async {
     Source source = addSource(r'''
 class A {
   get A => 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
     verify([source]);
   }
 
-  void test_memberWithClassName_method() {
+  test_memberWithClassName_method() async {
     // no test because indistinguishable from constructor
   }
 
-  void test_methodAndGetterWithSameName() {
+  test_methodAndGetterWithSameName() async {
     Source source = addSource(r'''
 class A {
   get x => 0;
   x(y) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME]);
     verify([source]);
   }
 
-  void test_mixinDeclaresConstructor_classDeclaration() {
+  test_mixinDeclaresConstructor_classDeclaration() async {
     Source source = addSource(r'''
 class A {
   A() {}
 }
 class B extends Object with A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_mixinDeclaresConstructor_typeAlias() {
+  test_mixinDeclaresConstructor_typeAlias() async {
     Source source = addSource(r'''
 class A {
   A() {}
 }
 class B = Object with A;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_mixinDeferredClass() {
-    resolveWithErrors(<String>[
+  test_mixinDeferredClass() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {}''',
@@ -3643,8 +3643,8 @@
     ]);
   }
 
-  void test_mixinDeferredClass_classTypeAlias() {
-    resolveWithErrors(<String>[
+  test_mixinDeferredClass_classTypeAlias() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 class A {}''',
@@ -3658,7 +3658,7 @@
     ]);
   }
 
-  void test_mixinHasNoConstructors_mixinApp() {
+  test_mixinHasNoConstructors_mixinApp() async {
     Source source = addSource(r'''
 class B {
   B({x});
@@ -3666,12 +3666,12 @@
 class M {}
 class C = B with M;
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS]);
     verify([source]);
   }
 
-  void test_mixinHasNoConstructors_mixinClass() {
+  test_mixinHasNoConstructors_mixinClass() async {
     Source source = addSource(r'''
 class B {
   B({x});
@@ -3683,12 +3683,12 @@
     // generate a further error (despite the fact that it's not forwarded),
     // since CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS does a better job
     // of explaining the probem to the user.
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS]);
     verify([source]);
   }
 
-  void test_mixinHasNoConstructors_mixinClass_explicitSuperCall() {
+  test_mixinHasNoConstructors_mixinClass_explicitSuperCall() async {
     Source source = addSource(r'''
 class B {
   B({x});
@@ -3702,12 +3702,12 @@
     // error (despite the fact that it's not forwarded), since
     // CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS does a better job of
     // explaining the error to the user.
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS]);
     verify([source]);
   }
 
-  void test_mixinHasNoConstructors_mixinClass_implicitSuperCall() {
+  test_mixinHasNoConstructors_mixinClass_implicitSuperCall() async {
     Source source = addSource(r'''
 class B {
   B({x});
@@ -3721,12 +3721,12 @@
     // error (despite the fact that it's not forwarded), since
     // CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS does a better job of
     // explaining the error to the user.
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS]);
     verify([source]);
   }
 
-  void test_mixinHasNoConstructors_mixinClass_namedSuperCall() {
+  test_mixinHasNoConstructors_mixinClass_namedSuperCall() async {
     Source source = addSource(r'''
 class B {
   B.named({x});
@@ -3740,152 +3740,152 @@
     // further error (despite the fact that it's not forwarded), since
     // CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS does a better job of
     // explaining the error to the user.
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS]);
     verify([source]);
   }
 
-  void test_mixinInheritsFromNotObject_classDeclaration_extends() {
+  test_mixinInheritsFromNotObject_classDeclaration_extends() async {
     Source source = addSource(r'''
 class A {}
 class B extends A {}
 class C extends Object with B {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
 
-  void test_mixinInheritsFromNotObject_classDeclaration_with() {
+  test_mixinInheritsFromNotObject_classDeclaration_with() async {
     Source source = addSource(r'''
 class A {}
 class B extends Object with A {}
 class C extends Object with B {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
 
-  void test_mixinInheritsFromNotObject_typeAlias_extends() {
+  test_mixinInheritsFromNotObject_typeAlias_extends() async {
     Source source = addSource(r'''
 class A {}
 class B extends A {}
 class C = Object with B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
 
-  void test_mixinInheritsFromNotObject_typeAlias_with() {
+  test_mixinInheritsFromNotObject_typeAlias_with() async {
     Source source = addSource(r'''
 class A {}
 class B extends Object with A {}
 class C = Object with B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_class_bool() {
+  test_mixinOfDisallowedClass_class_bool() async {
     Source source = addSource("class A extends Object with bool {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_class_double() {
+  test_mixinOfDisallowedClass_class_double() async {
     Source source = addSource("class A extends Object with double {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_class_int() {
+  test_mixinOfDisallowedClass_class_int() async {
     Source source = addSource("class A extends Object with int {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_class_Null() {
+  test_mixinOfDisallowedClass_class_Null() async {
     Source source = addSource("class A extends Object with Null {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_class_num() {
+  test_mixinOfDisallowedClass_class_num() async {
     Source source = addSource("class A extends Object with num {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_class_String() {
+  test_mixinOfDisallowedClass_class_String() async {
     Source source = addSource("class A extends Object with String {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_bool() {
+  test_mixinOfDisallowedClass_classTypeAlias_bool() async {
     Source source = addSource(r'''
 class A {}
 class C = A with bool;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_double() {
+  test_mixinOfDisallowedClass_classTypeAlias_double() async {
     Source source = addSource(r'''
 class A {}
 class C = A with double;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_int() {
+  test_mixinOfDisallowedClass_classTypeAlias_int() async {
     Source source = addSource(r'''
 class A {}
 class C = A with int;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_Null() {
+  test_mixinOfDisallowedClass_classTypeAlias_Null() async {
     Source source = addSource(r'''
 class A {}
 class C = A with Null;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_num() {
+  test_mixinOfDisallowedClass_classTypeAlias_num() async {
     Source source = addSource(r'''
 class A {}
 class C = A with num;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_String() {
+  test_mixinOfDisallowedClass_classTypeAlias_String() async {
     Source source = addSource(r'''
 class A {}
 class C = A with String;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfDisallowedClass_classTypeAlias_String_num() {
+  test_mixinOfDisallowedClass_classTypeAlias_String_num() async {
     Source source = addSource(r'''
 class A {}
 class C = A with String, num;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
       CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
@@ -3893,113 +3893,113 @@
     verify([source]);
   }
 
-  void test_mixinOfEnum() {
+  test_mixinOfEnum() async {
     Source source = addSource(r'''
 enum E { ONE }
 class A extends Object with E {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_ENUM]);
     verify([source]);
   }
 
-  void test_mixinOfNonClass_class() {
+  test_mixinOfNonClass_class() async {
     Source source = addSource(r'''
 int A;
 class B extends Object with A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
     verify([source]);
   }
 
-  void test_mixinOfNonClass_typeAlias() {
+  test_mixinOfNonClass_typeAlias() async {
     Source source = addSource(r'''
 class A {}
 int B;
 class C = A with B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
     verify([source]);
   }
 
-  void test_mixinReferencesSuper() {
+  test_mixinReferencesSuper() async {
     Source source = addSource(r'''
 class A {
   toString() => super.toString();
 }
 class B extends Object with A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
     verify([source]);
   }
 
-  void test_mixinWithNonClassSuperclass_class() {
+  test_mixinWithNonClassSuperclass_class() async {
     Source source = addSource(r'''
 int A;
 class B {}
 class C extends A with B {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
     verify([source]);
   }
 
-  void test_mixinWithNonClassSuperclass_typeAlias() {
+  test_mixinWithNonClassSuperclass_typeAlias() async {
     Source source = addSource(r'''
 int A;
 class B {}
 class C = A with B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
     verify([source]);
   }
 
-  void test_multipleRedirectingConstructorInvocations() {
+  test_multipleRedirectingConstructorInvocations() async {
     Source source = addSource(r'''
 class A {
   A() : this.a(), this.b();
   A.a() {}
   A.b() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS]);
     verify([source]);
   }
 
-  void test_multipleSuperInitializers() {
+  test_multipleSuperInitializers() async {
     Source source = addSource(r'''
 class A {}
 class B extends A {
   B() : super(), super() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS]);
     verify([source]);
   }
 
-  void test_nativeClauseInNonSDKCode() {
+  test_nativeClauseInNonSDKCode() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
     Source source = addSource("class A native 'string' {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
     verify([source]);
   }
 
-  void test_nativeFunctionBodyInNonSDKCode_function() {
+  test_nativeFunctionBodyInNonSDKCode_function() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
     Source source = addSource("int m(a) native 'string';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
     verify([source]);
   }
 
-  void test_nativeFunctionBodyInNonSDKCode_method() {
+  test_nativeFunctionBodyInNonSDKCode_method() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
@@ -4007,13 +4007,13 @@
 class A{
   static int m(a) native 'string';
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
     verify([source]);
   }
 
-  void test_noAnnotationConstructorArguments() {
+  test_noAnnotationConstructorArguments() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -4021,13 +4021,13 @@
 @A
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit() {
+  test_noDefaultSuperConstructorExplicit() async {
     Source source = addSource(r'''
 class A {
   A(p);
@@ -4035,13 +4035,13 @@
 class B extends A {
   B() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit_MixinAppWithDirectSuperCall() {
+  test_noDefaultSuperConstructorExplicit_MixinAppWithDirectSuperCall() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4053,13 +4053,13 @@
   C(x) : super();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit_mixinAppWithNamedParam() {
+  test_noDefaultSuperConstructorExplicit_mixinAppWithNamedParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4071,13 +4071,13 @@
   C();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit_MixinAppWithNamedSuperCall() {
+  test_noDefaultSuperConstructorExplicit_MixinAppWithNamedSuperCall() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4089,13 +4089,13 @@
   C(x) : super.named();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
     // Don't verify since call to super.named() can't be resolved.
   }
 
-  void test_noDefaultSuperConstructorExplicit_mixinAppWithOptionalParam() {
+  test_noDefaultSuperConstructorExplicit_mixinAppWithOptionalParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4107,13 +4107,13 @@
   C();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit_MixinWithDirectSuperCall() {
+  test_noDefaultSuperConstructorExplicit_MixinWithDirectSuperCall() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4124,13 +4124,13 @@
   C(x) : super();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit_mixinWithNamedParam() {
+  test_noDefaultSuperConstructorExplicit_mixinWithNamedParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4141,13 +4141,13 @@
   C();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorExplicit_MixinWithNamedSuperCall() {
+  test_noDefaultSuperConstructorExplicit_MixinWithNamedSuperCall() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4158,13 +4158,13 @@
   C(x) : super.named();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
     // Don't verify since call to super.named() can't be resolved.
   }
 
-  void test_noDefaultSuperConstructorExplicit_mixinWithOptionalParam() {
+  test_noDefaultSuperConstructorExplicit_mixinWithOptionalParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4175,13 +4175,13 @@
   C();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorImplicit_mixinAppWithNamedParam() {
+  test_noDefaultSuperConstructorImplicit_mixinAppWithNamedParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4191,13 +4191,13 @@
 class Mixed = B with M;
 class C extends Mixed {}
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorImplicit_mixinAppWithOptionalParam() {
+  test_noDefaultSuperConstructorImplicit_mixinAppWithOptionalParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4207,13 +4207,13 @@
 class Mixed = B with M;
 class C extends Mixed {}
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorImplicit_mixinWithNamedParam() {
+  test_noDefaultSuperConstructorImplicit_mixinWithNamedParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4222,13 +4222,13 @@
 }
 class C extends B with M {}
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorImplicit_mixinWithOptionalParam() {
+  test_noDefaultSuperConstructorImplicit_mixinWithOptionalParam() async {
     Source source = addSource(r'''
 class M {}
 class B {
@@ -4237,36 +4237,36 @@
 }
 class C extends B with M {}
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorImplicit_superHasParameters() {
+  test_noDefaultSuperConstructorImplicit_superHasParameters() async {
     Source source = addSource(r'''
 class A {
   A(p);
 }
 class B extends A {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
 
-  void test_noDefaultSuperConstructorImplicit_superOnlyNamed() {
+  test_noDefaultSuperConstructorImplicit_superOnlyNamed() async {
     Source source = addSource(r'''
 class A { A.named() {} }
 class B extends A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
 
-  void test_nonConstantAnnotationConstructor_named() {
+  test_nonConstantAnnotationConstructor_named() async {
     Source source = addSource(r'''
 class A {
   A.fromInt() {}
@@ -4274,13 +4274,13 @@
 @A.fromInt()
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_nonConstantAnnotationConstructor_unnamed() {
+  test_nonConstantAnnotationConstructor_unnamed() async {
     Source source = addSource(r'''
 class A {
   A() {}
@@ -4288,76 +4288,76 @@
 @A()
 main() {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValue_function_named() {
+  test_nonConstantDefaultValue_function_named() async {
     Source source = addSource(r'''
 int y;
 f({x : y}) {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValue_function_positional() {
+  test_nonConstantDefaultValue_function_positional() async {
     Source source = addSource(r'''
 int y;
 f([x = y]) {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValue_inConstructor_named() {
+  test_nonConstantDefaultValue_inConstructor_named() async {
     Source source = addSource(r'''
 class A {
   int y;
   A({x : y}) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValue_inConstructor_positional() {
+  test_nonConstantDefaultValue_inConstructor_positional() async {
     Source source = addSource(r'''
 class A {
   int y;
   A([x = y]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValue_method_named() {
+  test_nonConstantDefaultValue_method_named() async {
     Source source = addSource(r'''
 class A {
   int y;
   m({x : y}) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValue_method_positional() {
+  test_nonConstantDefaultValue_method_positional() async {
     Source source = addSource(r'''
 class A {
   int y;
   m([x = y]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstantDefaultValueFromDeferredLibrary() {
-    resolveWithErrors(<String>[
+  test_nonConstantDefaultValueFromDeferredLibrary() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const V = 1;''',
@@ -4370,8 +4370,8 @@
     ]);
   }
 
-  void test_nonConstantDefaultValueFromDeferredLibrary_nested() {
-    resolveWithErrors(<String>[
+  test_nonConstantDefaultValueFromDeferredLibrary_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const V = 1;''',
@@ -4384,7 +4384,7 @@
     ]);
   }
 
-  void test_nonConstCaseExpression() {
+  test_nonConstCaseExpression() async {
     Source source = addSource(r'''
 f(int p, int q) {
   switch (p) {
@@ -4392,13 +4392,13 @@
       break;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
     verify([source]);
   }
 
-  void test_nonConstCaseExpressionFromDeferredLibrary() {
-    resolveWithErrors(<String>[
+  test_nonConstCaseExpressionFromDeferredLibrary() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4416,8 +4416,8 @@
     ]);
   }
 
-  void test_nonConstCaseExpressionFromDeferredLibrary_nested() {
-    resolveWithErrors(<String>[
+  test_nonConstCaseExpressionFromDeferredLibrary_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4435,18 +4435,18 @@
     ]);
   }
 
-  void test_nonConstListElement() {
+  test_nonConstListElement() async {
     Source source = addSource(r'''
 f(a) {
   return const [a];
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
     verify([source]);
   }
 
-  void test_nonConstListElementFromDeferredLibrary() {
-    resolveWithErrors(<String>[
+  test_nonConstListElementFromDeferredLibrary() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4461,8 +4461,8 @@
     ]);
   }
 
-  void test_nonConstListElementFromDeferredLibrary_nested() {
-    resolveWithErrors(<String>[
+  test_nonConstListElementFromDeferredLibrary_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4477,40 +4477,40 @@
     ]);
   }
 
-  void test_nonConstMapAsExpressionStatement_begin() {
+  test_nonConstMapAsExpressionStatement_begin() async {
     Source source = addSource(r'''
 f() {
   {'a' : 0, 'b' : 1}.length;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
     verify([source]);
   }
 
-  void test_nonConstMapAsExpressionStatement_only() {
+  test_nonConstMapAsExpressionStatement_only() async {
     Source source = addSource(r'''
 f() {
   {'a' : 0, 'b' : 1};
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
     verify([source]);
   }
 
-  void test_nonConstMapKey() {
+  test_nonConstMapKey() async {
     Source source = addSource(r'''
 f(a) {
   return const {a : 0};
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
     verify([source]);
   }
 
-  void test_nonConstMapKeyFromDeferredLibrary() {
-    resolveWithErrors(<String>[
+  test_nonConstMapKeyFromDeferredLibrary() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4525,8 +4525,8 @@
     ]);
   }
 
-  void test_nonConstMapKeyFromDeferredLibrary_nested() {
-    resolveWithErrors(<String>[
+  test_nonConstMapKeyFromDeferredLibrary_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4541,18 +4541,18 @@
     ]);
   }
 
-  void test_nonConstMapValue() {
+  test_nonConstMapValue() async {
     Source source = addSource(r'''
 f(a) {
   return const {'a' : a};
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
     verify([source]);
   }
 
-  void test_nonConstMapValueFromDeferredLibrary() {
-    resolveWithErrors(<String>[
+  test_nonConstMapValueFromDeferredLibrary() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4567,8 +4567,8 @@
     ]);
   }
 
-  void test_nonConstMapValueFromDeferredLibrary_nested() {
-    resolveWithErrors(<String>[
+  test_nonConstMapValueFromDeferredLibrary_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4583,37 +4583,39 @@
     ]);
   }
 
-  void test_nonConstValueInInitializer_assert_condition() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableAssertInitializer = true);
+  test_nonConstValueInInitializer_assert_condition() async {
+    resetWith(
+        options: new AnalysisOptionsImpl()..enableAssertInitializer = true);
     Source source = addSource(r'''
 class A {
   const A(int i) : assert(i.isNegative);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_assert_message() {
-    resetWithOptions(new AnalysisOptionsImpl()..enableAssertInitializer = true);
+  test_nonConstValueInInitializer_assert_message() async {
+    resetWith(
+        options: new AnalysisOptionsImpl()..enableAssertInitializer = true);
     Source source = addSource(r'''
 class A {
   const A(int i) : assert(i < 0, 'isNegative = ${i.isNegative}');
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_binary_notBool_left() {
+  test_nonConstValueInInitializer_binary_notBool_left() async {
     Source source = addSource(r'''
 class A {
   final bool a;
   const A(String p) : a = p && true;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
       StaticTypeWarningCode.NON_BOOL_OPERAND
@@ -4621,13 +4623,13 @@
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_binary_notBool_right() {
+  test_nonConstValueInInitializer_binary_notBool_right() async {
     Source source = addSource(r'''
 class A {
   final bool a;
   const A(String p) : a = true && p;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
       StaticTypeWarningCode.NON_BOOL_OPERAND
@@ -4635,13 +4637,13 @@
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_binary_notInt() {
+  test_nonConstValueInInitializer_binary_notInt() async {
     Source source = addSource(r'''
 class A {
   final int a;
   const A(String p) : a = 5 & p;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -4649,13 +4651,13 @@
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_binary_notNum() {
+  test_nonConstValueInInitializer_binary_notNum() async {
     Source source = addSource(r'''
 class A {
   final int a;
   const A(String p) : a = 5 + p;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -4663,20 +4665,20 @@
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_field() {
+  test_nonConstValueInInitializer_field() async {
     Source source = addSource(r'''
 class A {
   static int C;
   final int a;
   const A() : a = C;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_instanceCreation() {
+  test_nonConstValueInInitializer_instanceCreation() async {
     Source source = addSource(r'''
 class A {
   A();
@@ -4686,9 +4688,9 @@
   final a;
 }
 var b = const B();''');
-    computeLibrarySourceErrors(source);
     // TODO(paulberry): the error INVALID_CONSTAT is redundant and ought to be
     // suppressed.
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
       CompileTimeErrorCode.INVALID_CONSTANT
@@ -4696,20 +4698,20 @@
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_redirecting() {
+  test_nonConstValueInInitializer_redirecting() async {
     Source source = addSource(r'''
 class A {
   static var C;
   const A.named(p);
   const A() : this.named(C);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_nonConstValueInInitializer_super() {
+  test_nonConstValueInInitializer_super() async {
     Source source = addSource(r'''
 class A {
   const A(p);
@@ -4718,14 +4720,14 @@
   static var C;
   const B() : super(C);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
 
-  void test_nonConstValueInInitializerFromDeferredLibrary_field() {
-    resolveWithErrors(<String>[
+  test_nonConstValueInInitializerFromDeferredLibrary_field() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4742,8 +4744,8 @@
     ]);
   }
 
-  void test_nonConstValueInInitializerFromDeferredLibrary_field_nested() {
-    resolveWithErrors(<String>[
+  test_nonConstValueInInitializerFromDeferredLibrary_field_nested() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4760,8 +4762,8 @@
     ]);
   }
 
-  void test_nonConstValueInInitializerFromDeferredLibrary_redirecting() {
-    resolveWithErrors(<String>[
+  test_nonConstValueInInitializerFromDeferredLibrary_redirecting() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4778,8 +4780,8 @@
     ]);
   }
 
-  void test_nonConstValueInInitializerFromDeferredLibrary_super() {
-    resolveWithErrors(<String>[
+  test_nonConstValueInInitializerFromDeferredLibrary_super() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 const int c = 1;''',
@@ -4798,7 +4800,7 @@
     ]);
   }
 
-  void test_nonGenerativeConstructor_explicit() {
+  test_nonGenerativeConstructor_explicit() async {
     Source source = addSource(r'''
 class A {
   factory A.named() => null;
@@ -4806,12 +4808,12 @@
 class B extends A {
   B() : super.named();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_nonGenerativeConstructor_implicit() {
+  test_nonGenerativeConstructor_implicit() async {
     Source source = addSource(r'''
 class A {
   factory A() => null;
@@ -4819,24 +4821,24 @@
 class B extends A {
   B();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_nonGenerativeConstructor_implicit2() {
+  test_nonGenerativeConstructor_implicit2() async {
     Source source = addSource(r'''
 class A {
   factory A() => null;
 }
 class B extends A {
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_notEnoughRequiredArguments_const() {
+  test_notEnoughRequiredArguments_const() async {
     Source source = addSource(r'''
 class A {
   const A(int p);
@@ -4844,12 +4846,12 @@
 main() {
   const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
     verify([source]);
   }
 
-  void test_notEnoughRequiredArguments_const_super() {
+  test_notEnoughRequiredArguments_const_super() async {
     Source source = addSource(r'''
 class A {
   const A(int p);
@@ -4857,51 +4859,51 @@
 class B extends A {
   const B() : super();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
     verify([source]);
   }
 
-  void test_optionalParameterInOperator_named() {
+  test_optionalParameterInOperator_named() async {
     Source source = addSource(r'''
 class A {
   operator +({p}) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
     verify([source]);
   }
 
-  void test_optionalParameterInOperator_positional() {
+  test_optionalParameterInOperator_positional() async {
     Source source = addSource(r'''
 class A {
   operator +([p]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
     verify([source]);
   }
 
-  void test_partOfNonPart() {
+  test_partOfNonPart() async {
     Source source = addSource(r'''
 library l1;
 part 'l2.dart';''');
     addNamedSource("/l2.dart", "library l2;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
     verify([source]);
   }
 
-  void test_partOfNonPart_self() {
+  test_partOfNonPart_self() async {
     Source source = addSource(r'''
 library lib;
 part 'test.dart';''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
     verify([source]);
   }
 
-  void test_prefix_assignment_compound_in_method() {
+  test_prefix_assignment_compound_in_method() async {
     addNamedSource('/lib.dart', 'library lib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -4911,13 +4913,13 @@
   }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_assignment_compound_not_in_method() {
+  test_prefix_assignment_compound_not_in_method() async {
     addNamedSource('/lib.dart', 'library lib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -4925,13 +4927,13 @@
   p += 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_assignment_in_method() {
+  test_prefix_assignment_in_method() async {
     addNamedSource('/lib.dart', 'library lib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -4941,13 +4943,13 @@
   }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_assignment_not_in_method() {
+  test_prefix_assignment_not_in_method() async {
     addNamedSource('/lib.dart', 'library lib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -4955,13 +4957,13 @@
   p = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_conditionalPropertyAccess_call() {
+  test_prefix_conditionalPropertyAccess_call() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -4974,13 +4976,13 @@
   p?.g();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_conditionalPropertyAccess_call_loadLibrary() {
+  test_prefix_conditionalPropertyAccess_call_loadLibrary() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -4992,13 +4994,13 @@
   p?.loadLibrary();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_conditionalPropertyAccess_get() {
+  test_prefix_conditionalPropertyAccess_get() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -5011,13 +5013,13 @@
   return p?.x;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_conditionalPropertyAccess_get_loadLibrary() {
+  test_prefix_conditionalPropertyAccess_get_loadLibrary() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -5029,13 +5031,13 @@
   return p?.loadLibrary;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_conditionalPropertyAccess_set() {
+  test_prefix_conditionalPropertyAccess_set() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -5048,13 +5050,13 @@
   p?.x = null;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_conditionalPropertyAccess_set_loadLibrary() {
+  test_prefix_conditionalPropertyAccess_set_loadLibrary() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -5066,13 +5068,13 @@
   p?.loadLibrary = null;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_unqualified_invocation_in_method() {
+  test_prefix_unqualified_invocation_in_method() async {
     addNamedSource('/lib.dart', 'librarylib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -5082,13 +5084,13 @@
   }
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefix_unqualified_invocation_not_in_method() {
+  test_prefix_unqualified_invocation_not_in_method() async {
     addNamedSource('/lib.dart', 'librarylib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -5096,13 +5098,13 @@
   p();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefixCollidesWithTopLevelMembers_functionTypeAlias() {
+  test_prefixCollidesWithTopLevelMembers_functionTypeAlias() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -5112,13 +5114,13 @@
 import 'lib.dart' as p;
 typedef p();
 p.A a;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
     verify([source]);
   }
 
-  void test_prefixCollidesWithTopLevelMembers_topLevelFunction() {
+  test_prefixCollidesWithTopLevelMembers_topLevelFunction() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -5128,13 +5130,13 @@
 import 'lib.dart' as p;
 p() {}
 p.A a;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
     verify([source]);
   }
 
-  void test_prefixCollidesWithTopLevelMembers_topLevelVariable() {
+  test_prefixCollidesWithTopLevelMembers_topLevelVariable() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -5144,13 +5146,13 @@
 import 'lib.dart' as p;
 var p = null;
 p.A a;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
     verify([source]);
   }
 
-  void test_prefixCollidesWithTopLevelMembers_type() {
+  test_prefixCollidesWithTopLevelMembers_type() async {
     addNamedSource(
         "/lib.dart",
         r'''
@@ -5160,13 +5162,13 @@
 import 'lib.dart' as p;
 class p {}
 p.A a;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
     verify([source]);
   }
 
-  void test_prefixNotFollowedByDot() {
+  test_prefixNotFollowedByDot() async {
     addNamedSource('/lib.dart', 'library lib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -5174,13 +5176,13 @@
   return p;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefixNotFollowedByDot_compoundAssignment() {
+  test_prefixNotFollowedByDot_compoundAssignment() async {
     addNamedSource('/lib.dart', 'library lib;');
     Source source = addSource('''
 import 'lib.dart' as p;
@@ -5188,13 +5190,13 @@
   p += 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_prefixNotFollowedByDot_conditionalMethodInvocation() {
+  test_prefixNotFollowedByDot_conditionalMethodInvocation() async {
     addNamedSource(
         '/lib.dart',
         '''
@@ -5207,54 +5209,54 @@
   p?.g();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
     verify([source]);
   }
 
-  void test_privateOptionalParameter() {
+  test_privateOptionalParameter() async {
     Source source = addSource("f({var _p}) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
     verify([source]);
   }
 
-  void test_privateOptionalParameter_fieldFormal() {
+  test_privateOptionalParameter_fieldFormal() async {
     Source source = addSource(r'''
 class A {
   var _p;
   A({this._p: 0});
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
     verify([source]);
   }
 
-  void test_privateOptionalParameter_withDefaultValue() {
+  test_privateOptionalParameter_withDefaultValue() async {
     Source source = addSource("f({_p : 0}) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
     verify([source]);
   }
 
-  void test_recursiveCompileTimeConstant() {
+  test_recursiveCompileTimeConstant() async {
     Source source = addSource(r'''
 class A {
   const A();
   final m = const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
     verify([source]);
   }
 
-  void test_recursiveCompileTimeConstant_cycle() {
+  test_recursiveCompileTimeConstant_cycle() async {
     Source source = addSource(r'''
 const x = y + 1;
 const y = x + 1;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
       CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT
@@ -5262,7 +5264,7 @@
     verify([source]);
   }
 
-  void test_recursiveCompileTimeConstant_initializer_after_toplevel_var() {
+  test_recursiveCompileTimeConstant_initializer_after_toplevel_var() async {
     Source source = addSource('''
 const y = const C();
 class C {
@@ -5270,29 +5272,29 @@
   final x;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
     verify([source]);
   }
 
-  void test_recursiveCompileTimeConstant_singleVariable() {
+  test_recursiveCompileTimeConstant_singleVariable() async {
     Source source = addSource(r'''
 const x = x;
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
     verify([source]);
   }
 
-  void test_recursiveConstructorRedirect() {
+  test_recursiveConstructorRedirect() async {
     Source source = addSource(r'''
 class A {
   A.a() : this.b();
   A.b() : this.a();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT
@@ -5300,17 +5302,17 @@
     verify([source]);
   }
 
-  void test_recursiveConstructorRedirect_directSelfReference() {
+  test_recursiveConstructorRedirect_directSelfReference() async {
     Source source = addSource(r'''
 class A {
   A() : this();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
     verify([source]);
   }
 
-  void test_recursiveFactoryRedirect() {
+  test_recursiveFactoryRedirect() async {
     Source source = addSource(r'''
 class A implements B {
   factory A() = C;
@@ -5321,7 +5323,7 @@
 class C implements A {
   factory C() = B;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5333,17 +5335,17 @@
     verify([source]);
   }
 
-  void test_recursiveFactoryRedirect_directSelfReference() {
+  test_recursiveFactoryRedirect_directSelfReference() async {
     Source source = addSource(r'''
 class A {
   factory A() = A;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
     verify([source]);
   }
 
-  void test_recursiveFactoryRedirect_diverging() {
+  test_recursiveFactoryRedirect_diverging() async {
     // Analysis should terminate even though the redirections don't reach a
     // fixed point.  (C<int> redirects to C<C<int>>, then to C<C<C<int>>>, and
     // so on).
@@ -5355,12 +5357,12 @@
   const C<int>();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
     verify([source]);
   }
 
-  void test_recursiveFactoryRedirect_generic() {
+  test_recursiveFactoryRedirect_generic() async {
     Source source = addSource(r'''
 class A<T> implements B<T> {
   factory A() = C;
@@ -5371,7 +5373,7 @@
 class C<T> implements A<T> {
   factory C() = B;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5383,7 +5385,7 @@
     verify([source]);
   }
 
-  void test_recursiveFactoryRedirect_named() {
+  test_recursiveFactoryRedirect_named() async {
     Source source = addSource(r'''
 class A implements B {
   factory A.nameA() = C.nameC;
@@ -5394,7 +5396,7 @@
 class C implements A {
   factory C.nameC() = B.nameB;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5410,7 +5412,7 @@
    * "A" references "C" which has cycle with "B". But we should not report problem for "A" - it is
    * not the part of a cycle.
    */
-  void test_recursiveFactoryRedirect_outsideCycle() {
+  test_recursiveFactoryRedirect_outsideCycle() async {
     Source source = addSource(r'''
 class A {
   factory A() = C;
@@ -5421,7 +5423,7 @@
 class C implements A, B {
   factory C() = B;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5431,11 +5433,11 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_extends() {
+  test_recursiveInterfaceInheritance_extends() async {
     Source source = addSource(r'''
 class A extends B {}
 class B extends A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -5443,11 +5445,11 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_extends_implements() {
+  test_recursiveInterfaceInheritance_extends_implements() async {
     Source source = addSource(r'''
 class A extends B {}
 class B implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -5455,11 +5457,11 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_implements() {
+  test_recursiveInterfaceInheritance_implements() async {
     Source source = addSource(r'''
 class A implements B {}
 class B implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -5467,11 +5469,11 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_mixin() {
+  test_recursiveInterfaceInheritance_mixin() async {
     Source source = addSource(r'''
 class M1 = Object with M2;
 class M2 = Object with M1;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -5479,7 +5481,7 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_mixin_superclass() {
+  test_recursiveInterfaceInheritance_mixin_superclass() async {
     // Make sure we don't get CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS in
     // addition--that would just be confusing.
     Source source = addSource('''
@@ -5487,7 +5489,7 @@
 class D = C with M;
 class M {}
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -5495,23 +5497,23 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_tail() {
+  test_recursiveInterfaceInheritance_tail() async {
     Source source = addSource(r'''
 abstract class A implements A {}
 class B implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS
     ]);
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_tail2() {
+  test_recursiveInterfaceInheritance_tail2() async {
     Source source = addSource(r'''
 abstract class A implements B {}
 abstract class B implements A {}
 class C implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -5519,13 +5521,13 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritance_tail3() {
+  test_recursiveInterfaceInheritance_tail3() async {
     Source source = addSource(r'''
 abstract class A implements B {}
 abstract class B implements C {}
 abstract class C implements A {}
 class D implements A {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
@@ -5534,23 +5536,23 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritanceBaseCaseExtends() {
+  test_recursiveInterfaceInheritanceBaseCaseExtends() async {
     Source source = addSource("class A extends A {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
     ]);
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritanceBaseCaseExtends_abstract() {
+  test_recursiveInterfaceInheritanceBaseCaseExtends_abstract() async {
     Source source = addSource(r'''
 class C extends C {
   var bar = 0;
   m();
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
       StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
@@ -5559,59 +5561,59 @@
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritanceBaseCaseImplements() {
+  test_recursiveInterfaceInheritanceBaseCaseImplements() async {
     Source source = addSource("class A implements A {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS
     ]);
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() {
+  test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() async {
     Source source = addSource(r'''
 class A {}
 class M {}
 class B = A with M implements B;''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS
     ]);
     verify([source]);
   }
 
-  void test_recursiveInterfaceInheritanceBaseCaseWith() {
+  test_recursiveInterfaceInheritanceBaseCaseWith() async {
     Source source = addSource("class M = Object with M;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH]);
     verify([source]);
   }
 
-  void test_redirectGenerativeToMissingConstructor() {
+  test_redirectGenerativeToMissingConstructor() async {
     Source source = addSource(r'''
 class A {
   A() : this.noSuchConstructor();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
   }
 
-  void test_redirectGenerativeToNonGenerativeConstructor() {
+  test_redirectGenerativeToNonGenerativeConstructor() async {
     Source source = addSource(r'''
 class A {
   A() : this.x();
   factory A.x() => null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR
     ]);
     verify([source]);
   }
 
-  void test_redirectToMissingConstructor_named() {
+  test_redirectToMissingConstructor_named() async {
     Source source = addSource(r'''
 class A implements B{
   A() {}
@@ -5619,12 +5621,12 @@
 class B {
   const factory B() = A.name;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
   }
 
-  void test_redirectToMissingConstructor_unnamed() {
+  test_redirectToMissingConstructor_unnamed() async {
     Source source = addSource(r'''
 class A implements B{
   A.name() {}
@@ -5632,45 +5634,45 @@
 class B {
   const factory B() = A;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
   }
 
-  void test_redirectToNonClass_notAType() {
+  test_redirectToNonClass_notAType() async {
     Source source = addSource(r'''
 int A;
 class B {
   const factory B() = A;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
     verify([source]);
   }
 
-  void test_redirectToNonClass_undefinedIdentifier() {
+  test_redirectToNonClass_undefinedIdentifier() async {
     Source source = addSource(r'''
 class B {
   const factory B() = A;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
     verify([source]);
   }
 
-  void test_redirectToNonConstConstructor() {
+  test_redirectToNonConstConstructor() async {
     Source source = addSource(r'''
 class A {
   A.a() {}
   const factory A.b() = A.a;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_referencedBeforeDeclaration_hideInBlock_function() {
+  test_referencedBeforeDeclaration_hideInBlock_function() async {
     Source source = addSource(r'''
 var v = 1;
 main() {
@@ -5678,11 +5680,11 @@
   v() {}
 }
 print(x) {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_referencedBeforeDeclaration_hideInBlock_local() {
+  test_referencedBeforeDeclaration_hideInBlock_local() async {
     Source source = addSource(r'''
 var v = 1;
 main() {
@@ -5690,11 +5692,11 @@
   var v = 2;
 }
 print(x) {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_referencedBeforeDeclaration_hideInBlock_subBlock() {
+  test_referencedBeforeDeclaration_hideInBlock_subBlock() async {
     Source source = addSource(r'''
 var v = 1;
 main() {
@@ -5704,104 +5706,104 @@
   var v = 2;
 }
 print(x) {}''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_referencedBeforeDeclaration_inInitializer_closure() {
+  test_referencedBeforeDeclaration_inInitializer_closure() async {
     Source source = addSource(r'''
 main() {
   var v = () => v;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_referencedBeforeDeclaration_inInitializer_directly() {
+  test_referencedBeforeDeclaration_inInitializer_directly() async {
     Source source = addSource(r'''
 main() {
   var v = v;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_referencedBeforeDeclaration_type_localFunction() {
+  test_referencedBeforeDeclaration_type_localFunction() async {
     Source source = addSource(r'''
 void testTypeRef() {
   String s = '';
   int String(int x) => x + 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_referencedBeforeDeclaration_type_localVariable() {
+  test_referencedBeforeDeclaration_type_localVariable() async {
     Source source = addSource(r'''
 void testTypeRef() {
   String s = '';
   var String = '';
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
-  void test_rethrowOutsideCatch() {
+  test_rethrowOutsideCatch() async {
     Source source = addSource(r'''
 f() {
   rethrow;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]);
     verify([source]);
   }
 
-  void test_returnInGenerativeConstructor() {
+  test_returnInGenerativeConstructor() async {
     Source source = addSource(r'''
 class A {
   A() { return 0; }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_returnInGenerativeConstructor_expressionFunctionBody() {
+  test_returnInGenerativeConstructor_expressionFunctionBody() async {
     Source source = addSource(r'''
 class A {
   A() => null;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_returnInGenerator_asyncStar() {
+  test_returnInGenerator_asyncStar() async {
     Source source = addSource(r'''
 f() async* {
   return 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.RETURN_IN_GENERATOR]);
     verify([source]);
   }
 
-  void test_returnInGenerator_syncStar() {
+  test_returnInGenerator_syncStar() async {
     Source source = addSource(r'''
 f() sync* {
   return 0;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.RETURN_IN_GENERATOR]);
     verify([source]);
   }
 
-  void test_sharedDeferredPrefix() {
-    resolveWithErrors(<String>[
+  test_sharedDeferredPrefix() async {
+    await resolveWithErrors(<String>[
       r'''
 library lib1;
 f1() {}''',
@@ -5818,14 +5820,14 @@
     ]);
   }
 
-  void test_superInInvalidContext_binaryExpression() {
+  test_superInInvalidContext_binaryExpression() async {
     Source source = addSource("var v = super + 0;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.v' is not resolved
   }
 
-  void test_superInInvalidContext_constructorFieldInitializer() {
+  test_superInInvalidContext_constructorFieldInitializer() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -5834,12 +5836,12 @@
   var f;
   B() : f = super.m();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.m' is not resolved
   }
 
-  void test_superInInvalidContext_factoryConstructor() {
+  test_superInInvalidContext_factoryConstructor() async {
     Source source = addSource(r'''
 class A {
   m() {}
@@ -5850,12 +5852,12 @@
     return null;
   }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.m' is not resolved
   }
 
-  void test_superInInvalidContext_instanceVariableInitializer() {
+  test_superInInvalidContext_instanceVariableInitializer() async {
     Source source = addSource(r'''
 class A {
   var a;
@@ -5863,12 +5865,12 @@
 class B extends A {
  var b = super.a;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.a' is not resolved
   }
 
-  void test_superInInvalidContext_staticMethod() {
+  test_superInInvalidContext_staticMethod() async {
     Source source = addSource(r'''
 class A {
   static m() {}
@@ -5876,12 +5878,12 @@
 class B extends A {
   static n() { return super.m(); }
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.m' is not resolved
   }
 
-  void test_superInInvalidContext_staticVariableInitializer() {
+  test_superInInvalidContext_staticVariableInitializer() async {
     Source source = addSource(r'''
 class A {
   static int a = 0;
@@ -5889,62 +5891,62 @@
 class B extends A {
   static int b = super.a;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.a' is not resolved
   }
 
-  void test_superInInvalidContext_topLevelFunction() {
+  test_superInInvalidContext_topLevelFunction() async {
     Source source = addSource(r'''
 f() {
   super.f();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.f' is not resolved
   }
 
-  void test_superInInvalidContext_topLevelVariableInitializer() {
+  test_superInInvalidContext_topLevelVariableInitializer() async {
     Source source = addSource("var v = super.y;");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
     // no verify(), 'super.y' is not resolved
   }
 
-  void test_superInRedirectingConstructor_redirectionSuper() {
+  test_superInRedirectingConstructor_redirectionSuper() async {
     Source source = addSource(r'''
 class A {}
 class B {
   B() : this.name(), super();
   B.name() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_superInRedirectingConstructor_superRedirection() {
+  test_superInRedirectingConstructor_superRedirection() async {
     Source source = addSource(r'''
 class A {}
 class B {
   B() : super(), this.name();
   B.name() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
 
-  void test_symbol_constructor_badArgs() {
+  test_symbol_constructor_badArgs() async {
     Source source = addSource(r'''
 var s1 = const Symbol('3');
 var s2 = const Symbol(3);
 var s3 = const Symbol();
 var s4 = const Symbol('x', 'y');
 var s5 = const Symbol('x', foo: 'x');''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
@@ -5956,14 +5958,14 @@
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_11987() {
+  test_typeAliasCannotReferenceItself_11987() async {
     Source source = addSource(r'''
 typedef void F(List<G> l);
 typedef void G(List<F> l);
 main() {
   F foo(G g) => g;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
@@ -5971,7 +5973,7 @@
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_19459() {
+  test_typeAliasCannotReferenceItself_19459() async {
     // A complex example involving multiple classes.  This is legal, since
     // typedef F references itself only via a class.
     Source source = addSource(r'''
@@ -5982,44 +5984,44 @@
 abstract class E extends A<dynamic, F> {}
 typedef D F();
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_parameterType_named() {
+  test_typeAliasCannotReferenceItself_parameterType_named() async {
     Source source = addSource("typedef A({A a});");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_parameterType_positional() {
+  test_typeAliasCannotReferenceItself_parameterType_positional() async {
     Source source = addSource("typedef A([A a]);");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_parameterType_required() {
+  test_typeAliasCannotReferenceItself_parameterType_required() async {
     Source source = addSource("typedef A(A a);");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_parameterType_typeArgument() {
+  test_typeAliasCannotReferenceItself_parameterType_typeArgument() async {
     Source source = addSource("typedef A(List<A> a);");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() {
+  test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() async {
     // A typedef is allowed to indirectly reference itself via a class.
     Source source = addSource(r'''
 typedef C A();
@@ -6027,24 +6029,24 @@
 class C {
   B a;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_returnType() {
+  test_typeAliasCannotReferenceItself_returnType() async {
     Source source = addSource("typedef A A();");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_returnType_indirect() {
+  test_typeAliasCannotReferenceItself_returnType_indirect() async {
     Source source = addSource(r'''
 typedef B A();
 typedef A B();''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
@@ -6052,15 +6054,15 @@
     verify([source]);
   }
 
-  void test_typeAliasCannotReferenceItself_typeVariableBounds() {
+  test_typeAliasCannotReferenceItself_typeVariableBounds() async {
     Source source = addSource("typedef A<T extends A>();");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
 
-  void test_typeArgumentNotMatchingBounds_const() {
+  test_typeArgumentNotMatchingBounds_const() async {
     Source source = addSource(r'''
 class A {}
 class B {}
@@ -6068,35 +6070,35 @@
   const G();
 }
 f() { return const G<B>(); }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
 
-  void test_undefinedClass_const() {
+  test_undefinedClass_const() async {
     Source source = addSource(r'''
 f() {
   return const A();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.UNDEFINED_CLASS]);
     verify([source]);
   }
 
-  void test_undefinedConstructorInInitializer_explicit_named() {
+  test_undefinedConstructorInInitializer_explicit_named() async {
     Source source = addSource(r'''
 class A {}
 class B extends A {
   B() : super.named();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
     // no verify(), "super.named()" is not resolved
   }
 
-  void test_undefinedConstructorInInitializer_explicit_unnamed() {
+  test_undefinedConstructorInInitializer_explicit_unnamed() async {
     Source source = addSource(r'''
 class A {
   A.named() {}
@@ -6104,13 +6106,13 @@
 class B extends A {
   B() : super();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
 
-  void test_undefinedConstructorInInitializer_implicit() {
+  test_undefinedConstructorInInitializer_implicit() async {
     Source source = addSource(r'''
 class A {
   A.named() {}
@@ -6118,13 +6120,13 @@
 class B extends A {
   B();
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
 
-  void test_undefinedNamedParameter() {
+  test_undefinedNamedParameter() async {
     Source source = addSource(r'''
 class A {
   const A();
@@ -6132,41 +6134,42 @@
 main() {
   const A(p: 0);
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
     // no verify(), 'p' is not resolved
   }
 
-  void test_uriDoesNotExist_export() {
+  test_uriDoesNotExist_export() async {
     Source source = addSource("export 'unknown.dart';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
-  void test_uriDoesNotExist_import() {
+  test_uriDoesNotExist_import() async {
     Source source = addSource("import 'unknown.dart';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
-  void test_uriDoesNotExist_import_appears_after_deleting_target() {
+  test_uriDoesNotExist_import_appears_after_deleting_target() async {
     Source test = addSource("import 'target.dart';");
     Source target = addNamedSource("/target.dart", "");
-    computeLibrarySourceErrors(test);
+    await computeAnalysisResult(test);
     assertErrors(test, [HintCode.UNUSED_IMPORT]);
 
     // Remove the overlay in the same way as AnalysisServer.
+    resourceProvider.deleteFile(resourceProvider.convertPath('/target.dart'));
     analysisContext2.setContents(target, null);
     ChangeSet changeSet = new ChangeSet()..removedSource(target);
     analysisContext2.applyChanges(changeSet);
 
-    computeLibrarySourceErrors(test);
+    await computeAnalysisResult(test);
     assertErrors(test, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
-  void test_uriDoesNotExist_import_disappears_when_fixed() {
+  test_uriDoesNotExist_import_disappears_when_fixed() async {
     Source source = addSource("import 'target.dart';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
 
     // Check that the file is represented as missing.
@@ -6181,21 +6184,21 @@
       ..handleContentsChanged(target, null, "", true);
 
     // Make sure the error goes away.
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [HintCode.UNUSED_IMPORT]);
   }
 
-  void test_uriDoesNotExist_part() {
+  test_uriDoesNotExist_part() async {
     Source source = addSource(r'''
 library lib;
 part 'unknown.dart';''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
-  void test_uriWithInterpolation_constant() {
+  test_uriWithInterpolation_constant() async {
     Source source = addSource("import 'stuff_\$platform.dart';");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.URI_WITH_INTERPOLATION,
       StaticWarningCode.UNDEFINED_IDENTIFIER
@@ -6204,179 +6207,182 @@
     // URI: 'stuff_$platform.dart'
   }
 
-  void test_uriWithInterpolation_nonConstant() {
+  test_uriWithInterpolation_nonConstant() async {
     Source source = addSource(r'''
 library lib;
 part '${'a'}.dart';''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_WITH_INTERPOLATION]);
     // We cannot verify resolution with an unresolvable URI: '${'a'}.dart'
   }
 
-  void test_wrongNumberOfParametersForOperator1() {
-    _check_wrongNumberOfParametersForOperator1("<");
-    _check_wrongNumberOfParametersForOperator1(">");
-    _check_wrongNumberOfParametersForOperator1("<=");
-    _check_wrongNumberOfParametersForOperator1(">=");
-    _check_wrongNumberOfParametersForOperator1("+");
-    _check_wrongNumberOfParametersForOperator1("/");
-    _check_wrongNumberOfParametersForOperator1("~/");
-    _check_wrongNumberOfParametersForOperator1("*");
-    _check_wrongNumberOfParametersForOperator1("%");
-    _check_wrongNumberOfParametersForOperator1("|");
-    _check_wrongNumberOfParametersForOperator1("^");
-    _check_wrongNumberOfParametersForOperator1("&");
-    _check_wrongNumberOfParametersForOperator1("<<");
-    _check_wrongNumberOfParametersForOperator1(">>");
-    _check_wrongNumberOfParametersForOperator1("[]");
+  test_wrongNumberOfParametersForOperator1() async {
+    await _check_wrongNumberOfParametersForOperator1("<");
+    await _check_wrongNumberOfParametersForOperator1(">");
+    await _check_wrongNumberOfParametersForOperator1("<=");
+    await _check_wrongNumberOfParametersForOperator1(">=");
+    await _check_wrongNumberOfParametersForOperator1("+");
+    await _check_wrongNumberOfParametersForOperator1("/");
+    await _check_wrongNumberOfParametersForOperator1("~/");
+    await _check_wrongNumberOfParametersForOperator1("*");
+    await _check_wrongNumberOfParametersForOperator1("%");
+    await _check_wrongNumberOfParametersForOperator1("|");
+    await _check_wrongNumberOfParametersForOperator1("^");
+    await _check_wrongNumberOfParametersForOperator1("&");
+    await _check_wrongNumberOfParametersForOperator1("<<");
+    await _check_wrongNumberOfParametersForOperator1(">>");
+    await _check_wrongNumberOfParametersForOperator1("[]");
   }
 
-  void test_wrongNumberOfParametersForOperator_minus() {
+  test_wrongNumberOfParametersForOperator_minus() async {
     Source source = addSource(r'''
 class A {
   operator -(a, b) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source,
         [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS]);
     verify([source]);
     reset();
   }
 
-  void test_wrongNumberOfParametersForOperator_tilde() {
-    _check_wrongNumberOfParametersForOperator("~", "a");
-    _check_wrongNumberOfParametersForOperator("~", "a, b");
+  test_wrongNumberOfParametersForOperator_tilde() async {
+    await _check_wrongNumberOfParametersForOperator("~", "a");
+    await _check_wrongNumberOfParametersForOperator("~", "a, b");
   }
 
-  void test_wrongNumberOfParametersForSetter_function_named() {
+  test_wrongNumberOfParametersForSetter_function_named() async {
     Source source = addSource("set x({p}) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_function_optional() {
+  test_wrongNumberOfParametersForSetter_function_optional() async {
     Source source = addSource("set x([p]) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_function_tooFew() {
+  test_wrongNumberOfParametersForSetter_function_tooFew() async {
     Source source = addSource("set x() {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_function_tooMany() {
+  test_wrongNumberOfParametersForSetter_function_tooMany() async {
     Source source = addSource("set x(a, b) {}");
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_method_named() {
+  test_wrongNumberOfParametersForSetter_method_named() async {
     Source source = addSource(r'''
 class A {
   set x({p}) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_method_optional() {
+  test_wrongNumberOfParametersForSetter_method_optional() async {
     Source source = addSource(r'''
 class A {
   set x([p]) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_method_tooFew() {
+  test_wrongNumberOfParametersForSetter_method_tooFew() async {
     Source source = addSource(r'''
 class A {
   set x() {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_wrongNumberOfParametersForSetter_method_tooMany() {
+  test_wrongNumberOfParametersForSetter_method_tooMany() async {
     Source source = addSource(r'''
 class A {
   set x(a, b) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
     verify([source]);
   }
 
-  void test_yield_used_as_identifier_in_async_method() {
+  test_yield_used_as_identifier_in_async_method() async {
     Source source = addSource('''
 f() async {
   var yield = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_yield_used_as_identifier_in_async_star_method() {
+  test_yield_used_as_identifier_in_async_star_method() async {
     Source source = addSource('''
 f() async* {
   var yield = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void test_yield_used_as_identifier_in_sync_star_method() {
+  test_yield_used_as_identifier_in_sync_star_method() async {
     Source source = addSource('''
 f() sync* {
   var yield = 1;
 }
 ''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
     verify([source]);
   }
 
-  void _check_constEvalThrowsException_binary_null(String expr, bool resolved) {
+  Future<Null> _check_constEvalThrowsException_binary_null(
+      String expr, bool resolved) async {
     Source source = addSource("const C = $expr;");
-    computeLibrarySourceErrors(source);
     if (resolved) {
+      await computeAnalysisResult(source);
       assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
       verify([source]);
     } else {
+      await computeAnalysisResult(source);
       assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
       // no verify(), 'null x' is not resolved
     }
     reset();
   }
 
-  void _check_constEvalTypeBool_withParameter_binary(String expr) {
+  Future<Null> _check_constEvalTypeBool_withParameter_binary(
+      String expr) async {
     Source source = addSource('''
 class A {
   final a;
   const A(bool p) : a = $expr;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
       StaticTypeWarningCode.NON_BOOL_OPERAND
@@ -6385,13 +6391,13 @@
     reset();
   }
 
-  void _check_constEvalTypeInt_withParameter_binary(String expr) {
+  Future<Null> _check_constEvalTypeInt_withParameter_binary(String expr) async {
     Source source = addSource('''
 class A {
   final a;
   const A(int p) : a = $expr;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -6400,13 +6406,13 @@
     reset();
   }
 
-  void _check_constEvalTypeNum_withParameter_binary(String expr) {
+  Future<Null> _check_constEvalTypeNum_withParameter_binary(String expr) async {
     Source source = addSource('''
 class A {
   final a;
   const A(num p) : a = $expr;
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
@@ -6415,21 +6421,21 @@
     reset();
   }
 
-  void _check_wrongNumberOfParametersForOperator(
-      String name, String parameters) {
+  Future<Null> _check_wrongNumberOfParametersForOperator(
+      String name, String parameters) async {
     Source source = addSource('''
 class A {
   operator $name($parameters) {}
 }''');
-    computeLibrarySourceErrors(source);
+    await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
     verify([source]);
     reset();
   }
 
-  void _check_wrongNumberOfParametersForOperator1(String name) {
-    _check_wrongNumberOfParametersForOperator(name, "");
-    _check_wrongNumberOfParametersForOperator(name, "a, b");
+  Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async {
+    await _check_wrongNumberOfParametersForOperator(name, "");
+    await _check_wrongNumberOfParametersForOperator(name, "a, b");
   }
 }
diff --git a/pkg/analyzer/test/generated/declaration_resolver_test.dart b/pkg/analyzer/test/generated/declaration_resolver_test.dart
index eeaf82d..9ecac6a 100644
--- a/pkg/analyzer/test/generated/declaration_resolver_test.dart
+++ b/pkg/analyzer/test/generated/declaration_resolver_test.dart
@@ -4,6 +4,8 @@
 
 library engine.declaration_resolver_test;
 
+import 'dart:async';
+
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
@@ -59,50 +61,50 @@
     }
   }
 
-  void setupCode(String code) {
+  Future<Null> setupCode(String code) async {
     this.code = code;
-    unit = resolveSource(code + ' const a = null;');
+    unit = await resolveSource(code + ' const a = null;');
     unit2 = _cloneResolveUnit(unit);
   }
 
-  void test_metadata_classDeclaration() {
-    setupCode('@a class C {}');
+  test_metadata_classDeclaration() async {
+    await setupCode('@a class C {}');
     checkMetadata('C');
   }
 
-  void test_metadata_classTypeAlias() {
-    setupCode('@a class C = D with E; class D {} class E {}');
+  test_metadata_classTypeAlias() async {
+    await setupCode('@a class C = D with E; class D {} class E {}');
     checkMetadata('C');
   }
 
-  void test_metadata_constructorDeclaration_named() {
-    setupCode('class C { @a C.x(); }');
+  test_metadata_constructorDeclaration_named() async {
+    await setupCode('class C { @a C.x(); }');
     checkMetadata('x');
   }
 
-  void test_metadata_constructorDeclaration_unnamed() {
-    setupCode('class C { @a C(); }');
+  test_metadata_constructorDeclaration_unnamed() async {
+    await setupCode('class C { @a C(); }');
     checkMetadata('C()');
   }
 
-  void test_metadata_declaredIdentifier() {
-    setupCode('f(x, y) { for (@a var x in y) {} }');
+  test_metadata_declaredIdentifier() async {
+    await setupCode('f(x, y) { for (@a var x in y) {} }');
     checkMetadata('var', expectDifferent: true);
   }
 
-  void test_metadata_enumDeclaration() {
-    setupCode('@a enum E { v }');
+  test_metadata_enumDeclaration() async {
+    await setupCode('@a enum E { v }');
     checkMetadata('E');
   }
 
-  void test_metadata_exportDirective() {
+  test_metadata_exportDirective() async {
     addNamedSource('/foo.dart', 'class C {}');
-    setupCode('@a export "foo.dart";');
+    await setupCode('@a export "foo.dart";');
     checkMetadata('export');
   }
 
-  void test_metadata_exportDirective_resynthesized() {
-    CompilationUnit unit = resolveSource(r'''
+  test_metadata_exportDirective_resynthesized() async {
+    CompilationUnit unit = await resolveSource(r'''
 @a
 export "dart:async";
 
@@ -128,58 +130,58 @@
     expect(unit.directives[1].metadata.single.name.name, 'b');
   }
 
-  void test_metadata_fieldDeclaration() {
-    setupCode('class C { @a int x; }');
+  test_metadata_fieldDeclaration() async {
+    await setupCode('class C { @a int x; }');
     checkMetadata('x');
   }
 
-  void test_metadata_fieldFormalParameter() {
-    setupCode('class C { var x; C(@a this.x); }');
+  test_metadata_fieldFormalParameter() async {
+    await setupCode('class C { var x; C(@a this.x); }');
     checkMetadata('this');
   }
 
-  void test_metadata_fieldFormalParameter_withDefault() {
-    setupCode('class C { var x; C([@a this.x = null]); }');
+  test_metadata_fieldFormalParameter_withDefault() async {
+    await setupCode('class C { var x; C([@a this.x = null]); }');
     checkMetadata('this');
   }
 
-  void test_metadata_functionDeclaration_function() {
-    setupCode('@a f() {}');
+  test_metadata_functionDeclaration_function() async {
+    await setupCode('@a f() {}');
     checkMetadata('f');
   }
 
-  void test_metadata_functionDeclaration_getter() {
-    setupCode('@a get f() => null;');
+  test_metadata_functionDeclaration_getter() async {
+    await setupCode('@a get f() => null;');
     checkMetadata('f');
   }
 
-  void test_metadata_functionDeclaration_setter() {
-    setupCode('@a set f(value) {}');
+  test_metadata_functionDeclaration_setter() async {
+    await setupCode('@a set f(value) {}');
     checkMetadata('f');
   }
 
-  void test_metadata_functionTypeAlias() {
-    setupCode('@a typedef F();');
+  test_metadata_functionTypeAlias() async {
+    await setupCode('@a typedef F();');
     checkMetadata('F');
   }
 
-  void test_metadata_functionTypedFormalParameter() {
-    setupCode('f(@a g()) {}');
+  test_metadata_functionTypedFormalParameter() async {
+    await setupCode('f(@a g()) {}');
     checkMetadata('g');
   }
 
-  void test_metadata_functionTypedFormalParameter_withDefault() {
-    setupCode('f([@a g() = null]) {}');
+  test_metadata_functionTypedFormalParameter_withDefault() async {
+    await setupCode('f([@a g() = null]) {}');
     checkMetadata('g');
   }
 
-  void test_metadata_importDirective() {
+  test_metadata_importDirective() async {
     addNamedSource('/foo.dart', 'class C {}');
-    setupCode('@a import "foo.dart";');
+    await setupCode('@a import "foo.dart";');
     checkMetadata('import');
   }
 
-  void test_metadata_importDirective_partiallyResolved() {
+  test_metadata_importDirective_partiallyResolved() async {
     addNamedSource('/foo.dart', 'class C {}');
     this.code = 'const a = null; @a import "foo.dart";';
     Source source = addNamedSource('/test.dart', code);
@@ -190,8 +192,8 @@
     checkMetadata('import');
   }
 
-  void test_metadata_importDirective_resynthesized() {
-    CompilationUnit unit = resolveSource(r'''
+  test_metadata_importDirective_resynthesized() async {
+    CompilationUnit unit = await resolveSource(r'''
 @a
 import "dart:async";
 
@@ -217,13 +219,14 @@
     expect(unit.directives[1].metadata.single.name.name, 'b');
   }
 
-  void test_metadata_libraryDirective() {
-    setupCode('@a library L;');
+  test_metadata_libraryDirective() async {
+    await setupCode('@a library L;');
     checkMetadata('L');
   }
 
-  void test_metadata_libraryDirective_resynthesized() {
-    CompilationUnit unit = resolveSource('@a library L; const a = null;');
+  test_metadata_libraryDirective_resynthesized() async {
+    CompilationUnit unit =
+        await resolveSource('@a library L; const a = null;');
     expect(unit.directives.single.metadata.single.name.name, 'a');
     var unitElement = unit.element as CompilationUnitElementImpl;
     // Damage the unit element - as if "setAnnotations" were not called.
@@ -236,8 +239,8 @@
     expect(clonedUnit.directives.single.metadata.single.name.name, 'a');
   }
 
-  void test_metadata_localFunctionDeclaration() {
-    setupCode('f() { @a g() {} }');
+  test_metadata_localFunctionDeclaration() async {
+    await setupCode('f() { @a g() {} }');
     // Note: metadata on local function declarations is ignored by the
     // analyzer.  TODO(paulberry): is this a bug?
     FunctionDeclaration node = EngineTestCase.findNode(
@@ -245,64 +248,64 @@
     expect((node as FunctionDeclarationImpl).metadata, isEmpty);
   }
 
-  void test_metadata_localVariableDeclaration() {
-    setupCode('f() { @a int x; }');
+  test_metadata_localVariableDeclaration() async {
+    await setupCode('f() { @a int x; }');
     checkMetadata('x', expectDifferent: true);
   }
 
-  void test_metadata_methodDeclaration_getter() {
-    setupCode('class C { @a get m => null; }');
+  test_metadata_methodDeclaration_getter() async {
+    await setupCode('class C { @a get m => null; }');
     checkMetadata('m');
   }
 
-  void test_metadata_methodDeclaration_method() {
-    setupCode('class C { @a m() {} }');
+  test_metadata_methodDeclaration_method() async {
+    await setupCode('class C { @a m() {} }');
     checkMetadata('m');
   }
 
-  void test_metadata_methodDeclaration_setter() {
-    setupCode('class C { @a set m(value) {} }');
+  test_metadata_methodDeclaration_setter() async {
+    await setupCode('class C { @a set m(value) {} }');
     checkMetadata('m');
   }
 
-  void test_metadata_partDirective() {
+  test_metadata_partDirective() async {
     addNamedSource('/foo.dart', 'part of L;');
-    setupCode('library L; @a part "foo.dart";');
+    await setupCode('library L; @a part "foo.dart";');
     checkMetadata('part');
   }
 
-  void test_metadata_simpleFormalParameter() {
-    setupCode('f(@a x) {}) {}');
+  test_metadata_simpleFormalParameter() async {
+    await setupCode('f(@a x) {}) {}');
     checkMetadata('x');
   }
 
-  void test_metadata_simpleFormalParameter_withDefault() {
-    setupCode('f([@a x = null]) {}');
+  test_metadata_simpleFormalParameter_withDefault() async {
+    await setupCode('f([@a x = null]) {}');
     checkMetadata('x');
   }
 
-  void test_metadata_topLevelVariableDeclaration() {
-    setupCode('@a int x;');
+  test_metadata_topLevelVariableDeclaration() async {
+    await setupCode('@a int x;');
     checkMetadata('x');
   }
 
-  void test_metadata_typeParameter_ofClass() {
-    setupCode('class C<@a T> {}');
+  test_metadata_typeParameter_ofClass() async {
+    await setupCode('class C<@a T> {}');
     checkMetadata('T');
   }
 
-  void test_metadata_typeParameter_ofClassTypeAlias() {
-    setupCode('class C<@a T> = D with E; class D {} class E {}');
+  test_metadata_typeParameter_ofClassTypeAlias() async {
+    await setupCode('class C<@a T> = D with E; class D {} class E {}');
     checkMetadata('T');
   }
 
-  void test_metadata_typeParameter_ofFunction() {
-    setupCode('f<@a T>() {}');
+  test_metadata_typeParameter_ofFunction() async {
+    await setupCode('f<@a T>() {}');
     checkMetadata('T');
   }
 
-  void test_metadata_typeParameter_ofTypedef() {
-    setupCode('typedef F<@a T>();');
+  test_metadata_typeParameter_ofTypedef() async {
+    await setupCode('typedef F<@a T>();');
     checkMetadata('T');
   }
 
@@ -330,7 +333,7 @@
     super.setUp();
   }
 
-  void test_closure_inside_catch_block() {
+  test_closure_inside_catch_block() async {
     String code = '''
 f() {
   try {
@@ -339,13 +342,13 @@
   }
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_closure_inside_labeled_statement() {
+  test_closure_inside_labeled_statement() async {
     String code = '''
 f(b) {
   foo: while (true) {
@@ -356,13 +359,13 @@
   }
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_closure_inside_switch_case() {
+  test_closure_inside_switch_case() async {
     String code = '''
 void f(k, m) {
   switch (k) {
@@ -372,13 +375,13 @@
   }
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_closure_inside_switch_default() {
+  test_closure_inside_switch_default() async {
     String code = '''
 void f(k, m) {
   switch (k) {
@@ -388,13 +391,13 @@
   }
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_enumConstant_partiallyResolved() {
+  test_enumConstant_partiallyResolved() async {
     String code = r'''
 enum Fruit {apple, pear}
 ''';
@@ -406,11 +409,11 @@
     _cloneResolveUnit(unit);
   }
 
-  void test_functionDeclaration_getter() {
+  test_functionDeclaration_getter() async {
     String code = r'''
 int get zzz => 42;
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     PropertyAccessorElement getterElement =
         _findSimpleIdentifier(unit, code, 'zzz =>').staticElement;
     expect(getterElement.isGetter, isTrue);
@@ -420,11 +423,11 @@
     expect(getterName.staticElement, same(getterElement));
   }
 
-  void test_functionDeclaration_setter() {
+  test_functionDeclaration_setter() async {
     String code = r'''
 void set zzz(_) {}
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     PropertyAccessorElement setterElement =
         _findSimpleIdentifier(unit, code, 'zzz(_)').staticElement;
     expect(setterElement.isSetter, isTrue);
@@ -434,7 +437,7 @@
     expect(getterName.staticElement, same(setterElement));
   }
 
-  void test_invalid_functionDeclaration_getter_inFunction() {
+  test_invalid_functionDeclaration_getter_inFunction() async {
     String code = r'''
 var v = (() {
   main() {
@@ -442,7 +445,7 @@
   }
 });
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     FunctionElement getterElement =
         _findSimpleIdentifier(unit, code, 'zzz =>').staticElement;
     // re-resolve
@@ -451,7 +454,7 @@
     expect(getterName.staticElement, same(getterElement));
   }
 
-  void test_invalid_functionDeclaration_setter_inFunction() {
+  test_invalid_functionDeclaration_setter_inFunction() async {
     String code = r'''
 var v = (() {
   main() {
@@ -459,7 +462,7 @@
   }
 });
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     FunctionElement setterElement =
         _findSimpleIdentifier(unit, code, 'zzz(x)').staticElement;
     // re-resolve
@@ -468,66 +471,66 @@
     expect(setterName.staticElement, same(setterElement));
   }
 
-  void test_visitExportDirective_notExistingSource() {
+  test_visitExportDirective_notExistingSource() async {
     String code = r'''
 export 'foo.dart';
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_visitExportDirective_unresolvedUri() {
+  test_visitExportDirective_unresolvedUri() async {
     String code = r'''
 export 'package:foo/bar.dart';
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_visitFunctionExpression() {
+  test_visitFunctionExpression() async {
     String code = r'''
 main(List<String> items) {
   items.forEach((item) {});
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_visitImportDirective_notExistingSource() {
+  test_visitImportDirective_notExistingSource() async {
     String code = r'''
 import 'foo.dart';
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_visitImportDirective_unresolvedUri() {
+  test_visitImportDirective_unresolvedUri() async {
     String code = r'''
 import 'package:foo/bar.dart';
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_visitMethodDeclaration_getter_duplicate() {
+  test_visitMethodDeclaration_getter_duplicate() async {
     String code = r'''
 class C {
   int get zzz => 1;
   String get zzz => null;
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     PropertyAccessorElement firstElement =
         _findSimpleIdentifier(unit, code, 'zzz => 1').staticElement;
     PropertyAccessorElement secondElement =
@@ -541,7 +544,7 @@
     expect(secondName.staticElement, same(secondElement));
   }
 
-  void test_visitMethodDeclaration_getterSetter() {
+  test_visitMethodDeclaration_getterSetter() async {
     String code = r'''
 class C {
   int _field = 0;
@@ -549,7 +552,7 @@
   void set field(value) {_field = value;}
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     FieldElement getterElement =
         _findSimpleIdentifier(unit, code, 'field =').staticElement;
     PropertyAccessorElement setterElement =
@@ -562,14 +565,14 @@
     expect(setterName.staticElement, same(setterElement));
   }
 
-  void test_visitMethodDeclaration_method_duplicate() {
+  test_visitMethodDeclaration_method_duplicate() async {
     String code = r'''
 class C {
   void zzz(x) {}
   void zzz(y) {}
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     MethodElement firstElement =
         _findSimpleIdentifier(unit, code, 'zzz(x)').staticElement;
     MethodElement secondElement =
@@ -582,7 +585,7 @@
     expect(secondName.staticElement, same(secondElement));
   }
 
-  void test_visitMethodDeclaration_setter_duplicate() {
+  test_visitMethodDeclaration_setter_duplicate() async {
     // https://github.com/dart-lang/sdk/issues/25601
     String code = r'''
 class C {
@@ -590,7 +593,7 @@
   set zzz(y) {}
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     PropertyAccessorElement firstElement =
         _findSimpleIdentifier(unit, code, 'zzz(x)').staticElement;
     PropertyAccessorElement secondElement =
@@ -603,24 +606,24 @@
     expect(secondName.staticElement, same(secondElement));
   }
 
-  void test_visitMethodDeclaration_unaryMinus() {
+  test_visitMethodDeclaration_unaryMinus() async {
     String code = r'''
 class C {
   C operator -() => null;
   C operator -(C other) => null;
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
   }
 
-  void test_visitPartDirective_notExistingSource() {
+  test_visitPartDirective_notExistingSource() async {
     String code = r'''
 part 'foo.bar';
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     // re-resolve
     _cloneResolveUnit(unit);
     // no other validations than built into DeclarationResolver
@@ -634,14 +637,14 @@
 class StrongModeDeclarationResolverTest extends ResolverTestCase {
   @override
   void setUp() {
-    resetWithOptions(new AnalysisOptionsImpl()..strongMode = true);
+    resetWith(options: new AnalysisOptionsImpl()..strongMode = true);
   }
 
-  void test_genericFunction_typeParameter() {
+  test_genericFunction_typeParameter() async {
     String code = r'''
 /*=T*/ max/*<T>*/(/*=T*/ x, /*=T*/ y) => null;
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     FunctionDeclaration node = _findSimpleIdentifier(unit, code, 'max').parent;
     TypeParameter t = node.functionExpression.typeParameters.typeParameters[0];
 
@@ -659,13 +662,13 @@
     expect(t.element, same(tElement));
   }
 
-  void test_genericMethod_typeParameter() {
+  test_genericMethod_typeParameter() async {
     String code = r'''
 class C {
   /*=T*/ max/*<T>*/(/*=T*/ x, /*=T*/ y) => null;
 }
 ''';
-    CompilationUnit unit = resolveSource(code);
+    CompilationUnit unit = await resolveSource(code);
     MethodDeclaration node = _findSimpleIdentifier(unit, code, 'max').parent;
     TypeParameter t = node.typeParameters.typeParameters[0];
 
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 277a2c7..26c6ab0 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -4,9 +4,11 @@
 
 library analyzer.test.generated.element_resolver_test;
 
+import 'dart:async';
+
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
@@ -36,7 +38,7 @@
 
 @reflectiveTest
 class ElementResolverCodeTest extends ResolverTestCase {
-  void test_annotation_class_namedConstructor() {
+  test_annotation_class_namedConstructor() async {
     addNamedSource(
         '/a.dart',
         r'''
@@ -44,7 +46,7 @@
   const A.named();
 }
 ''');
-    _validateAnnotation('', '@A.named()', (SimpleIdentifier name1,
+    await _validateAnnotation('', '@A.named()', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -68,7 +70,7 @@
     });
   }
 
-  void test_annotation_class_prefixed_namedConstructor() {
+  test_annotation_class_prefixed_namedConstructor() async {
     addNamedSource(
         '/a.dart',
         r'''
@@ -76,7 +78,7 @@
   const A.named();
 }
 ''');
-    _validateAnnotation('as p', '@p.A.named()', (SimpleIdentifier name1,
+    await _validateAnnotation('as p', '@p.A.named()', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -102,7 +104,7 @@
     });
   }
 
-  void test_annotation_class_prefixed_staticConstField() {
+  test_annotation_class_prefixed_staticConstField() async {
     addNamedSource(
         '/a.dart',
         r'''
@@ -110,7 +112,7 @@
   static const V = 0;
 }
 ''');
-    _validateAnnotation('as p', '@p.A.V', (SimpleIdentifier name1,
+    await _validateAnnotation('as p', '@p.A.V', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -134,7 +136,7 @@
     });
   }
 
-  void test_annotation_class_prefixed_unnamedConstructor() {
+  test_annotation_class_prefixed_unnamedConstructor() async {
     addNamedSource(
         '/a.dart',
         r'''
@@ -142,7 +144,7 @@
   const A();
 }
 ''');
-    _validateAnnotation('as p', '@p.A', (SimpleIdentifier name1,
+    await _validateAnnotation('as p', '@p.A', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -164,7 +166,7 @@
     });
   }
 
-  void test_annotation_class_staticConstField() {
+  test_annotation_class_staticConstField() async {
     addNamedSource(
         '/a.dart',
         r'''
@@ -172,7 +174,7 @@
   static const V = 0;
 }
 ''');
-    _validateAnnotation('', '@A.V', (SimpleIdentifier name1,
+    await _validateAnnotation('', '@A.V', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -194,7 +196,7 @@
     });
   }
 
-  void test_annotation_class_unnamedConstructor() {
+  test_annotation_class_unnamedConstructor() async {
     addNamedSource(
         '/a.dart',
         r'''
@@ -202,7 +204,7 @@
   const A();
 }
 ''');
-    _validateAnnotation('', '@A', (SimpleIdentifier name1,
+    await _validateAnnotation('', '@A', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -222,13 +224,13 @@
     });
   }
 
-  void test_annotation_topLevelVariable() {
+  test_annotation_topLevelVariable() async {
     addNamedSource(
         '/a.dart',
         r'''
 const V = 0;
 ''');
-    _validateAnnotation('', '@V', (SimpleIdentifier name1,
+    await _validateAnnotation('', '@V', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -249,13 +251,13 @@
     });
   }
 
-  void test_annotation_topLevelVariable_prefixed() {
+  test_annotation_topLevelVariable_prefixed() async {
     addNamedSource(
         '/a.dart',
         r'''
 const V = 0;
 ''');
-    _validateAnnotation('as p', '@p.V', (SimpleIdentifier name1,
+    await _validateAnnotation('as p', '@p.V', (SimpleIdentifier name1,
         SimpleIdentifier name2,
         SimpleIdentifier name3,
         Element annotationElement) {
@@ -278,12 +280,12 @@
     });
   }
 
-  void _validateAnnotation(
+  Future<Null> _validateAnnotation(
       String annotationPrefix,
       String annotationText,
       validator(SimpleIdentifier name1, SimpleIdentifier name2,
-          SimpleIdentifier name3, Element annotationElement)) {
-    CompilationUnit unit = resolveSource('''
+          SimpleIdentifier name3, Element annotationElement)) async {
+    CompilationUnit unit = await resolveSource('''
 import 'a.dart' $annotationPrefix;
 $annotationText
 class C {}
@@ -387,7 +389,7 @@
     _resolver = _createResolver();
   }
 
-  void test_lookUpMethodInInterfaces() {
+  test_lookUpMethodInInterfaces() async {
     InterfaceType intType = _typeProvider.intType;
     //
     // abstract class A { int operator[](int index); }
@@ -422,7 +424,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitAssignmentExpression_compound() {
+  test_visitAssignmentExpression_compound() async {
     InterfaceType intType = _typeProvider.intType;
     SimpleIdentifier leftHandSide = AstTestFactory.identifier3("a");
     leftHandSide.staticType = intType;
@@ -434,7 +436,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitAssignmentExpression_simple() {
+  test_visitAssignmentExpression_simple() async {
     AssignmentExpression expression = AstTestFactory.assignmentExpression(
         AstTestFactory.identifier3("x"),
         TokenType.EQ,
@@ -444,7 +446,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitBinaryExpression_bangEq() {
+  test_visitBinaryExpression_bangEq() async {
     // String i;
     // var j;
     // i == j
@@ -464,7 +466,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitBinaryExpression_eq() {
+  test_visitBinaryExpression_eq() async {
     // String i;
     // var j;
     // i == j
@@ -483,7 +485,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitBinaryExpression_plus() {
+  test_visitBinaryExpression_plus() async {
     // num i;
     // var j;
     // i + j
@@ -498,7 +500,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitBinaryExpression_plus_propagatedElement() {
+  test_visitBinaryExpression_plus_propagatedElement() async {
     // var i = 1;
     // var j;
     // i + j
@@ -513,7 +515,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitBreakStatement_withLabel() {
+  test_visitBreakStatement_withLabel() async {
     // loop: while (true) {
     //   break loop;
     // }
@@ -530,13 +532,13 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitBreakStatement_withoutLabel() {
+  test_visitBreakStatement_withoutLabel() async {
     BreakStatement statement = AstTestFactory.breakStatement();
     _resolveStatement(statement, null, null);
     _listener.assertNoErrors();
   }
 
-  void test_visitCommentReference_prefixedIdentifier_class_getter() {
+  test_visitCommentReference_prefixedIdentifier_class_getter() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     // set accessors
     String propName = "p";
@@ -559,7 +561,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitCommentReference_prefixedIdentifier_class_method() {
+  test_visitCommentReference_prefixedIdentifier_class_method() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     // set method
     MethodElement method =
@@ -579,7 +581,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitCommentReference_prefixedIdentifier_class_operator() {
+  test_visitCommentReference_prefixedIdentifier_class_operator() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     // set method
     MethodElement method =
@@ -599,7 +601,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitConstructorName_named() {
+  test_visitConstructorName_named() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String constructorName = "a";
     ConstructorElement constructor =
@@ -612,7 +614,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitConstructorName_unnamed() {
+  test_visitConstructorName_unnamed() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String constructorName = null;
     ConstructorElement constructor =
@@ -625,7 +627,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitContinueStatement_withLabel() {
+  test_visitContinueStatement_withLabel() async {
     // loop: while (true) {
     //   continue loop;
     // }
@@ -643,13 +645,13 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitContinueStatement_withoutLabel() {
+  test_visitContinueStatement_withoutLabel() async {
     ContinueStatement statement = AstTestFactory.continueStatement();
     _resolveStatement(statement, null, null);
     _listener.assertNoErrors();
   }
 
-  void test_visitEnumDeclaration() {
+  test_visitEnumDeclaration() async {
     CompilationUnitElementImpl compilationUnitElement =
         ElementFactory.compilationUnit('foo.dart');
     EnumElementImpl enumElement =
@@ -670,7 +672,7 @@
     expect(metadata[0].element, annotationNode.element);
   }
 
-  void test_visitExportDirective_noCombinators() {
+  test_visitExportDirective_noCombinators() async {
     ExportDirective directive = AstTestFactory.exportDirective2(null);
     directive.element = ElementFactory
         .exportFor(ElementFactory.library(_definingLibrary.context, "lib"));
@@ -678,7 +680,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitFieldFormalParameter() {
+  test_visitFieldFormalParameter() async {
     String fieldName = "f";
     InterfaceType intType = _typeProvider.intType;
     FieldElementImpl fieldElement =
@@ -697,7 +699,7 @@
         same(intType));
   }
 
-  void test_visitImportDirective_noCombinators_noPrefix() {
+  test_visitImportDirective_noCombinators_noPrefix() async {
     ImportDirective directive = AstTestFactory.importDirective3(null, null);
     directive.element = ElementFactory.importFor(
         ElementFactory.library(_definingLibrary.context, "lib"), null);
@@ -705,7 +707,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitImportDirective_noCombinators_prefix() {
+  test_visitImportDirective_noCombinators_prefix() async {
     String prefixName = "p";
     ImportElement importElement = ElementFactory.importFor(
         ElementFactory.library(_definingLibrary.context, "lib"),
@@ -718,7 +720,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitImportDirective_withCombinators() {
+  test_visitImportDirective_withCombinators() async {
     ShowCombinator combinator = AstTestFactory.showCombinator2(["A", "B", "C"]);
     ImportDirective directive =
         AstTestFactory.importDirective3(null, null, [combinator]);
@@ -747,7 +749,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitIndexExpression_get() {
+  test_visitIndexExpression_get() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     InterfaceType intType = _typeProvider.intType;
     MethodElement getter =
@@ -761,7 +763,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitIndexExpression_set() {
+  test_visitIndexExpression_set() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     InterfaceType intType = _typeProvider.intType;
     MethodElement setter =
@@ -777,7 +779,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitInstanceCreationExpression_named() {
+  test_visitInstanceCreationExpression_named() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String constructorName = "a";
     ConstructorElement constructor =
@@ -793,7 +795,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitInstanceCreationExpression_unnamed() {
+  test_visitInstanceCreationExpression_unnamed() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String constructorName = null;
     ConstructorElement constructor =
@@ -809,7 +811,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitInstanceCreationExpression_unnamed_namedParameter() {
+  test_visitInstanceCreationExpression_unnamed_namedParameter() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String constructorName = null;
     ConstructorElementImpl constructor =
@@ -836,7 +838,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitMethodInvocation() {
+  test_visitMethodInvocation() async {
     InterfaceType numType = _typeProvider.numType;
     SimpleIdentifier left = AstTestFactory.identifier3("i");
     left.staticType = numType;
@@ -849,7 +851,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitMethodInvocation_namedParameter() {
+  test_visitMethodInvocation_namedParameter() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String methodName = "m";
     String parameterName = "p";
@@ -874,7 +876,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPostfixExpression() {
+  test_visitPostfixExpression() async {
     InterfaceType numType = _typeProvider.numType;
     SimpleIdentifier operand = AstTestFactory.identifier3("i");
     operand.staticType = numType;
@@ -885,7 +887,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPrefixedIdentifier_dynamic() {
+  test_visitPrefixedIdentifier_dynamic() async {
     DartType dynamicType = _typeProvider.dynamicType;
     SimpleIdentifier target = AstTestFactory.identifier3("a");
     VariableElementImpl variable = ElementFactory.localVariableElement(target);
@@ -900,7 +902,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPrefixedIdentifier_nonDynamic() {
+  test_visitPrefixedIdentifier_nonDynamic() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String getterName = "b";
     PropertyAccessorElement getter =
@@ -919,7 +921,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPrefixedIdentifier_staticClassMember_getter() {
+  test_visitPrefixedIdentifier_staticClassMember_getter() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     // set accessors
     String propName = "b";
@@ -941,7 +943,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPrefixedIdentifier_staticClassMember_method() {
+  test_visitPrefixedIdentifier_staticClassMember_method() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     // set methods
     String propName = "m";
@@ -963,7 +965,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPrefixedIdentifier_staticClassMember_setter() {
+  test_visitPrefixedIdentifier_staticClassMember_setter() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     // set accessors
     String propName = "b";
@@ -987,7 +989,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPrefixExpression() {
+  test_visitPrefixExpression() async {
     InterfaceType numType = _typeProvider.numType;
     SimpleIdentifier operand = AstTestFactory.identifier3("i");
     operand.staticType = numType;
@@ -998,7 +1000,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPropertyAccess_getter_identifier() {
+  test_visitPropertyAccess_getter_identifier() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String getterName = "b";
     PropertyAccessorElement getter =
@@ -1012,7 +1014,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPropertyAccess_getter_super() {
+  test_visitPropertyAccess_getter_super() async {
     //
     // class A {
     //  int get b;
@@ -1042,7 +1044,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitPropertyAccess_setter_this() {
+  test_visitPropertyAccess_setter_this() async {
     ClassElementImpl classA = ElementFactory.classElement2("A");
     String setterName = "b";
     PropertyAccessorElement setter =
@@ -1058,7 +1060,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitSimpleIdentifier_classScope() {
+  test_visitSimpleIdentifier_classScope() async {
     InterfaceType doubleType = _typeProvider.doubleType;
     String fieldName = "NAN";
     SimpleIdentifier node = AstTestFactory.identifier3(fieldName);
@@ -1067,7 +1069,7 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitSimpleIdentifier_dynamic() {
+  test_visitSimpleIdentifier_dynamic() async {
     SimpleIdentifier node = AstTestFactory.identifier3("dynamic");
     _resolveIdentifier(node);
     expect(node.staticElement, same(_typeProvider.dynamicType.element));
@@ -1075,14 +1077,14 @@
     _listener.assertNoErrors();
   }
 
-  void test_visitSimpleIdentifier_lexicalScope() {
+  test_visitSimpleIdentifier_lexicalScope() async {
     SimpleIdentifier node = AstTestFactory.identifier3("i");