Version 2.17.0-218.0.dev

Merge commit '400bad75440e463b1fb584157df36415dd03afdd' into 'dev'
diff --git a/DEPS b/DEPS
index 3e05793..9879db9 100644
--- a/DEPS
+++ b/DEPS
@@ -44,7 +44,7 @@
   # co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
   # hashes. It requires access to the dart-build-access group, which EngProd
   # has.
-  "co19_rev": "a38d7c5685e64499cfbdbfe6548fbd5b63b57f15",
+  "co19_rev": "74ba459aecc908d5db91531f020a3f74e9aa1b4d",
   # This line prevents conflicts when both packages are rolled simultaneously.
   "co19_2_rev": "995745937abffe9fc3a6441f9f0db27b2d706e4c",
 
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_trailing_comma.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_trailing_comma.dart
index 0995f2f..4da7cda 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_trailing_comma.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_trailing_comma.dart
@@ -24,11 +24,15 @@
   @override
   Future<void> compute(ChangeBuilder builder) async {
     final node = this.node;
-    if (node is! ArgumentList) return;
-
-    await builder.addDartFileEdit(file, (builder) {
-      builder.addSimpleInsertion(node.arguments.last.end, ',');
-    });
+    if (node is ArgumentList) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleInsertion(node.arguments.last.end, ',');
+      });
+    } else if (node is FormalParameterList) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleInsertion(node.parameters.last.end, ',');
+      });
+    }
   }
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_trailing_comma_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_trailing_comma_test.dart
index f8ba15b..fe27f30 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_trailing_comma_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_trailing_comma_test.dart
@@ -87,6 +87,17 @@
 ''');
   }
 
+  Future<void> test_parameters() async {
+    await resolveTestCode('''
+void f(a,
+  b) {}
+''');
+    await assertHasFix('''
+void f(a,
+  b,) {}
+''');
+  }
+
   Future<void> test_positional() async {
     await resolveTestCode('''
 void f(a, b) {
diff --git a/pkg/front_end/test/fasta/expression_suite.dart b/pkg/front_end/test/fasta/expression_suite.dart
index 70c7a91..f7f2528 100644
--- a/pkg/front_end/test/fasta/expression_suite.dart
+++ b/pkg/front_end/test/fasta/expression_suite.dart
@@ -39,6 +39,7 @@
 
 import 'package:front_end/src/fasta/kernel/utils.dart'
     show serializeComponent, serializeProcedure;
+import 'package:front_end/src/testing/compiler_common.dart';
 
 import "package:kernel/ast.dart"
     show
@@ -142,9 +143,9 @@
 class TestCase {
   final TestDescription description;
 
-  final Uri? entryPoint;
+  final Map<String, String> sources;
 
-  final Uri? import;
+  final Uri entryPoint;
 
   final List<String> definitions;
 
@@ -158,20 +159,20 @@
 
   final bool isStaticMethod;
 
-  final Uri? library;
+  final Uri library;
 
   final String? className;
 
   final String? methodName;
 
-  String? expression;
+  String expression;
 
   List<CompilationResult> results = [];
 
   TestCase(
       this.description,
+      this.sources,
       this.entryPoint,
-      this.import,
       this.definitions,
       this.definitionTypes,
       this.typeDefinitions,
@@ -186,8 +187,8 @@
   @override
   String toString() {
     return "TestCase("
+        "$sources, "
         "$entryPoint, "
-        "$import, "
         "$definitions, "
         "$definitionTypes, "
         "$typeDefinitions,"
@@ -197,23 +198,6 @@
         "$className, "
         "static = $isStaticMethod)";
   }
-
-  String? validate() {
-    print(this);
-    if (entryPoint == null) {
-      return "No entryPoint.";
-    }
-    if (!(new File.fromUri(entryPoint!)).existsSync()) {
-      return "Entry point $entryPoint doesn't exist.";
-    }
-    if (library == null) {
-      return "No enclosing node.";
-    }
-    if (expression == null) {
-      return "No expression to compile.";
-    }
-    return null;
-  }
 }
 
 class MatchProcedureExpectations extends Step<List<TestCase>, Null, Context> {
@@ -230,12 +214,11 @@
   Future<Result<Null>> run(List<TestCase> tests, Context context) async {
     String actual = "";
     for (TestCase test in tests) {
-      String primary =
-          test.results.first.printResult(test.entryPoint!, context);
+      String primary = test.results.first.printResult(test.entryPoint, context);
       actual += primary;
       for (int i = 1; i < test.results.length; ++i) {
         String secondary =
-            test.results[i].printResult(test.entryPoint!, context);
+            test.results[i].printResult(test.entryPoint, context);
         if (primary != secondary) {
           return fail(
               null,
@@ -286,8 +269,7 @@
     Uri uri = description.uri;
     String contents = await new File.fromUri(uri).readAsString();
 
-    Uri? entryPoint;
-    Uri? import;
+    Uri entryPoint = toTestUri('main.dart');
     List<String> definitions = <String>[];
     List<String> definitionTypes = <String>[];
     List<String> typeDefinitions = <String>[];
@@ -303,16 +285,22 @@
     if (maps is YamlMap) maps = [maps];
 
     final List<TestCase> tests = [];
+    Map<String, String> sources = {};
     for (YamlMap map in maps) {
       for (String key in map.keys) {
         dynamic value = map[key];
-
-        if (key == "entry_point") {
-          entryPoint = description.uri.resolveUri(Uri.parse(value as String));
-        } else if (key == "import") {
-          import = description.uri.resolveUri(Uri.parse(value as String));
+        if (key == "sources") {
+          if (value is String) {
+            sources['main.dart'] = value;
+          } else if (value is YamlMap) {
+            value.forEach((key, value) {
+              sources[key as String] = value as String;
+            });
+          }
+        } else if (key == "entry_point") {
+          entryPoint = toTestUri(value as String);
         } else if (key == "position") {
-          Uri uri = description.uri.resolveUri(Uri.parse(value as String));
+          Uri uri = entryPoint.resolveUri(Uri.parse(value as String));
           library = uri.removeFragment();
           if (uri.fragment != '') {
             className = uri.fragment;
@@ -335,12 +323,19 @@
           isStaticMethod = value;
         } else if (key == "expression") {
           expression = value;
+        } else {
+          throw new UnsupportedError("Unknown key: ${key}");
         }
       }
+      library ??= entryPoint;
+      if (expression == null) {
+        return new Result.fail(tests, "No expression to compile.");
+      }
+
       TestCase test = new TestCase(
           description,
+          sources,
           entryPoint,
-          import,
           definitions,
           definitionTypes,
           typeDefinitions,
@@ -351,10 +346,6 @@
           className,
           methodName,
           expression);
-      String? result = test.validate();
-      if (result != null) {
-        return new Result.fail(tests, result);
-      }
       tests.add(test);
     }
     return new Result.pass(tests);
@@ -396,11 +387,11 @@
     }
 
     Procedure? compiledProcedure = await compiler.compileExpression(
-      test.expression!,
+      test.expression,
       definitions,
       typeParams,
       "debugExpr",
-      test.library!,
+      test.library,
       className: test.className,
       methodName: test.methodName,
       isStatic: test.isStaticMethod,
@@ -531,18 +522,16 @@
   Future<Result<List<TestCase>>> run(
       List<TestCase> tests, Context context) async {
     for (TestCase test in tests) {
-      context.fileSystem.entityForUri(test.entryPoint!).writeAsBytesSync(
-          await new File.fromUri(test.entryPoint!).readAsBytes());
-
-      if (test.import != null) {
-        context.fileSystem.entityForUri(test.import!).writeAsBytesSync(
-            await new File.fromUri(test.import!).readAsBytes());
-      }
+      test.sources.forEach((String fileName, String source) {
+        context.fileSystem
+            .entityForUri(toTestUri(fileName))
+            .writeAsStringSync(source);
+      });
 
       IncrementalCompiler sourceCompiler =
           new IncrementalCompiler(context.compilerContext);
       IncrementalCompilerResult sourceCompilerResult =
-          await sourceCompiler.computeDelta(entryPoints: [test.entryPoint!]);
+          await sourceCompiler.computeDelta(entryPoints: [test.entryPoint]);
       Component component = sourceCompilerResult.component;
       List<DiagnosticMessage> errors = context.takeErrors();
       if (!errors.isEmpty) {
@@ -551,9 +540,7 @@
             "Couldn't compile entry-point: "
             "${errors.map((e) => e.plainTextFormatted.first).toList()}");
       }
-      Uri dillFileUri = new Uri(
-          scheme: test.entryPoint!.scheme,
-          path: test.entryPoint!.path + ".dill");
+      Uri dillFileUri = toTestUri("${test.description.shortName}.dill");
       Uint8List dillData = await serializeComponent(component);
       context.fileSystem.entityForUri(dillFileUri).writeAsBytesSync(dillData);
       Set<Uri> beforeFuzzedLibraries = context.fuzzedLibraries.toSet();
@@ -563,7 +550,7 @@
       IncrementalCompiler dillCompiler =
           new IncrementalCompiler(context.compilerContext, dillFileUri);
       IncrementalCompilerResult dillCompilerResult =
-          await dillCompiler.computeDelta(entryPoints: [test.entryPoint!]);
+          await dillCompiler.computeDelta(entryPoints: [test.entryPoint]);
       component = dillCompilerResult.component;
       component.computeCanonicalNames();
 
diff --git a/pkg/front_end/testcases/expression/a.dart b/pkg/front_end/testcases/expression/a.dart
deleted file mode 100644
index 090f4f4..0000000
--- a/pkg/front_end/testcases/expression/a.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-import "b.dart";
-
-main() {
-  Foo foo = new Foo();
-  print(foo.foo);
-}
-
-class Foo<E1> {
-  E1? get foo => null;
-  String get bar => "hello";
-}
-
-class Bar {}
diff --git a/pkg/front_end/testcases/expression/b.dart b/pkg/front_end/testcases/expression/b.dart
deleted file mode 100644
index 13e23d1..0000000
--- a/pkg/front_end/testcases/expression/b.dart
+++ /dev/null
@@ -1,4 +0,0 @@
-class Foo<E2> {
-  E2? get foo => null;
-  int get bar => 42;
-}
diff --git a/pkg/front_end/testcases/expression/class_capture.expression.yaml b/pkg/front_end/testcases/expression/class_capture.expression.yaml
index fdce2d6..f95adf5 100644
--- a/pkg/front_end/testcases/expression/class_capture.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_capture.expression.yaml
@@ -2,8 +2,14 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    int x;
+    final int y = 7;
+
+    B(this.x);
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 expression: |
   () { return x + y; }
diff --git a/pkg/front_end/testcases/expression/class_capture.expression.yaml.expect b/pkg/front_end/testcases/expression/class_capture.expression.yaml.expect
index 0379b8f..b4200b9 100644
--- a/pkg/front_end/testcases/expression/class_capture.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_capture.expression.yaml.expect
@@ -2,5 +2,5 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
   return () → dart.core::int {
-    return this.{main::B::x}{dart.core::int}.{dart.core::num::+}(this.{main::B::y}{dart.core::int}){(dart.core::num) → dart.core::int};
+    return this.{#lib1::B::x}{dart.core::int}.{dart.core::num::+}(this.{#lib1::B::y}{dart.core::int}){(dart.core::num) → dart.core::int};
   };
diff --git a/pkg/front_end/testcases/expression/class_getter.expression.yaml b/pkg/front_end/testcases/expression/class_getter.expression.yaml
index f6e64e6..69f9ff4 100644
--- a/pkg/front_end/testcases/expression/class_getter.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_getter.expression.yaml
@@ -2,8 +2,13 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    String get z {
+      return "";
+    }
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 expression: |
   z
diff --git a/pkg/front_end/testcases/expression/class_getter.expression.yaml.expect b/pkg/front_end/testcases/expression/class_getter.expression.yaml.expect
index e30d31e..07d707b 100644
--- a/pkg/front_end/testcases/expression/class_getter.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_getter.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::B::z}{dart.core::String};
+  return this.{#lib1::B::z}{dart.core::String};
diff --git a/pkg/front_end/testcases/expression/class_invalid_static.expression.yaml b/pkg/front_end/testcases/expression/class_invalid_static.expression.yaml
index 59c21b9..179b971 100644
--- a/pkg/front_end/testcases/expression/class_invalid_static.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_invalid_static.expression.yaml
@@ -2,9 +2,13 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A {
+    int doit_with_this(int x) => x + 1;
+  }
+
 definitions: []
-position: "main.dart#A"
+position: "#A"
 static: true
 expression: |
   doit_with_this(3)
diff --git a/pkg/front_end/testcases/expression/class_invalid_static_capture.expression.yaml b/pkg/front_end/testcases/expression/class_invalid_static_capture.expression.yaml
index 0c6f18a..81e276d 100644
--- a/pkg/front_end/testcases/expression/class_invalid_static_capture.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_invalid_static_capture.expression.yaml
@@ -2,9 +2,15 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    int x;
+    final int y = 7;
+
+    B(this.x);
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 static: true
 expression: |
   () { return x + y; }
diff --git a/pkg/front_end/testcases/expression/class_invalid_static_getter.expression.yaml b/pkg/front_end/testcases/expression/class_invalid_static_getter.expression.yaml
index 2fd524f..8048dec 100644
--- a/pkg/front_end/testcases/expression/class_invalid_static_getter.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_invalid_static_getter.expression.yaml
@@ -2,9 +2,14 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    String get z {
+      return "";
+    }
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 static: true
 expression: |
   z
diff --git a/pkg/front_end/testcases/expression/class_invalid_static_setter.expression.yaml b/pkg/front_end/testcases/expression/class_invalid_static_setter.expression.yaml
index 289cf59..24000e5 100644
--- a/pkg/front_end/testcases/expression/class_invalid_static_setter.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_invalid_static_setter.expression.yaml
@@ -2,9 +2,13 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    void set z(_) {}
+  }
+
 definitions: []
-position: "main.dart#B"
+position: "#B"
 static: true
 expression: |
   z = 2
diff --git a/pkg/front_end/testcases/expression/class_method.expression.yaml b/pkg/front_end/testcases/expression/class_method.expression.yaml
index 13b9772..5aceeaf 100644
--- a/pkg/front_end/testcases/expression/class_method.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_method.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A {
+    int doit_with_this(int x) => x + 1;
+  }
 definitions: []
-position: "main.dart#A"
+position: "#A"
 expression: |
   doit_with_this(2)
diff --git a/pkg/front_end/testcases/expression/class_method.expression.yaml.expect b/pkg/front_end/testcases/expression/class_method.expression.yaml.expect
index c290c20..0b0f902 100644
--- a/pkg/front_end/testcases/expression/class_method.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_method.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::A::doit_with_this}(2){(dart.core::int) → dart.core::int};
+  return this.{#lib1::A::doit_with_this}(2){(dart.core::int) → dart.core::int};
diff --git a/pkg/front_end/testcases/expression/class_private_get.expression.yaml b/pkg/front_end/testcases/expression/class_private_get.expression.yaml
index dc9214d..3b19b84 100644
--- a/pkg/front_end/testcases/expression/class_private_get.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_private_get.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    int? _priv;
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 expression: |
   _priv
diff --git a/pkg/front_end/testcases/expression/class_private_get.expression.yaml.expect b/pkg/front_end/testcases/expression/class_private_get.expression.yaml.expect
index a6002cb..f271c9b 100644
--- a/pkg/front_end/testcases/expression/class_private_get.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_private_get.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::B::_priv}{dart.core::int?};
+  return this.{#lib1::B::_priv}{dart.core::int?};
diff --git a/pkg/front_end/testcases/expression/class_private_method.expression.yaml b/pkg/front_end/testcases/expression/class_private_method.expression.yaml
index 0af4443..95e8a61 100644
--- a/pkg/front_end/testcases/expression/class_private_method.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_private_method.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    void _privMethod() {}
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 expression: |
   _privMethod
diff --git a/pkg/front_end/testcases/expression/class_private_method.expression.yaml.expect b/pkg/front_end/testcases/expression/class_private_method.expression.yaml.expect
index b104d4a..4cf1622 100644
--- a/pkg/front_end/testcases/expression/class_private_method.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_private_method.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::B::_privMethod}{() → void};
+  return this.{#lib1::B::_privMethod}{() → void};
diff --git a/pkg/front_end/testcases/expression/class_private_set.expression.yaml b/pkg/front_end/testcases/expression/class_private_set.expression.yaml
index 33b2db9..5310a73 100644
--- a/pkg/front_end/testcases/expression/class_private_set.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_private_set.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    int? _priv;
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 expression: |
   _priv = 3
diff --git a/pkg/front_end/testcases/expression/class_private_set.expression.yaml.expect b/pkg/front_end/testcases/expression/class_private_set.expression.yaml.expect
index dc37e63..91fb6d6 100644
--- a/pkg/front_end/testcases/expression/class_private_set.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_private_set.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::B::_priv} = 3;
+  return this.{#lib1::B::_priv} = 3;
diff --git a/pkg/front_end/testcases/expression/class_setter.expression.yaml b/pkg/front_end/testcases/expression/class_setter.expression.yaml
index f559566..904e0b23 100644
--- a/pkg/front_end/testcases/expression/class_setter.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_setter.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class B {
+    void set z(_) {}
+  }
 definitions: []
-position: "main.dart#B"
+position: "#B"
 expression: |
   z = 3
diff --git a/pkg/front_end/testcases/expression/class_setter.expression.yaml.expect b/pkg/front_end/testcases/expression/class_setter.expression.yaml.expect
index 8c53fc2..04e8669 100644
--- a/pkg/front_end/testcases/expression/class_setter.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_setter.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::B::z} = 3;
+  return this.{#lib1::B::z} = 3;
diff --git a/pkg/front_end/testcases/expression/class_static.expression.yaml b/pkg/front_end/testcases/expression/class_static.expression.yaml
index 309ff3f..3fdd5d8 100644
--- a/pkg/front_end/testcases/expression/class_static.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_static.expression.yaml
@@ -2,9 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A {
+    static int doit(int x) => x + 1;
+  }
 definitions: []
-position: "main.dart#A"
+position: "#A"
 static: true
 expression: |
   doit(3)
diff --git a/pkg/front_end/testcases/expression/class_static.expression.yaml.expect b/pkg/front_end/testcases/expression/class_static.expression.yaml.expect
index 8fc9b60..655c1d4 100644
--- a/pkg/front_end/testcases/expression/class_static.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_static.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 static method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return main::A::doit(3);
+  return #lib1::A::doit(3);
diff --git a/pkg/front_end/testcases/expression/class_static2.expression.yaml b/pkg/front_end/testcases/expression/class_static2.expression.yaml
index 69e19b9..82b12f5 100644
--- a/pkg/front_end/testcases/expression/class_static2.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_static2.expression.yaml
@@ -2,9 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A {
+    int doit_with_this(int x) => x + 1;
+  }
 definitions: []
-position: "main.dart#A"
+position: "#A"
 static: true
 expression: |
   doit_with_this(2)
diff --git a/pkg/front_end/testcases/expression/class_static3.expression.yaml b/pkg/front_end/testcases/expression/class_static3.expression.yaml
index e1e7796..9d47551 100644
--- a/pkg/front_end/testcases/expression/class_static3.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_static3.expression.yaml
@@ -2,15 +2,20 @@
 # 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.
 
-- entry_point: "eval.dart"
-  definitions: []
-  position: "eval.dart"
+- sources: |
+    int globalVar = 100;
+    class MyClass {
+      static int staticVar = 1000;
+    }
   expression: |
     globalVar + staticVar + 5
 
-- entry_point: "eval.dart"
-  definitions: []
-  position: "eval.dart#MyClass"
+- sources: |
+    int globalVar = 100;
+    class MyClass {
+      static int staticVar = 1000;
+    }
+  position: "#MyClass"
   static: true
   expression: |
     globalVar + staticVar + 5
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml
index b415f4a..edaa0c0 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml
@@ -2,8 +2,10 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: ["x"]
-position: "main.dart#C"
+sources: |
+  class Bound {}
+  void hasBound<T extends Bound>() {}
+  class C<T extends Bound> {}
+position: "#C"
 expression: |
   hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml.expect
index 2fef29d..d986e71 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_bound.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
-method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return main::hasBound<main::C::T>();
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return #lib1::hasBound<#lib1::C::T>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml
index 373069e..56443cc 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml
@@ -2,9 +2,18 @@
 # 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.
 
+sources:
+  main.dart: |
+    class Bound {}
+    void hasBound<T extends Bound>() {}
+    class C<T extends Bound> {}
+    main() {}
+  main_2.dart: |
+    import 'main.dart' as m;
+    main() {
+      m.main();
+    }
 entry_point: "main_2.dart"
-import: "main.dart"
-definitions: ["x"]
 position: "main.dart#C"
 expression: |
   hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect
index 2fef29d..d986e71 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
-method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return main::hasBound<main::C::T>();
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return #lib1::hasBound<#lib1::C::T>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml
index 2ff676d..da78f23 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml
@@ -2,8 +2,10 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: ["x"]
+sources: |
+  class Bound {}
+  void hasBound<T extends Bound>() {}
+  class A<T> {}
 position: "main.dart#A"
 expression: |
   hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect
index cd03e3a..ec753a8 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect
@@ -1,9 +1,9 @@
 Errors: {
   org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
-   - 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
+   - 'Bound' is from 'org-dartlang-testcase:///main.dart'.
   Try changing type arguments so that they conform to the bounds.
   hasBound<T>()
   ^
 }
-method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return main::hasBound<main::A::T%>();
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return #lib1::hasBound<#lib1::A::T%>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml
index e6a0f33..8dc7a50 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml
@@ -2,9 +2,19 @@
 # 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.
 
+sources:
+  main.dart: |
+    class Bound {}
+    void hasBound<T extends Bound>() {}
+    class C<T extends Bound> {}
+    class A<T> {}
+    main() {}
+  main_2.dart: |
+    import 'main.dart' as m;
+    main() {
+      m.main();
+    }
 entry_point: "main_2.dart"
-import: "main.dart"
-definitions: ["x"]
 position: "main.dart#A"
 expression: |
   hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect
index cd03e3a..ec753a8 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect
@@ -1,9 +1,9 @@
 Errors: {
   org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
-   - 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
+   - 'Bound' is from 'org-dartlang-testcase:///main.dart'.
   Try changing type arguments so that they conform to the bounds.
   hasBound<T>()
   ^
 }
-method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return main::hasBound<main::A::T%>();
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return #lib1::hasBound<#lib1::A::T%>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_circular_reference.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_circular_reference.expression.yaml
index 086d26f..8be718c 100644
--- a/pkg/front_end/testcases/expression/class_type_param_circular_reference.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_circular_reference.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#MiddlewareApi"
+sources: |
+  abstract class Built<V extends Built<V, B>, B extends Builder<V, B>> {}
+  abstract class Builder<V extends Built<V, B>, B extends Builder<V, B>> {}
+  class MiddlewareApi<State extends Built<State, StateBuilder>,
+      StateBuilder extends Builder<State, StateBuilder>> {}
+position: "#MiddlewareApi"
 expression: |
   toString()
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml
index 18371de..5744d72 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml
@@ -2,8 +2,9 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
 definitions: ["x"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   x is T
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml.expect
index e3d9c51..fc7bba2 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_reference.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return x is{ForNonNullableByDefault} main::A::T%;
+  return x is{ForNonNullableByDefault} #lib1::A::T%;
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml
index 13ab5ef..518bf0a 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml
@@ -2,8 +2,10 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
+  T id<T>(T x) => x;
 definitions: ["x"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   id<T>(x)
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml.expect
index cccded5..41d97278 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_arg.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return main::id<main::A::T%>(x as{TypeError,ForDynamic,ForNonNullableByDefault} main::A::T%);
+  return #lib1::id<#lib1::A::T%>(x as{TypeError,ForDynamic,ForNonNullableByDefault} #lib1::A::T%);
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml
index d42666f..6b7197e 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml
@@ -2,9 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
+  T id<T>(T x) => x;
 definitions: ["x"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   () {
     x = id(x);
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml.expect
index e5b3c04..d81f9e6 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_arg_inferred.expression.yaml.expect
@@ -2,5 +2,5 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
   return () → Null {
-    x = main::id<dynamic>(x);
+    x = #lib1::id<dynamic>(x);
   };
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml
index a1526e4..71a14d9 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml
@@ -2,8 +2,10 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: ["x"]
-position: "main.dart#A"
+sources: |
+  class A<T> {
+    const A();
+  }
+position: "#A"
 expression: |
   new A<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml.expect
index c86dbe1..45a803d 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_ctor.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
-method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
-  return new main::A::•<main::A::T%>();
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return new #lib1::A::•<#lib1::A::T%>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml
index 39ff366..a16e189 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml
@@ -2,9 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {
+    const A();
+  }
 definitions: ["x"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   () {
     x = new A();
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml.expect
index bbce9bb..4a5575a 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_ctor_inferred.expression.yaml.expect
@@ -2,5 +2,5 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
   return () → Null {
-    x = new main::A::•<dynamic>();
+    x = new #lib1::A::•<dynamic>();
   };
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml
index 04899ba..3c12a4c 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml
@@ -2,9 +2,10 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
 definitions: []
-position: "main.dart#A"
+position: "#A"
 expression: |
   () {
     T? k = null;
diff --git a/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml.expect
index 422ee4f..a77652b 100644
--- a/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_reference_var.expression.yaml.expect
@@ -1,7 +1,7 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return () → main::A::T? {
-    main::A::T? k = null;
+  return () → #lib1::A::T? {
+    #lib1::A::T? k = null;
     return k;
   };
diff --git a/pkg/front_end/testcases/expression/const_usage.expression.yaml b/pkg/front_end/testcases/expression/const_usage.expression.yaml
index b017b26..9fadd7b 100644
--- a/pkg/front_end/testcases/expression/const_usage.expression.yaml
+++ b/pkg/front_end/testcases/expression/const_usage.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  const ConstClass const42 = ConstClass(42);
+  class ConstClass {
+    final int x;
+    const ConstClass(this.x);
+  }
 expression: |
   const42.x
diff --git a/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect b/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
index f87802b..70b508c 100644
--- a/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
@@ -1,8 +1,8 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return #C2.{main::ConstClass::x}{dart.core::int};
+  return #C2.{#lib1::ConstClass::x}{dart.core::int};
 constants  {
   #C1 = 42
-  #C2 = main::ConstClass {x:#C1}
+  #C2 = #lib1::ConstClass {x:#C1}
 }
diff --git a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml
index 9425ebb..497e6aa 100644
--- a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml
+++ b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml
@@ -2,8 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#ConstClass"
+sources: |
+  class ConstClass {
+    static const ConstClass classConst42 = ConstClass(42);
+    final int x;
+    const ConstClass(this.x);
+  }
+position: "#ConstClass"
 expression: |
   classConst42.x
diff --git a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
index f87802b..70b508c 100644
--- a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
@@ -1,8 +1,8 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return #C2.{main::ConstClass::x}{dart.core::int};
+  return #C2.{#lib1::ConstClass::x}{dart.core::int};
 constants  {
   #C1 = 42
-  #C2 = main::ConstClass {x:#C1}
+  #C2 = #lib1::ConstClass {x:#C1}
 }
diff --git a/pkg/front_end/testcases/expression/core_lib_imported.expression.yaml b/pkg/front_end/testcases/expression/core_lib_imported.expression.yaml
index 61f679b..8eafa97 100644
--- a/pkg/front_end/testcases/expression/core_lib_imported.expression.yaml
+++ b/pkg/front_end/testcases/expression/core_lib_imported.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-- entry_point: "main.dart"
-  definitions: []
-  position: "dart:collection"
-  expression: |
-    identical(1, 1)
+sources: |
+  main() {}
+position: "dart:collection"
+expression: |
+  identical(1, 1)
diff --git a/pkg/front_end/testcases/expression/core_lib_internal.expression.yaml b/pkg/front_end/testcases/expression/core_lib_internal.expression.yaml
index 6a2652b..864d0a2 100644
--- a/pkg/front_end/testcases/expression/core_lib_internal.expression.yaml
+++ b/pkg/front_end/testcases/expression/core_lib_internal.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-- entry_point: "main.dart"
-  definitions: []
-  position: "dart:collection"
-  expression: |
-    null is Queue
+sources: |
+  main() {}
+position: "dart:collection"
+expression: |
+  null is Queue
diff --git a/pkg/front_end/testcases/expression/eval.dart b/pkg/front_end/testcases/expression/eval.dart
deleted file mode 100644
index b905801..0000000
--- a/pkg/front_end/testcases/expression/eval.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2018, 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.
-
-int globalVar = 100;
-
-class MyClass {
-  static int staticVar = 1000;
-
-  static void method(int value) {}
-}
-
-void testFunction() {
-  int i = 0;
-  while (true) {
-    if (++i % 100000000 == 0) {
-      MyClass.method(10000);
-    }
-  }
-}
diff --git a/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml b/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml
index ad1a058..f92bf67 100644
--- a/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml
+++ b/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml
@@ -2,14 +2,24 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  void hasList() {
+    List<String> x = ["a", "b", "c"];
+    int xCombinedLength = x.fold<int>(
+        0, (previousValue, element) => previousValue + element.length);
+    print("xCombinedLength = $xCombinedLength");
+  }
+  extension Foo on String {
+    int getFortyTwo() {
+      return 42;
+    }
+  }
 definitions: ["x"]
 # List<String>
 definition_types: ["dart:core", "List", "1", "1", "dart:core", "String", "1", "0"]
 type_definitions: [""]
 type_bounds: []
 type_defaults: []
-position: "main.dart"
 method: "hasList"
 # x is List<String> with entries, so x.first is String, String has extension
 # with method getFortyTwo.
diff --git a/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml.expect b/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml.expect
index 7367fce..6516caa 100644
--- a/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/evaluate_extension_method.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr< extends dynamic>(dart.core::List<dart.core::String> x) → dynamic
-  return main::Foo|getFortyTwo(x.{dart.core::Iterable::first}{dart.core::String});
+  return #lib1::Foo|getFortyTwo(x.{dart.core::Iterable::first}{dart.core::String});
diff --git a/pkg/front_end/testcases/expression/evaluate_fold_on_list.expression.yaml b/pkg/front_end/testcases/expression/evaluate_fold_on_list.expression.yaml
index e43e163..3729e29 100644
--- a/pkg/front_end/testcases/expression/evaluate_fold_on_list.expression.yaml
+++ b/pkg/front_end/testcases/expression/evaluate_fold_on_list.expression.yaml
@@ -2,14 +2,24 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  void hasList() {
+    List<String> x = ["a", "b", "c"];
+    int xCombinedLength = x.fold<int>(
+        0, (previousValue, element) => previousValue + element.length);
+    print("xCombinedLength = $xCombinedLength");
+  }
+  extension Foo on String {
+    int getFortyTwo() {
+      return 42;
+    }
+  }
 definitions: ["x", "y"]
 # List<String>, int
 definition_types: ["dart:core", "List", "1", "1", "dart:core", "String", "1", "0", "dart:core", "int", "1", "0"]
 type_definitions: []
 type_bounds: []
 type_defaults: []
-position: "main.dart"
 method: "hasList"
 # Because x has a type (List<String>) x.fold knows that element is a String.
 expression: |
diff --git a/pkg/front_end/testcases/expression/extension_this.expression.yaml b/pkg/front_end/testcases/expression/extension_this.expression.yaml
index 3ac2b8f..f9014c3 100644
--- a/pkg/front_end/testcases/expression/extension_this.expression.yaml
+++ b/pkg/front_end/testcases/expression/extension_this.expression.yaml
@@ -2,9 +2,20 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  extension Foo on String {
+    int parseAsInt() {
+      int result = int.parse(this);
+      print("Parsed $this to $result");
+      print(getFortyTwo());
+      return result;
+    }
+
+    int getFortyTwo() {
+      return 42;
+    }
+  }
 definitions: ["#this"]
-position: "main.dart"
 method: "Foo.parseAsInt"
 expression: |
   () { print(getFortyTwo()); return this; }
diff --git a/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect b/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect
index 89a66e9..3aec282 100644
--- a/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect
@@ -2,6 +2,6 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(lowered dynamic #this) → dynamic
   return () → dynamic {
-    dart.core::print(main::Foo|getFortyTwo(#this as{TypeError,ForDynamic,ForNonNullableByDefault} dart.core::String));
+    dart.core::print(#lib1::Foo|getFortyTwo(#this as{TypeError,ForDynamic,ForNonNullableByDefault} dart.core::String));
     return #this;
   };
diff --git a/pkg/front_end/testcases/expression/from_vm_cc_linked_hash_map.expression.yaml b/pkg/front_end/testcases/expression/from_vm_cc_linked_hash_map.expression.yaml
index 9b5507b..211acc3 100644
--- a/pkg/front_end/testcases/expression/from_vm_cc_linked_hash_map.expression.yaml
+++ b/pkg/front_end/testcases/expression/from_vm_cc_linked_hash_map.expression.yaml
@@ -2,7 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  main() {}
 definitions: [a, b]
 position: "dart:collection"
 expression: |
diff --git a/pkg/front_end/testcases/expression/inside_class_with_import_1.expression.yaml b/pkg/front_end/testcases/expression/inside_class_with_import_1.expression.yaml
index 30dce60..00a2c4b 100644
--- a/pkg/front_end/testcases/expression/inside_class_with_import_1.expression.yaml
+++ b/pkg/front_end/testcases/expression/inside_class_with_import_1.expression.yaml
@@ -2,9 +2,27 @@
 # 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.
 
+sources:
+  a.dart: |
+    import "b.dart";
+
+    main() {
+      Foo foo = new Foo();
+      print(foo.foo);
+    }
+
+    class Foo<E1> {
+      E1? get foo => null;
+      String get bar => "hello";
+    }
+
+    class Bar {}
+  b.dart: |
+    class Foo<E2> {
+      E2? get foo => null;
+      int get bar => 42;
+    }
 entry_point: "a.dart"
-import: "b.dart"
-definitions: []
 position: "a.dart#Foo"
 expression: |
   foo
diff --git a/pkg/front_end/testcases/expression/inside_class_with_import_2.expression.yaml b/pkg/front_end/testcases/expression/inside_class_with_import_2.expression.yaml
index 2fba111..de73402 100644
--- a/pkg/front_end/testcases/expression/inside_class_with_import_2.expression.yaml
+++ b/pkg/front_end/testcases/expression/inside_class_with_import_2.expression.yaml
@@ -2,9 +2,27 @@
 # 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.
 
+sources:
+  a.dart: |
+    import "b.dart";
+
+    main() {
+      Foo foo = new Foo();
+      print(foo.foo);
+    }
+
+    class Foo<E1> {
+      E1? get foo => null;
+      String get bar => "hello";
+    }
+
+    class Bar {}
+  b.dart: |
+    class Foo<E2> {
+      E2? get foo => null;
+      int get bar => 42;
+    }
 entry_point: "a.dart"
-import: "b.dart"
-definitions: []
 position: "a.dart#Foo"
 expression: |
   bar.length
diff --git a/pkg/front_end/testcases/expression/inside_class_with_import_3.expression.yaml b/pkg/front_end/testcases/expression/inside_class_with_import_3.expression.yaml
index f8eb3a8..fbafc54 100644
--- a/pkg/front_end/testcases/expression/inside_class_with_import_3.expression.yaml
+++ b/pkg/front_end/testcases/expression/inside_class_with_import_3.expression.yaml
@@ -2,9 +2,27 @@
 # 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.
 
+sources:
+  a.dart: |
+    import "b.dart";
+
+    main() {
+      Foo foo = new Foo();
+      print(foo.foo);
+    }
+
+    class Foo<E1> {
+      E1? get foo => null;
+      String get bar => "hello";
+    }
+
+    class Bar {}
+  b.dart: |
+    class Foo<E2> {
+      E2? get foo => null;
+      int get bar => 42;
+    }
 entry_point: "a.dart"
-import: "b.dart"
-definitions: []
 position: "a.dart#Bar"
 expression: |
   new Foo().bar.length
diff --git a/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml b/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml
index 23272e3..e057e29 100644
--- a/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml
+++ b/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml
@@ -2,8 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#E"
+sources: |
+  class E<T> {
+    T? _t;
+    T? get t => _t;
+  }
+position: "#E"
 expression: |
   t
diff --git a/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml.expect b/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml.expect
index e0b421b..4800587 100644
--- a/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/inside_class_with_t.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return this.{main::E::t}{main::E::T?};
+  return this.{#lib1::E::t}{#lib1::E::T?};
diff --git a/pkg/front_end/testcases/expression/inside_class_with_t_in_dart_collection.expression.yaml b/pkg/front_end/testcases/expression/inside_class_with_t_in_dart_collection.expression.yaml
index 343d2ba..02647cb 100644
--- a/pkg/front_end/testcases/expression/inside_class_with_t_in_dart_collection.expression.yaml
+++ b/pkg/front_end/testcases/expression/inside_class_with_t_in_dart_collection.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  main() {}
 position: "dart:collection#LinkedList"
 expression: |
   first
diff --git a/pkg/front_end/testcases/expression/instantiate_enum.expression.yaml b/pkg/front_end/testcases/expression/instantiate_enum.expression.yaml
index b6739e7..1ef088c 100644
--- a/pkg/front_end/testcases/expression/instantiate_enum.expression.yaml
+++ b/pkg/front_end/testcases/expression/instantiate_enum.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  enum En { a, b, c }
 expression: |
   En(123, 'foo')
diff --git a/pkg/front_end/testcases/expression/invalid.expression.yaml b/pkg/front_end/testcases/expression/invalid.expression.yaml
index 374eda8..46a15f5 100644
--- a/pkg/front_end/testcases/expression/invalid.expression.yaml
+++ b/pkg/front_end/testcases/expression/invalid.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  main() {}
 expression: |
   *foo(3,
diff --git a/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml b/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml
index 70beb29..3e08854 100644
--- a/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml
+++ b/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  main() {}
 type_definitions: ["a#b"]
-position: "main.dart"
 expression: |
   3
diff --git a/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml.expect b/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml.expect
index 792e96a..b27d75a 100644
--- a/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/invalid_type_variable.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
-  pkg/front_end/testcases/expression/main.dart: Error: Illegal type parameter name 'TypeParameter(a#b)' found during expression compilation.
+  org-dartlang-testcase:///main.dart: Error: Illegal type parameter name 'TypeParameter(a#b)' found during expression compilation.
 }
 <no procedure>
diff --git a/pkg/front_end/testcases/expression/invalid_variable.expression.yaml b/pkg/front_end/testcases/expression/invalid_variable.expression.yaml
index 6d44881..7ee6fa5 100644
--- a/pkg/front_end/testcases/expression/invalid_variable.expression.yaml
+++ b/pkg/front_end/testcases/expression/invalid_variable.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  main() {}
 definitions: ["a#b"]
-position: "main.dart"
 expression: |
   3
diff --git a/pkg/front_end/testcases/expression/invalid_variable.expression.yaml.expect b/pkg/front_end/testcases/expression/invalid_variable.expression.yaml.expect
index a093fa5..9807b7a 100644
--- a/pkg/front_end/testcases/expression/invalid_variable.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/invalid_variable.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
-  pkg/front_end/testcases/expression/main.dart: Error: Illegal parameter name 'a#b' found during expression compilation.
+  org-dartlang-testcase:///main.dart: Error: Illegal parameter name 'a#b' found during expression compilation.
 }
 <no procedure>
diff --git a/pkg/front_end/testcases/expression/lib_ctor.expression.yaml b/pkg/front_end/testcases/expression/lib_ctor.expression.yaml
index c1d5cee..0ce5205 100644
--- a/pkg/front_end/testcases/expression/lib_ctor.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_ctor.expression.yaml
@@ -2,8 +2,9 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  class A<T> {
+    const A();
+  }
 expression: |
   () { new A(); const A(); }
diff --git a/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect b/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect
index 5944c43..9a71d6b 100644
--- a/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect
@@ -2,10 +2,9 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
   return () → Null {
-    new main::A::•<dynamic>();
-    #C2;
+    new #lib1::A::•<dynamic>();
+    #C1;
   };
 constants  {
-  #C1 = 0
-  #C2 = main::A<dynamic> {_priv:#C1}
+  #C1 = #lib1::A<dynamic> {}
 }
diff --git a/pkg/front_end/testcases/expression/lib_external_ctor.expression.yaml b/pkg/front_end/testcases/expression/lib_external_ctor.expression.yaml
index 51e04a2..b50e643 100644
--- a/pkg/front_end/testcases/expression/lib_external_ctor.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_external_ctor.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  import 'dart:io' show File, Process;
+  main() {}
 expression: |
   () { new Process(); new File.fromUri(Uri.parse("file://test.dart")); }
diff --git a/pkg/front_end/testcases/expression/lib_nonctor.expression.yaml b/pkg/front_end/testcases/expression/lib_nonctor.expression.yaml
index 637ef0c..d93abe1 100644
--- a/pkg/front_end/testcases/expression/lib_nonctor.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_nonctor.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  main() {}
 expression: |
   new Random()
diff --git a/pkg/front_end/testcases/expression/lib_nonreference.expression.yaml b/pkg/front_end/testcases/expression/lib_nonreference.expression.yaml
index a50ac5c..e5b1b5e 100644
--- a/pkg/front_end/testcases/expression/lib_nonreference.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_nonreference.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  main() {}
 expression: |
   acos(1.0)
diff --git a/pkg/front_end/testcases/expression/lib_nonshown_ctor.expression.yaml b/pkg/front_end/testcases/expression/lib_nonshown_ctor.expression.yaml
index db9b51c..65af04b 100644
--- a/pkg/front_end/testcases/expression/lib_nonshown_ctor.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_nonshown_ctor.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  import 'dart:io' show File;
+  main() {}
 expression: |
   new Directory("test")
diff --git a/pkg/front_end/testcases/expression/lib_reference.expression.yaml b/pkg/front_end/testcases/expression/lib_reference.expression.yaml
index 59999cc..9a128c0 100644
--- a/pkg/front_end/testcases/expression/lib_reference.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_reference.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  import 'dart:io' show exit;
+  main() {}
 expression: |
   exit(2)
diff --git a/pkg/front_end/testcases/expression/lib_simple.expression.yaml b/pkg/front_end/testcases/expression/lib_simple.expression.yaml
index 052b9b4..6e5ceb3 100644
--- a/pkg/front_end/testcases/expression/lib_simple.expression.yaml
+++ b/pkg/front_end/testcases/expression/lib_simple.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  int doitstat(int x) => x + 1;
 expression: |
   doitstat(2)
diff --git a/pkg/front_end/testcases/expression/lib_simple.expression.yaml.expect b/pkg/front_end/testcases/expression/lib_simple.expression.yaml.expect
index c54d90c..a515e97 100644
--- a/pkg/front_end/testcases/expression/lib_simple.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/lib_simple.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return main::doitstat(2);
+  return #lib1::doitstat(2);
diff --git a/pkg/front_end/testcases/expression/library_private_get.expression.yaml b/pkg/front_end/testcases/expression/library_private_get.expression.yaml
index 1420876..803b4d4 100644
--- a/pkg/front_end/testcases/expression/library_private_get.expression.yaml
+++ b/pkg/front_end/testcases/expression/library_private_get.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  int _globalPrivate = 7;
 expression: |
   _globalPrivate
diff --git a/pkg/front_end/testcases/expression/library_private_get.expression.yaml.expect b/pkg/front_end/testcases/expression/library_private_get.expression.yaml.expect
index 3344ae2..bbd5c55 100644
--- a/pkg/front_end/testcases/expression/library_private_get.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/library_private_get.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return main::_globalPrivate;
+  return #lib1::_globalPrivate;
diff --git a/pkg/front_end/testcases/expression/library_private_method.expression.yaml b/pkg/front_end/testcases/expression/library_private_method.expression.yaml
index 49c6972..06e5b0b 100644
--- a/pkg/front_end/testcases/expression/library_private_method.expression.yaml
+++ b/pkg/front_end/testcases/expression/library_private_method.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  int _privateToplevel(int x) => x + 1;
 expression: |
   _privateToplevel(3)
diff --git a/pkg/front_end/testcases/expression/library_private_method.expression.yaml.expect b/pkg/front_end/testcases/expression/library_private_method.expression.yaml.expect
index 6a0e56c..f02e425 100644
--- a/pkg/front_end/testcases/expression/library_private_method.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/library_private_method.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return main::_privateToplevel(3);
+  return #lib1::_privateToplevel(3);
diff --git a/pkg/front_end/testcases/expression/library_private_set.expression.yaml b/pkg/front_end/testcases/expression/library_private_set.expression.yaml
index 5fe632f..83744da 100644
--- a/pkg/front_end/testcases/expression/library_private_set.expression.yaml
+++ b/pkg/front_end/testcases/expression/library_private_set.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  int _globalPrivate = 7;
 expression: |
   _globalPrivate = 2
diff --git a/pkg/front_end/testcases/expression/library_private_set.expression.yaml.expect b/pkg/front_end/testcases/expression/library_private_set.expression.yaml.expect
index e7752bf..72b218d 100644
--- a/pkg/front_end/testcases/expression/library_private_set.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/library_private_set.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return main::_globalPrivate = 2;
+  return #lib1::_globalPrivate = 2;
diff --git a/pkg/front_end/testcases/expression/main.dart b/pkg/front_end/testcases/expression/main.dart
deleted file mode 100644
index 99bec5b..0000000
--- a/pkg/front_end/testcases/expression/main.dart
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 2018, 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.
-
-library main;
-
-import 'dart:io' show File, Process, exit;
-import 'dart:collection';
-
-class Entry extends LinkedListEntry<Entry> {}
-
-List<String> listOfStrings = ["hello"];
-
-int doitstat(int x) => x + 1;
-int _privateToplevel(int x) => x + 1;
-
-int globalVar = 6;
-int _globalPrivate = 7;
-
-const ConstClass const42 = ConstClass(42);
-
-class ConstClass {
-  static const ConstClass classConst42 = ConstClass(42);
-  final int x;
-  const ConstClass(this.x);
-}
-
-class A<T> {
-  const A();
-  static int doit(int x) => x + 1;
-  static int staticVar = 3;
-  int doit_with_this(int x) => x + 1;
-
-  final int? _priv = 0;
-  void _privMethod() {}
-}
-
-T id<T>(T x) => x;
-
-class B extends A<Object> {
-  int x;
-  final int y = 7;
-  int? _priv;
-
-  B(this.x);
-
-  String get z {
-    return "";
-  }
-
-  void set z(_) {}
-  void _privMethod() {}
-}
-
-class Bound {}
-
-class HasPrivate {
-  int? _priv = 0;
-}
-
-class C<T extends Bound> extends HasPrivate {}
-
-void hasBound<T extends Bound>() {}
-
-Object? k;
-
-class D<T> {
-  Y id<Y>(Y x) => x;
-  m(List<T> l) {
-    assert(l is List<T>);
-  }
-
-  foo() {
-    List<T> s;
-  }
-}
-
-abstract class Built<V extends Built<V, B>, B extends Builder<V, B>> {}
-
-abstract class Builder<V extends Built<V, B>, B extends Builder<V, B>> {}
-
-class MiddlewareApi<State extends Built<State, StateBuilder>,
-    StateBuilder extends Builder<State, StateBuilder>> {}
-
-main() {
-  exit(0);
-}
-
-extension Foo on String {
-  int parseAsInt() {
-    int result = int.parse(this);
-    print("Parsed $this to $result");
-    print(getFortyTwo());
-    return result;
-  }
-
-  int getFortyTwo() {
-    return 42;
-  }
-}
-
-class E<T> {
-  T? _t;
-  T? get t => _t;
-}
-
-void withBound<E extends String>(List<E> x) {
-  List<E> y = [];
-  List<String> z = [];
-  z.addAll(y);
-}
-
-void withBound2<E>() {
-  print(E);
-}
-
-void hasList() {
-  List<String> x = ["a", "b", "c"];
-  int xCombinedLength = x.fold<int>(
-      0, (previousValue, element) => previousValue + element.length);
-  print("xCombinedLength = $xCombinedLength");
-}
-
-void hasClosure() {
-  List<String> x() {
-    return ["hello"];
-  }
-
-  int xCombinedLength = x()
-      .fold<int>(0, (previousValue, element) => previousValue + element.length);
-  print("xCombinedLength = $xCombinedLength");
-}
-
-enum En { a, b, c }
diff --git a/pkg/front_end/testcases/expression/main_2.dart b/pkg/front_end/testcases/expression/main_2.dart
deleted file mode 100644
index 5cebe18..0000000
--- a/pkg/front_end/testcases/expression/main_2.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2019, 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.
-
-library main_2;
-
-import 'main.dart' as m;
-
-main() {
-  m.main();
-}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/expression/main_private.dart b/pkg/front_end/testcases/expression/main_private.dart
deleted file mode 100644
index cce57ee..0000000
--- a/pkg/front_end/testcases/expression/main_private.dart
+++ /dev/null
@@ -1,263 +0,0 @@
-// Copyright (c) 2019, 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.
-
-// @dart = 2.9
-
-class Foo {
-  int what;
-
-  Foo() : what = 0;
-  Foo.publicNamed() : what = 1;
-  Foo._privateNamed() : what = 2;
-
-  int publicMethod() {
-    return 42;
-  }
-
-  int _privateMethod() {
-    return 43;
-  }
-
-  static int publicStaticMethod() {
-    return 44;
-  }
-
-  static int _privateStaticMethod() {
-    return 45;
-  }
-
-  int publicField = 84;
-  int _privateField = 85;
-  static int publicStaticField = 86;
-  static int _privateStaticField = 87;
-
-  int get publicGetter => -1;
-  int get _privateGetter => -2;
-  static int get publicStaticGetter => -3;
-  static int get _privateStaticGetter => -4;
-
-  void set publicSetter(int x) {}
-  void set _privateSetter(int x) {}
-  static void set publicStaticSetter(int x) {}
-  static void set _privateStaticSetter(int x) {}
-}
-
-extension PublicExtension on Foo {
-  int publicPublicExtensionMethod() {
-    return 20;
-  }
-
-  int _publicPrivateExtensionMethod() {
-    return 21;
-  }
-
-  static int publicPublicStaticExtensionMethod() {
-    return 22;
-  }
-
-  static int _publicPrivateStaticExtensionMethod() {
-    return 23;
-  }
-
-  static int publicPublicStaticExtensionField = 24;
-  static int _publicPrivateStaticExtensionField = 25;
-
-  int get publicPublicExtensionGetter {
-    return 26;
-  }
-
-  int get _publicPrivateExtensionGetter {
-    return 27;
-  }
-
-  static int get publicPublicStaticExtensionGetter {
-    return 28;
-  }
-
-  static int get _publicPrivateStaticExtensionGetter {
-    return 29;
-  }
-
-  void set publicPublicExtensionSetter(int x) {}
-
-  void set _publicPrivateExtensionSetter(int x) {}
-
-  static void set publicPublicStaticExtensionSetter(int x) {}
-
-  static void set _publicPrivateStaticExtensionSetter(int x) {}
-}
-
-extension _PrivateExtension on Foo {
-  int privatePublicExtensionMethod() {
-    return 30;
-  }
-
-  int _privatePrivateExtensionMethod() {
-    return 31;
-  }
-
-  static int privatePublicStaticExtensionMethod() {
-    return 32;
-  }
-
-  static int _privatePrivateStaticExtensionMethod() {
-    return 33;
-  }
-
-  static int privatePublicStaticExtensionField = 34;
-  static int _privatePrivateStaticExtensionField = 35;
-
-  int get privatePublicExtensionGetter {
-    return 36;
-  }
-
-  int get _privatePrivateExtensionGetter {
-    return 37;
-  }
-
-  static int get privatePublicStaticExtensionGetter {
-    return 38;
-  }
-
-  static int get _privatePrivateStaticExtensionGetter {
-    return 39;
-  }
-
-  void set privatePublicExtensionSetter(int x) {}
-
-  void set _privatePrivateExtensionSetter(int x) {}
-
-  static void set privatePublicStaticExtensionSetter(int x) {}
-
-  static void set _privatePrivateStaticExtensionSetter(int x) {}
-}
-
-int publicTopLevelMethod() {
-  return 50;
-}
-
-int _privateTopLevelMethod() {
-  return 51;
-}
-
-int publicTopLevelField = 52;
-int _privateTopLevelField = 53;
-
-int get publicTopLevelGetter {
-  return 54;
-}
-
-int get _privateTopLevelGetter {
-  return 55;
-}
-
-void set publicTopLevelSetter(int x) {}
-
-void set _privateTopLevelSetter(int x) {}
-
-main() {
-  // Class constructors.
-  Foo foo = new Foo();
-  assert(foo.what == 0);
-  foo = new Foo.publicNamed();
-  assert(foo.what == 1);
-  foo = new Foo._privateNamed();
-  assert(foo.what == 2);
-
-  // Class methods.
-  assert(foo.publicMethod() == 42);
-  assert(foo._privateMethod() == 43);
-  assert(Foo.publicStaticMethod() == 44);
-  assert(Foo._privateStaticMethod() == 45);
-
-  // Class fields.
-  assert(foo.publicField == 84);
-  foo.publicField = -84;
-  assert(foo.publicField == -84);
-  assert(foo._privateField == 85);
-  foo._privateField = -85;
-  assert(foo._privateField == -85);
-  assert(Foo.publicStaticField == 86);
-  Foo.publicStaticField = -86;
-  assert(Foo.publicStaticField == -86);
-  assert(Foo._privateStaticField == 87);
-  Foo._privateStaticField = -87;
-  assert(Foo._privateStaticField == -87);
-
-  // Class getters.
-  assert(foo.publicGetter == -1);
-  assert(foo._privateGetter == -2);
-  assert(Foo.publicStaticGetter == -3);
-  assert(Foo._privateStaticGetter == -4);
-
-  // Class setters.
-  foo.publicSetter = 42;
-  foo._privateSetter = 42;
-  Foo.publicStaticSetter = 42;
-  Foo._privateStaticSetter = 42;
-
-  // Extension methods.
-  assert(foo.publicPublicExtensionMethod() == 20);
-  assert(foo._publicPrivateExtensionMethod() == 21);
-  assert(PublicExtension.publicPublicStaticExtensionMethod() == 22);
-  assert(PublicExtension._publicPrivateStaticExtensionMethod() == 23);
-  assert(foo.privatePublicExtensionMethod() == 30);
-  assert(foo._privatePrivateExtensionMethod() == 31);
-  assert(_PrivateExtension.privatePublicStaticExtensionMethod() == 32);
-  assert(_PrivateExtension._privatePrivateStaticExtensionMethod() == 33);
-
-  // Extension fields.
-  assert(PublicExtension.publicPublicStaticExtensionField == 24);
-  PublicExtension.publicPublicStaticExtensionField = -24;
-  assert(PublicExtension.publicPublicStaticExtensionField == -24);
-  assert(PublicExtension._publicPrivateStaticExtensionField == 25);
-  PublicExtension._publicPrivateStaticExtensionField = -25;
-  assert(PublicExtension._publicPrivateStaticExtensionField == -25);
-  assert(_PrivateExtension.privatePublicStaticExtensionField == 34);
-  _PrivateExtension.privatePublicStaticExtensionField = -34;
-  assert(_PrivateExtension.privatePublicStaticExtensionField == -34);
-  assert(_PrivateExtension._privatePrivateStaticExtensionField == 35);
-  _PrivateExtension._privatePrivateStaticExtensionField = -35;
-  assert(_PrivateExtension._privatePrivateStaticExtensionField == -35);
-
-  // Extension getters.
-  assert(foo.publicPublicExtensionGetter == 26);
-  assert(foo._publicPrivateExtensionGetter == 27);
-  assert(PublicExtension.publicPublicStaticExtensionGetter == 28);
-  assert(PublicExtension._publicPrivateStaticExtensionGetter == 29);
-  assert(foo.privatePublicExtensionGetter == 36);
-  assert(foo._privatePrivateExtensionGetter == 37);
-  assert(_PrivateExtension.privatePublicStaticExtensionGetter == 38);
-  assert(_PrivateExtension._privatePrivateStaticExtensionGetter == 39);
-
-  // Extension setters.
-  foo.publicPublicExtensionSetter = 42;
-  foo._publicPrivateExtensionSetter = 42;
-  PublicExtension.publicPublicStaticExtensionSetter = 42;
-  PublicExtension._publicPrivateStaticExtensionSetter = 42;
-  foo.privatePublicExtensionSetter = 42;
-  foo._privatePrivateExtensionSetter = 42;
-  _PrivateExtension.privatePublicStaticExtensionSetter = 42;
-  _PrivateExtension._privatePrivateStaticExtensionSetter = 42;
-
-  // Top-level methods.
-  assert(publicTopLevelMethod() == 50);
-  assert(_privateTopLevelMethod() == 51);
-
-  // Top-level fields.
-  assert(publicTopLevelField == 52);
-  publicTopLevelField = -52;
-  assert(publicTopLevelField == -52);
-  assert(_privateTopLevelField == 53);
-  _privateTopLevelField = -53;
-  assert(_privateTopLevelField == -53);
-
-  // Top-level getters.
-  assert(publicTopLevelGetter == 54);
-  assert(_privateTopLevelGetter == 55);
-
-  // Top-level setters.
-  publicTopLevelSetter = 42;
-  _privateTopLevelSetter = 42;
-}
diff --git a/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml b/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml
index 2c83b92..48b86e4 100644
--- a/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml
+++ b/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml
@@ -2,8 +2,14 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class D<T> {
+    Y id<Y>(Y x) => x;
+    m(List<T> l) {
+      assert(l is List<T>);
+    }
+  }
 definitions: ["s"]
-position: "main.dart#D"
+position: "#D"
 expression: |
   m(id(s = []))
diff --git a/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml.expect b/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml.expect
index 4a467bc..3a81278 100644
--- a/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/missing_variable_types.expression.yaml.expect
@@ -5,4 +5,4 @@
        ^
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic s) → dynamic
-  return this.{main::D::m}(this.{main::D::id}<dart.core::List<main::D::T%>>(invalid-expression "org-dartlang-debug:synthetic_debug_expression:1:6: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<T>'.\n - 'List' is from 'dart:core'.\nm(id(s = []))\n     ^" in (s = dart.core::_GrowableList::•<dynamic>(0)) as{TypeError,ForNonNullableByDefault} Never){(dart.core::List<main::D::T%>) → dart.core::List<main::D::T%>}){(dart.core::List<main::D::T%>) → dynamic};
+  return this.{#lib1::D::m}(this.{#lib1::D::id}<dart.core::List<#lib1::D::T%>>(invalid-expression "org-dartlang-debug:synthetic_debug_expression:1:6: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<T>'.\n - 'List' is from 'dart:core'.\nm(id(s = []))\n     ^" in (s = dart.core::_GrowableList::•<dynamic>(0)) as{TypeError,ForNonNullableByDefault} Never){(dart.core::List<#lib1::D::T%>) → dart.core::List<#lib1::D::T%>}){(dart.core::List<#lib1::D::T%>) → dynamic};
diff --git a/pkg/front_end/testcases/expression/missing_variable_types2.expression.yaml b/pkg/front_end/testcases/expression/missing_variable_types2.expression.yaml
new file mode 100644
index 0000000..34bd7f2
--- /dev/null
+++ b/pkg/front_end/testcases/expression/missing_variable_types2.expression.yaml
@@ -0,0 +1,16 @@
+# Copyright (c) 2022, 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.
+
+sources: |
+  // @dart=2.9
+  class D<T> {
+    Y id<Y>(Y x) => x;
+    m(List<T> l) {
+      assert(l is List<T>);
+    }
+  }
+definitions: ["s"]
+position: "#D"
+expression: |
+  m(id(s = []))
diff --git a/pkg/front_end/testcases/expression/missing_variable_types2.expression.yaml.expect b/pkg/front_end/testcases/expression/missing_variable_types2.expression.yaml.expect
new file mode 100644
index 0000000..89cbec5
--- /dev/null
+++ b/pkg/front_end/testcases/expression/missing_variable_types2.expression.yaml.expect
@@ -0,0 +1,4 @@
+Errors: {
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic s) → dynamic
+  return this.{#lib1::D::m}(this.{#lib1::D::id}<dart.core::List<#lib1::D::T*>*>((s = dart.core::_GrowableList::•<dynamic>(0)) as{TypeError} dart.core::List<#lib1::D::T*>*){(dart.core::List<#lib1::D::T*>*) →* dart.core::List<#lib1::D::T*>*}){(dart.core::List<#lib1::D::T*>*) →* dynamic};
diff --git a/pkg/front_end/testcases/expression/noclass.expression.yaml b/pkg/front_end/testcases/expression/noclass.expression.yaml
index bc5edf0..332dd5f 100644
--- a/pkg/front_end/testcases/expression/noclass.expression.yaml
+++ b/pkg/front_end/testcases/expression/noclass.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#NoClass"
+sources: |
+  main() {}
+position: "#NoClass"
 expression: |
   0
diff --git a/pkg/front_end/testcases/expression/nolib.expression.yaml b/pkg/front_end/testcases/expression/nolib.expression.yaml
index 9ec59b7..80838fa 100644
--- a/pkg/front_end/testcases/expression/nolib.expression.yaml
+++ b/pkg/front_end/testcases/expression/nolib.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "nono.dart"
+sources: |
+  main() {}
+position: "noexisting.dart"
 expression: |
   0
diff --git a/pkg/front_end/testcases/expression/param_assign.expression.yaml b/pkg/front_end/testcases/expression/param_assign.expression.yaml
index 137e2a4..ef8f482 100644
--- a/pkg/front_end/testcases/expression/param_assign.expression.yaml
+++ b/pkg/front_end/testcases/expression/param_assign.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  main() {}
 definitions: ["x", "y"]
-position: "main.dart"
 expression: |
   x = 3
diff --git a/pkg/front_end/testcases/expression/param_capture.expression.yaml b/pkg/front_end/testcases/expression/param_capture.expression.yaml
index ac45276..2edb784 100644
--- a/pkg/front_end/testcases/expression/param_capture.expression.yaml
+++ b/pkg/front_end/testcases/expression/param_capture.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  main() {}
 definitions: ["x", "y"]
-position: "main.dart"
 expression: |
   () { x = x + y; }
diff --git a/pkg/front_end/testcases/expression/param_conflict.expression.yaml b/pkg/front_end/testcases/expression/param_conflict.expression.yaml
index b63adf0..79ec79d 100644
--- a/pkg/front_end/testcases/expression/param_conflict.expression.yaml
+++ b/pkg/front_end/testcases/expression/param_conflict.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  int dostat(int x) => x + 1;
 definitions: ["dostat", "y"]
-position: "main.dart"
 expression: |
   dostat.foo()
diff --git a/pkg/front_end/testcases/expression/param_conflict_class.expression.yaml b/pkg/front_end/testcases/expression/param_conflict_class.expression.yaml
index 2bf8db6..5d32980 100644
--- a/pkg/front_end/testcases/expression/param_conflict_class.expression.yaml
+++ b/pkg/front_end/testcases/expression/param_conflict_class.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A {}
 definitions: ["A", "y"]
-position: "main.dart"
 expression: |
   A.foo(y)
diff --git a/pkg/front_end/testcases/expression/param_method.expression.yaml b/pkg/front_end/testcases/expression/param_method.expression.yaml
index dbb3b59..b8d37c8 100644
--- a/pkg/front_end/testcases/expression/param_method.expression.yaml
+++ b/pkg/front_end/testcases/expression/param_method.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  main() {}
 definitions: ["x", "y"]
-position: "main.dart"
 expression: |
   x.foo(y)
diff --git a/pkg/front_end/testcases/expression/platform_isandroid.expression.yaml b/pkg/front_end/testcases/expression/platform_isandroid.expression.yaml
index eabefb8..acd4ac8 100644
--- a/pkg/front_end/testcases/expression/platform_isandroid.expression.yaml
+++ b/pkg/front_end/testcases/expression/platform_isandroid.expression.yaml
@@ -2,8 +2,9 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  import 'dart:io';
+  main() {}
 position: "dart:io"
 static: true
 expression: |
diff --git a/pkg/front_end/testcases/expression/private_stuff.expression.yaml b/pkg/front_end/testcases/expression/private_stuff.expression.yaml
index 2e9f8c6..8d15684 100644
--- a/pkg/front_end/testcases/expression/private_stuff.expression.yaml
+++ b/pkg/front_end/testcases/expression/private_stuff.expression.yaml
@@ -2,9 +2,266 @@
 # 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.
 
-entry_point: "main_private.dart"
-definitions: []
-position: "main_private.dart"
+sources: |
+  // @dart = 2.9
+
+  class Foo {
+    int what;
+
+    Foo() : what = 0;
+    Foo.publicNamed() : what = 1;
+    Foo._privateNamed() : what = 2;
+
+    int publicMethod() {
+      return 42;
+    }
+
+    int _privateMethod() {
+      return 43;
+    }
+
+    static int publicStaticMethod() {
+      return 44;
+    }
+
+    static int _privateStaticMethod() {
+      return 45;
+    }
+
+    int publicField = 84;
+    int _privateField = 85;
+    static int publicStaticField = 86;
+    static int _privateStaticField = 87;
+
+    int get publicGetter => -1;
+    int get _privateGetter => -2;
+    static int get publicStaticGetter => -3;
+    static int get _privateStaticGetter => -4;
+
+    void set publicSetter(int x) {}
+    void set _privateSetter(int x) {}
+    static void set publicStaticSetter(int x) {}
+    static void set _privateStaticSetter(int x) {}
+  }
+
+  extension PublicExtension on Foo {
+    int publicPublicExtensionMethod() {
+      return 20;
+    }
+
+    int _publicPrivateExtensionMethod() {
+      return 21;
+    }
+
+    static int publicPublicStaticExtensionMethod() {
+      return 22;
+    }
+
+    static int _publicPrivateStaticExtensionMethod() {
+      return 23;
+    }
+
+    static int publicPublicStaticExtensionField = 24;
+    static int _publicPrivateStaticExtensionField = 25;
+
+    int get publicPublicExtensionGetter {
+      return 26;
+    }
+
+    int get _publicPrivateExtensionGetter {
+      return 27;
+    }
+
+    static int get publicPublicStaticExtensionGetter {
+      return 28;
+    }
+
+    static int get _publicPrivateStaticExtensionGetter {
+      return 29;
+    }
+
+    void set publicPublicExtensionSetter(int x) {}
+
+    void set _publicPrivateExtensionSetter(int x) {}
+
+    static void set publicPublicStaticExtensionSetter(int x) {}
+
+    static void set _publicPrivateStaticExtensionSetter(int x) {}
+  }
+
+  extension _PrivateExtension on Foo {
+    int privatePublicExtensionMethod() {
+      return 30;
+    }
+
+    int _privatePrivateExtensionMethod() {
+      return 31;
+    }
+
+    static int privatePublicStaticExtensionMethod() {
+      return 32;
+    }
+
+    static int _privatePrivateStaticExtensionMethod() {
+      return 33;
+    }
+
+    static int privatePublicStaticExtensionField = 34;
+    static int _privatePrivateStaticExtensionField = 35;
+
+    int get privatePublicExtensionGetter {
+      return 36;
+    }
+
+    int get _privatePrivateExtensionGetter {
+      return 37;
+    }
+
+    static int get privatePublicStaticExtensionGetter {
+      return 38;
+    }
+
+    static int get _privatePrivateStaticExtensionGetter {
+      return 39;
+    }
+
+    void set privatePublicExtensionSetter(int x) {}
+
+    void set _privatePrivateExtensionSetter(int x) {}
+
+    static void set privatePublicStaticExtensionSetter(int x) {}
+
+    static void set _privatePrivateStaticExtensionSetter(int x) {}
+  }
+
+  int publicTopLevelMethod() {
+    return 50;
+  }
+
+  int _privateTopLevelMethod() {
+    return 51;
+  }
+
+  int publicTopLevelField = 52;
+  int _privateTopLevelField = 53;
+
+  int get publicTopLevelGetter {
+    return 54;
+  }
+
+  int get _privateTopLevelGetter {
+    return 55;
+  }
+
+  void set publicTopLevelSetter(int x) {}
+
+  void set _privateTopLevelSetter(int x) {}
+
+  main() {
+    // Class constructors.
+    Foo foo = new Foo();
+    assert(foo.what == 0);
+    foo = new Foo.publicNamed();
+    assert(foo.what == 1);
+    foo = new Foo._privateNamed();
+    assert(foo.what == 2);
+
+    // Class methods.
+    assert(foo.publicMethod() == 42);
+    assert(foo._privateMethod() == 43);
+    assert(Foo.publicStaticMethod() == 44);
+    assert(Foo._privateStaticMethod() == 45);
+
+    // Class fields.
+    assert(foo.publicField == 84);
+    foo.publicField = -84;
+    assert(foo.publicField == -84);
+    assert(foo._privateField == 85);
+    foo._privateField = -85;
+    assert(foo._privateField == -85);
+    assert(Foo.publicStaticField == 86);
+    Foo.publicStaticField = -86;
+    assert(Foo.publicStaticField == -86);
+    assert(Foo._privateStaticField == 87);
+    Foo._privateStaticField = -87;
+    assert(Foo._privateStaticField == -87);
+
+    // Class getters.
+    assert(foo.publicGetter == -1);
+    assert(foo._privateGetter == -2);
+    assert(Foo.publicStaticGetter == -3);
+    assert(Foo._privateStaticGetter == -4);
+
+    // Class setters.
+    foo.publicSetter = 42;
+    foo._privateSetter = 42;
+    Foo.publicStaticSetter = 42;
+    Foo._privateStaticSetter = 42;
+
+    // Extension methods.
+    assert(foo.publicPublicExtensionMethod() == 20);
+    assert(foo._publicPrivateExtensionMethod() == 21);
+    assert(PublicExtension.publicPublicStaticExtensionMethod() == 22);
+    assert(PublicExtension._publicPrivateStaticExtensionMethod() == 23);
+    assert(foo.privatePublicExtensionMethod() == 30);
+    assert(foo._privatePrivateExtensionMethod() == 31);
+    assert(_PrivateExtension.privatePublicStaticExtensionMethod() == 32);
+    assert(_PrivateExtension._privatePrivateStaticExtensionMethod() == 33);
+
+    // Extension fields.
+    assert(PublicExtension.publicPublicStaticExtensionField == 24);
+    PublicExtension.publicPublicStaticExtensionField = -24;
+    assert(PublicExtension.publicPublicStaticExtensionField == -24);
+    assert(PublicExtension._publicPrivateStaticExtensionField == 25);
+    PublicExtension._publicPrivateStaticExtensionField = -25;
+    assert(PublicExtension._publicPrivateStaticExtensionField == -25);
+    assert(_PrivateExtension.privatePublicStaticExtensionField == 34);
+    _PrivateExtension.privatePublicStaticExtensionField = -34;
+    assert(_PrivateExtension.privatePublicStaticExtensionField == -34);
+    assert(_PrivateExtension._privatePrivateStaticExtensionField == 35);
+    _PrivateExtension._privatePrivateStaticExtensionField = -35;
+    assert(_PrivateExtension._privatePrivateStaticExtensionField == -35);
+
+    // Extension getters.
+    assert(foo.publicPublicExtensionGetter == 26);
+    assert(foo._publicPrivateExtensionGetter == 27);
+    assert(PublicExtension.publicPublicStaticExtensionGetter == 28);
+    assert(PublicExtension._publicPrivateStaticExtensionGetter == 29);
+    assert(foo.privatePublicExtensionGetter == 36);
+    assert(foo._privatePrivateExtensionGetter == 37);
+    assert(_PrivateExtension.privatePublicStaticExtensionGetter == 38);
+    assert(_PrivateExtension._privatePrivateStaticExtensionGetter == 39);
+
+    // Extension setters.
+    foo.publicPublicExtensionSetter = 42;
+    foo._publicPrivateExtensionSetter = 42;
+    PublicExtension.publicPublicStaticExtensionSetter = 42;
+    PublicExtension._publicPrivateStaticExtensionSetter = 42;
+    foo.privatePublicExtensionSetter = 42;
+    foo._privatePrivateExtensionSetter = 42;
+    _PrivateExtension.privatePublicStaticExtensionSetter = 42;
+    _PrivateExtension._privatePrivateStaticExtensionSetter = 42;
+
+    // Top-level methods.
+    assert(publicTopLevelMethod() == 50);
+    assert(_privateTopLevelMethod() == 51);
+
+    // Top-level fields.
+    assert(publicTopLevelField == 52);
+    publicTopLevelField = -52;
+    assert(publicTopLevelField == -52);
+    assert(_privateTopLevelField == 53);
+    _privateTopLevelField = -53;
+    assert(_privateTopLevelField == -53);
+
+    // Top-level getters.
+    assert(publicTopLevelGetter == 54);
+    assert(_privateTopLevelGetter == 55);
+
+    // Top-level setters.
+    publicTopLevelSetter = 42;
+    _privateTopLevelSetter = 42;
+  }
 expression: |
   () {
     // Class constructors.
diff --git a/pkg/front_end/testcases/expression/regress_34224.expression.yaml b/pkg/front_end/testcases/expression/regress_34224.expression.yaml
index a399aaf..e9be2ab 100644
--- a/pkg/front_end/testcases/expression/regress_34224.expression.yaml
+++ b/pkg/front_end/testcases/expression/regress_34224.expression.yaml
@@ -2,8 +2,8 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  main() {}
 position: "dart:core#Object"
 expression: |
   toString()
\ No newline at end of file
diff --git a/pkg/front_end/testcases/expression/set_literal.expression.yaml b/pkg/front_end/testcases/expression/set_literal.expression.yaml
index 7354c65..c4d1229 100644
--- a/pkg/front_end/testcases/expression/set_literal.expression.yaml
+++ b/pkg/front_end/testcases/expression/set_literal.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  main() {}
 expression: |
   {"a"}
diff --git a/pkg/front_end/testcases/expression/spread_element.expression.yaml b/pkg/front_end/testcases/expression/spread_element.expression.yaml
index 3583851..d2bb995 100644
--- a/pkg/front_end/testcases/expression/spread_element.expression.yaml
+++ b/pkg/front_end/testcases/expression/spread_element.expression.yaml
@@ -2,8 +2,7 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart"
+sources: |
+  List<String> listOfStrings = ["hello"];
 expression: |
   [...listOfStrings]
diff --git a/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect b/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect
index caefbcc..fce8f75 100644
--- a/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/spread_element.expression.yaml.expect
@@ -2,5 +2,5 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
   return block {
-    final dart.core::List<dart.core::String> #t1 = dart.core::List::of<dart.core::String>(main::listOfStrings);
+    final dart.core::List<dart.core::String> #t1 = dart.core::List::of<dart.core::String>(#lib1::listOfStrings);
   } =>#t1;
diff --git a/pkg/front_end/testcases/expression/super_private_get.expression.yaml b/pkg/front_end/testcases/expression/super_private_get.expression.yaml
index a4b1c4e..4e19488 100644
--- a/pkg/front_end/testcases/expression/super_private_get.expression.yaml
+++ b/pkg/front_end/testcases/expression/super_private_get.expression.yaml
@@ -2,8 +2,13 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#B"
+sources: |
+  class A {
+    final int? _priv = 0;
+  }
+  class B extends A {
+    int? _priv;
+  }
+position: "#B"
 expression: |
   super._priv
diff --git a/pkg/front_end/testcases/expression/super_private_get.expression.yaml.expect b/pkg/front_end/testcases/expression/super_private_get.expression.yaml.expect
index 20ec891..fedb500 100644
--- a/pkg/front_end/testcases/expression/super_private_get.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/super_private_get.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return super.{main::A::_priv};
+  return super.{#lib1::A::_priv};
diff --git a/pkg/front_end/testcases/expression/super_private_method.expression.yaml b/pkg/front_end/testcases/expression/super_private_method.expression.yaml
index 53a1429..2de3f1b 100644
--- a/pkg/front_end/testcases/expression/super_private_method.expression.yaml
+++ b/pkg/front_end/testcases/expression/super_private_method.expression.yaml
@@ -2,8 +2,14 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#B"
+sources: |
+  class A {
+    void _privMethod() {}
+  }
+
+  class B extends A {
+    void _privMethod() {}
+  }
+position: "#B"
 expression: |
   super._privMethod
diff --git a/pkg/front_end/testcases/expression/super_private_method.expression.yaml.expect b/pkg/front_end/testcases/expression/super_private_method.expression.yaml.expect
index 39cb950..09e5b13 100644
--- a/pkg/front_end/testcases/expression/super_private_method.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/super_private_method.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return super.{main::A::_privMethod};
+  return super.{#lib1::A::_privMethod};
diff --git a/pkg/front_end/testcases/expression/super_private_set.expression.yaml b/pkg/front_end/testcases/expression/super_private_set.expression.yaml
index f52f8c3..59b9c36 100644
--- a/pkg/front_end/testcases/expression/super_private_set.expression.yaml
+++ b/pkg/front_end/testcases/expression/super_private_set.expression.yaml
@@ -2,8 +2,14 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
-position: "main.dart#C"
+sources: |
+  class A {
+    int? _priv = 0;
+  }
+  class B extends A {
+    int? _priv;
+  }
+
+position: "#B"
 expression: |
   super._priv = 0
diff --git a/pkg/front_end/testcases/expression/super_private_set.expression.yaml.expect b/pkg/front_end/testcases/expression/super_private_set.expression.yaml.expect
index 8e9d782..0e518c3 100644
--- a/pkg/front_end/testcases/expression/super_private_set.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/super_private_set.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return super.{main::HasPrivate::_priv} = 0;
+  return super.{#lib1::A::_priv} = 0;
diff --git a/pkg/front_end/testcases/expression/type_closure_evaluation.expression.yaml b/pkg/front_end/testcases/expression/type_closure_evaluation.expression.yaml
index 5565212..59c45ef 100644
--- a/pkg/front_end/testcases/expression/type_closure_evaluation.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_closure_evaluation.expression.yaml
@@ -2,14 +2,22 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  void hasClosure() {
+    List<String> x() {
+      return ["hello"];
+    }
+
+    int xCombinedLength = x()
+        .fold<int>(0, (previousValue, element) => previousValue + element.length);
+    print("xCombinedLength = $xCombinedLength");
+  }
 definitions: ["x"]
 # _Closure --- note that this is not what the VM sends (anymore).
 definition_types: ["dart:core", "_Closure", "1", "0"]
 type_definitions: []
 type_bounds: []
 type_defaults: []
-position: "main.dart"
 method: "hasClosure"
 expression: |
   x().fold<int>(0, (previousValue, element) => previousValue + element.length)
diff --git a/pkg/front_end/testcases/expression/type_closure_evaluation_2.expression.yaml b/pkg/front_end/testcases/expression/type_closure_evaluation_2.expression.yaml
index f441fdd..6914b5f 100644
--- a/pkg/front_end/testcases/expression/type_closure_evaluation_2.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_closure_evaluation_2.expression.yaml
@@ -2,14 +2,22 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  void hasClosure() {
+    List<String> x() {
+      return ["hello"];
+    }
+
+    int xCombinedLength = x()
+        .fold<int>(0, (previousValue, element) => previousValue + element.length);
+    print("xCombinedLength = $xCombinedLength");
+  }
 definitions: ["x"]
 # _Closure is send as null aka dynamic.
 definition_types: ["null"]
 type_definitions: []
 type_bounds: []
 type_defaults: []
-position: "main.dart"
 method: "hasClosure"
 expression: |
   x().fold<int>(0, (previousValue, element) => previousValue + element.length)
diff --git a/pkg/front_end/testcases/expression/type_definition_bound_1.expression.yaml b/pkg/front_end/testcases/expression/type_definition_bound_1.expression.yaml
index c8bbfc0..a4e2207 100644
--- a/pkg/front_end/testcases/expression/type_definition_bound_1.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_definition_bound_1.expression.yaml
@@ -2,7 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  void withBound<E extends String>(List<E> x) {
+    List<E> y = [];
+    List<String> z = [];
+    z.addAll(y);
+  }
 definitions: ["x"]
 # List<String>
 definition_types: ["dart:core", "List", "1", "1", "dart:core", "String", "1", "0"]
@@ -11,7 +16,6 @@
 type_bounds: ["dart:core", "String", "1", "0"]
 # String
 type_defaults: ["dart:core", "String", "1", "0"]
-position: "main.dart"
 method: "withBound"
 # Can add List<E> to List<String> as E extends String.
 expression: |
diff --git a/pkg/front_end/testcases/expression/type_definition_bound_2.expression.yaml b/pkg/front_end/testcases/expression/type_definition_bound_2.expression.yaml
index ca8e903..69da8f7 100644
--- a/pkg/front_end/testcases/expression/type_definition_bound_2.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_definition_bound_2.expression.yaml
@@ -2,7 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  void withBound<E extends String>(List<E> x) {
+    List<E> y = [];
+    List<String> z = [];
+    z.addAll(y);
+  }
 definitions: ["x"]
 # List<String>
 definition_types: ["dart:core", "List", "1", "1", "dart:core", "String", "1", "0"]
@@ -11,7 +16,6 @@
 type_bounds: ["dart:core", "String", "1", "0"]
 # String
 type_defaults: ["dart:core", "String", "1", "0"]
-position: "main.dart"
 method: "withBound"
 # Can't add List<String> to List<E> :(
 expression: |
diff --git a/pkg/front_end/testcases/expression/type_definition_bound_3.expression.yaml b/pkg/front_end/testcases/expression/type_definition_bound_3.expression.yaml
index 80d4f5b..192d3cd 100644
--- a/pkg/front_end/testcases/expression/type_definition_bound_3.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_definition_bound_3.expression.yaml
@@ -2,15 +2,16 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  void withBound2<E>() {
+    print(E);
+  }
 definition_types: []
 type_definitions: ["E"]
 # Object?
 type_bounds: ["dart:core", "Object", "0", "0"]
 # null (because dynamic).
 type_defaults: ["null"]
-position: "main.dart"
 method: "withBound2"
 expression: |
   print(E)
diff --git a/pkg/front_end/testcases/expression/type_param_bound.expression.yaml b/pkg/front_end/testcases/expression/type_param_bound.expression.yaml
index e2d74e1..2029414 100644
--- a/pkg/front_end/testcases/expression/type_param_bound.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_bound.expression.yaml
@@ -2,9 +2,9 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  class Bound {}
+  void hasBound<T extends Bound>() {}
 type_definitions: ["T"]
-position: "main.dart"
 expression: |
   hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect
index 888d75f..5071613 100644
--- a/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect
@@ -1,9 +1,9 @@
 Errors: {
   org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
-   - 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
+   - 'Bound' is from 'org-dartlang-testcase:///main.dart'.
   Try changing type arguments so that they conform to the bounds.
   hasBound<T>()
   ^
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
-  return main::hasBound<#lib1::debugExpr::T%>();
+  return #lib1::hasBound<#lib2::debugExpr::T%>();
diff --git a/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml
index b584ef2..c8c4cbe 100644
--- a/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml
@@ -2,9 +2,17 @@
 # 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.
 
+sources:
+  main.dart: |
+    class Bound {}
+    void hasBound<T extends Bound>() {}
+    main() {}
+  main_2.dart: |
+    import 'main.dart' as m;
+    main() {
+      m.main();
+    }
 entry_point: "main_2.dart"
-import: "main.dart"
-definitions: []
 type_definitions: ["T"]
 position: "main.dart"
 expression: |
diff --git a/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect
index 888d75f..5071613 100644
--- a/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect
@@ -1,9 +1,9 @@
 Errors: {
   org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
-   - 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
+   - 'Bound' is from 'org-dartlang-testcase:///main.dart'.
   Try changing type arguments so that they conform to the bounds.
   hasBound<T>()
   ^
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
-  return main::hasBound<#lib1::debugExpr::T%>();
+  return #lib1::hasBound<#lib2::debugExpr::T%>();
diff --git a/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml b/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml
index 1cc3d38..c1caac5 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml
@@ -2,9 +2,10 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
 definitions: ["x"]
 type_definitions: ["T"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   x is T
diff --git a/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml.expect
index be5007c..370052a 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_shadow.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>(dynamic x) → dynamic
-  return x is{ForNonNullableByDefault} main::A::debugExpr::T%;
+  return x is{ForNonNullableByDefault} #lib1::A::debugExpr::T%;
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml b/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml
index f18d8d3..b2660c4 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml
@@ -2,9 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
+  T id<T>(T x) => x;
 definitions: ["x"]
 type_definitions: ["T"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   id<T>(x)
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml.expect
index a5a9f41..bd76619 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_shadow_arg.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>(dynamic x) → dynamic
-  return main::id<main::A::debugExpr::T%>(x as{TypeError,ForDynamic,ForNonNullableByDefault} main::A::debugExpr::T%);
+  return #lib1::id<#lib1::A::debugExpr::T%>(x as{TypeError,ForDynamic,ForNonNullableByDefault} #lib1::A::debugExpr::T%);
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml b/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml
index 4078116..96e9302 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml
@@ -2,10 +2,12 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  class A<T> {
+    const A();
+  }
 type_definitions: ["T"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   () {
     T k = new A();
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml.expect
index 58142c0..dfc7f67 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_shadow_arg_ctor_inferred.expression.yaml.expect
@@ -1,10 +1,10 @@
 Errors: {
   org-dartlang-debug:synthetic_debug_expression:2:13: Error: A value of type 'A<dynamic>' can't be assigned to a variable of type 'T'.
-   - 'A' is from 'pkg/front_end/testcases/expression/main.dart'.
+   - 'A' is from 'org-dartlang-testcase:///main.dart'.
     T k = new A();
               ^
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
   return () → Null {
-    main::A::debugExpr::T% k = invalid-expression "org-dartlang-debug:synthetic_debug_expression:2:13: Error: A value of type 'A<dynamic>' can't be assigned to a variable of type 'T'.\n - 'A' is from 'pkg/front_end/testcases/expression/main.dart'.\n  T k = new A();\n            ^" in new main::A::•<dynamic>() as{TypeError,ForNonNullableByDefault} Never;
+    #lib1::A::debugExpr::T% k = invalid-expression "org-dartlang-debug:synthetic_debug_expression:2:13: Error: A value of type 'A<dynamic>' can't be assigned to a variable of type 'T'.\n - 'A' is from 'org-dartlang-testcase:///main.dart'.\n  T k = new A();\n            ^" in new #lib1::A::•<dynamic>() as{TypeError,ForNonNullableByDefault} Never;
   };
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml b/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml
index 92a1ef1..5856281 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml
@@ -2,10 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  class A<T> {}
+  T id<T>(T x) => x;
 type_definitions: ["T"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   () {
     T? k = null;
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml.expect
index fae9dbf..b4a7d36 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_shadow_arg_inferred.expression.yaml.expect
@@ -2,6 +2,6 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
   return () → Null {
-    main::A::debugExpr::T? k = null;
-    k = main::id<main::A::debugExpr::T?>(k);
+    #lib1::A::debugExpr::T? k = null;
+    k = #lib1::id<#lib1::A::debugExpr::T?>(k);
   };
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml b/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml
index bcc4445..86a8a6f 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml
@@ -2,9 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
-definitions: []
+sources: |
+  class A<T> {
+    const A();
+  }
 type_definitions: ["T"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   new A<T>()
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml.expect
index 6fae9ff..736160b 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_shadow_ctor.expression.yaml.expect
@@ -1,4 +1,4 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
-  return new main::A::•<main::A::debugExpr::T%>();
+  return new #lib1::A::•<#lib1::A::debugExpr::T%>();
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml b/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml
index 69e8ede..63fd21b 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml
+++ b/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml
@@ -2,10 +2,11 @@
 # 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.
 
-entry_point: "main.dart"
+sources: |
+  class A<T> {}
 definitions: ["x"]
 type_definitions: ["T"]
-position: "main.dart#A"
+position: "#A"
 expression: |
   () {
     T? x = null;
diff --git a/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml.expect
index 4f51517..2b35841 100644
--- a/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_shadow_var.expression.yaml.expect
@@ -2,5 +2,5 @@
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>(dynamic x) → dynamic
   return () → Null {
-    main::A::debugExpr::T? x = null;
+    #lib1::A::debugExpr::T? x = null;
   };
diff --git a/pkg/vm_service/CHANGELOG.md b/pkg/vm_service/CHANGELOG.md
index a5a8f8b..56c3736 100644
--- a/pkg/vm_service/CHANGELOG.md
+++ b/pkg/vm_service/CHANGELOG.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## 8.2.2
+- Updated the following optional fields to be nullable in `SocketStatistic`:
+  - `endTime`
+  - `lastReadTime`
+  - `lastWriteTime`
+
 ## 8.2.1
 - Changed type of `UriList.uris` from `dynamic` to `List<String?>?`.
 - Remove `example/vm_service_asserts.dart'
diff --git a/pkg/vm_service/lib/src/dart_io_extensions.dart b/pkg/vm_service/lib/src/dart_io_extensions.dart
index 9e9faaf..8760a4d 100644
--- a/pkg/vm_service/lib/src/dart_io_extensions.dart
+++ b/pkg/vm_service/lib/src/dart_io_extensions.dart
@@ -212,13 +212,15 @@
 
   /// The time, in microseconds, that this socket was closed.
   @optional
-  final int endTime;
+  final int? endTime;
 
   /// The time, in microseconds, that this socket was last read from.
-  final int lastReadTime;
+  @optional
+  final int? lastReadTime;
 
   /// The time, in microseconds, that this socket was last written to.
-  final int lastWriteTime;
+  @optional
+  final int? lastWriteTime;
 
   /// The address of the socket.
   final String address;
diff --git a/pkg/vm_service/pubspec.yaml b/pkg/vm_service/pubspec.yaml
index 19d91ff..1f9fc98 100644
--- a/pkg/vm_service/pubspec.yaml
+++ b/pkg/vm_service/pubspec.yaml
@@ -3,7 +3,7 @@
   A library to communicate with a service implementing the Dart VM
   service protocol.
 
-version: 8.2.1
+version: 8.2.2
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service
 
diff --git a/tools/VERSION b/tools/VERSION
index 780cc26..7ab2763 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 17
 PATCH 0
-PRERELEASE 217
+PRERELEASE 218
 PRERELEASE_PATCH 0
\ No newline at end of file