Version 3.6.0-107.0.dev

Merge 639cc322f1244387c36f6d1c658649c78f57969b into dev
diff --git a/DEPS b/DEPS
index cda0c1f..2b4b357 100644
--- a/DEPS
+++ b/DEPS
@@ -102,7 +102,7 @@
   "boringssl_rev": "2db0eb3f96a5756298dcd7f9319e56a98585bd10",
   "browser-compat-data_tag": "ac8cae697014da1ff7124fba33b0b4245cc6cd1b", # v1.0.22
   "cpu_features_rev": "936b9ab5515dead115606559502e3864958f7f6e",
-  "devtools_rev": "e77d6ce142b7bc737af3652f5727e449e84b7b03",
+  "devtools_rev": "14084d20946268f2d22c5ed55bd53e0176748368",
   "icu_rev": "43953f57b037778a1b8005564afabe214834f7bd",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "libcxx_rev": "44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0",
@@ -182,7 +182,7 @@
   "sync_http_rev": "ab8377eba79baff3d77e8c75d502efc2b85a9342",
   "tar_rev": "32ceb55e673141abff4e84b99483fe5eb881c291",
   "term_glyph_rev": "38a158f55006cf30942c928171ea601ee5e0308f",
-  "test_rev": "d0dc83372a65dffe164242213639a40d5bb7a9bb",
+  "test_rev": "9fbbfdbee18a686e3f84a386a01960ea0543ba01",
   "test_descriptor_rev": "90743bc16bc00526a1b9a64f813614be9b2479d9",
   "test_process_rev": "6223572ca16d7585d5f08d9281de6a5734e45150",
   "test_reflective_loader_rev": "6e648863b39aab8d0204e769d25805eea9db0ac4",
@@ -207,7 +207,7 @@
   # meant to be downloaded by users for local testing. You can self-service
   # update these by following the go/dart-engprod/browsers.md instructions.
   "download_chrome": False,
-  "chrome_tag": "127.0.6533.43",
+  "chrome_tag": "128.0.6613.5",
   "download_firefox": False,
   "firefox_tag": "128.0",
 
diff --git a/pkg/analyzer/lib/src/summary2/library_builder.dart b/pkg/analyzer/lib/src/summary2/library_builder.dart
index 8f85326..3977c91 100644
--- a/pkg/analyzer/lib/src/summary2/library_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/library_builder.dart
@@ -216,7 +216,8 @@
   void buildElements() {
     _buildDirectives(
       kind: kind,
-      container: element,
+      containerLibrary: element,
+      containerUnit: element.definingCompilationUnit,
     );
 
     for (var linkingUnit in units) {
@@ -614,7 +615,8 @@
 
     _buildDirectives(
       kind: importedAugmentation,
-      container: augmentation,
+      containerLibrary: augmentation,
+      containerUnit: unitElement,
     );
 
     MacroElementsMerger(
@@ -965,77 +967,80 @@
     required OperationPerformanceImpl performance,
   }) {
     DirectiveUri uri;
-    if (state is AugmentationImportWithFile) {
-      var importedAugmentation = state.importedAugmentation;
-      if (importedAugmentation != null) {
-        var importedFile = importedAugmentation.file;
+    switch (state) {
+      case AugmentationImportWithFile():
+        var importedAugmentation = state.importedAugmentation;
+        if (importedAugmentation != null) {
+          var importedFile = importedAugmentation.file;
 
-        var parsedResult = importedFile.getParsed(
-          performance: performance,
-        );
-        var unitNode = parsedResult.unit;
+          var parsedResult = importedFile.getParsed(
+            performance: performance,
+          );
+          var unitNode = parsedResult.unit;
 
-        var unitElement = CompilationUnitElementImpl(
-          library: element,
-          source: importedFile.source,
-          lineInfo: unitNode.lineInfo,
-        );
-        unitNode.declaredElement = unitElement;
-        unitElement.setCodeRange(0, unitNode.length);
+          var unitElement = CompilationUnitElementImpl(
+            library: element,
+            source: importedFile.source,
+            lineInfo: unitNode.lineInfo,
+          );
+          unitNode.declaredElement = unitElement;
+          unitElement.setCodeRange(0, unitNode.length);
 
-        var unitReference =
-            reference.getChild('@fragment').getChild(importedFile.uriStr);
-        _bindReference(unitReference, unitElement);
+          var unitReference =
+              reference.getChild('@fragment').getChild(importedFile.uriStr);
+          _bindReference(unitReference, unitElement);
 
-        var augmentation = LibraryAugmentationElementImpl(
-          augmentationTarget: augmentationTarget,
-          nameOffset: importedAugmentation.unlinked.augmentKeywordOffset,
-        );
-        augmentation.definingCompilationUnit = unitElement;
-        augmentation.reference =
-            reference.getChild('@augmentation').getChild(importedFile.uriStr);
+          var augmentation = LibraryAugmentationElementImpl(
+            augmentationTarget: augmentationTarget,
+            nameOffset: importedAugmentation.unlinked.augmentKeywordOffset,
+          );
+          augmentation.definingCompilationUnit = unitElement;
+          augmentation.reference =
+              reference.getChild('@augmentation').getChild(importedFile.uriStr);
 
-        units.add(
-          LinkingUnit(
-            reference: unitReference,
-            node: unitNode,
-            element: unitElement,
-            container: augmentation,
-          ),
-        );
+          units.add(
+            LinkingUnit(
+              reference: unitReference,
+              node: unitNode,
+              element: unitElement,
+              container: augmentation,
+            ),
+          );
 
-        _buildDirectives(
-          kind: importedAugmentation,
-          container: augmentation,
-        );
+          _buildDirectives(
+            kind: importedAugmentation,
+            containerLibrary: augmentation,
+            containerUnit: unitElement,
+          );
 
-        uri = DirectiveUriWithAugmentationImpl(
-          relativeUriString: state.uri.relativeUriStr,
-          relativeUri: state.uri.relativeUri,
-          source: importedFile.source,
-          augmentation: augmentation,
-        );
-      } else {
-        uri = DirectiveUriWithSourceImpl(
-          relativeUriString: state.uri.relativeUriStr,
-          relativeUri: state.uri.relativeUri,
-          source: state.importedFile.source,
-        );
-      }
-    } else {
-      var selectedUri = state.uri;
-      if (selectedUri is file_state.DirectiveUriWithUri) {
-        uri = DirectiveUriWithRelativeUriImpl(
-          relativeUriString: selectedUri.relativeUriStr,
-          relativeUri: selectedUri.relativeUri,
-        );
-      } else if (selectedUri is file_state.DirectiveUriWithString) {
-        uri = DirectiveUriWithRelativeUriStringImpl(
-          relativeUriString: selectedUri.relativeUriStr,
-        );
-      } else {
-        uri = DirectiveUriImpl();
-      }
+          uri = DirectiveUriWithAugmentationImpl(
+            relativeUriString: state.uri.relativeUriStr,
+            relativeUri: state.uri.relativeUri,
+            source: importedFile.source,
+            augmentation: augmentation,
+          );
+        } else {
+          uri = DirectiveUriWithSourceImpl(
+            relativeUriString: state.uri.relativeUriStr,
+            relativeUri: state.uri.relativeUri,
+            source: state.importedFile.source,
+          );
+        }
+      default:
+        var selectedUri = state.uri;
+        switch (selectedUri) {
+          case file_state.DirectiveUriWithUri():
+            uri = DirectiveUriWithRelativeUriImpl(
+              relativeUriString: selectedUri.relativeUriStr,
+              relativeUri: selectedUri.relativeUri,
+            );
+          case file_state.DirectiveUriWithString():
+            uri = DirectiveUriWithRelativeUriStringImpl(
+              relativeUriString: selectedUri.relativeUriStr,
+            );
+          default:
+            uri = DirectiveUriImpl();
+        }
     }
 
     return AugmentationImportElementImpl(
@@ -1065,30 +1070,42 @@
   /// Builds directive elements, for the library and recursively for its
   /// augmentations.
   void _buildDirectives({
-    required LibraryOrAugmentationFileKind kind,
-    required LibraryOrAugmentationElementImpl container,
+    required FileKind kind,
+    required LibraryOrAugmentationElementImpl containerLibrary,
+    required CompilationUnitElementImpl containerUnit,
   }) {
-    var definingUnit = container.definingCompilationUnit;
-
-    definingUnit.libraryExports = kind.libraryExports.map((state) {
+    containerUnit.libraryExports = kind.libraryExports.map((state) {
       return _buildLibraryExport(state);
     }).toFixedList();
 
-    definingUnit.libraryImports = kind.libraryImports.map((state) {
+    containerUnit.libraryImports = kind.libraryImports.map((state) {
       return _buildLibraryImport(
-        containerLibrary: container,
-        containerUnit: definingUnit,
+        containerLibrary: containerLibrary,
+        containerUnit: containerUnit,
         state: state,
       );
     }).toFixedList();
 
-    container.augmentationImports = kind.augmentationImports.map((state) {
-      return _buildAugmentationImport(
-        container,
-        state,
-        performance: OperationPerformanceImpl('<root>'),
-      );
-    }).toFixedList();
+    if (containerLibrary.definingCompilationUnit == containerUnit) {
+      containerLibrary.augmentationImports =
+          kind.augmentationImports.map((state) {
+        return _buildAugmentationImport(
+          containerLibrary,
+          state,
+          performance: OperationPerformanceImpl('<root>'),
+        );
+      }).toFixedList();
+    }
+
+    if (containerLibrary is LibraryElementImpl) {
+      containerLibrary.parts = kind.partIncludes.map((partState) {
+        return _buildPartInclude(
+          containerLibrary: containerLibrary,
+          containerUnit: containerUnit,
+          state: partState,
+        );
+      }).toFixedList();
+    }
   }
 
   LibraryExportElementImpl _buildLibraryExport(LibraryExportState state) {
@@ -1097,59 +1114,61 @@
     );
 
     DirectiveUri uri;
-    if (state is LibraryExportWithFile) {
-      var exportedLibraryKind = state.exportedLibrary;
-      if (exportedLibraryKind != null) {
-        var exportedFile = exportedLibraryKind.file;
-        var exportedUri = exportedFile.uri;
-        var elementFactory = linker.elementFactory;
-        var exportedLibrary = elementFactory.libraryOfUri2(exportedUri);
-        uri = DirectiveUriWithLibraryImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: exportedLibrary.source,
-          library: exportedLibrary,
-        );
-      } else {
-        uri = DirectiveUriWithSourceImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: state.exportedSource,
-        );
-      }
-    } else if (state is LibraryExportWithInSummarySource) {
-      var exportedLibrarySource = state.exportedLibrarySource;
-      if (exportedLibrarySource != null) {
-        var exportedUri = exportedLibrarySource.uri;
-        var elementFactory = linker.elementFactory;
-        var exportedLibrary = elementFactory.libraryOfUri2(exportedUri);
-        uri = DirectiveUriWithLibraryImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: exportedLibrary.source,
-          library: exportedLibrary,
-        );
-      } else {
-        uri = DirectiveUriWithSourceImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: state.exportedSource,
-        );
-      }
-    } else {
-      var selectedUri = state.selectedUri;
-      if (selectedUri is file_state.DirectiveUriWithUri) {
-        uri = DirectiveUriWithRelativeUriImpl(
-          relativeUriString: selectedUri.relativeUriStr,
-          relativeUri: selectedUri.relativeUri,
-        );
-      } else if (selectedUri is file_state.DirectiveUriWithString) {
-        uri = DirectiveUriWithRelativeUriStringImpl(
-          relativeUriString: selectedUri.relativeUriStr,
-        );
-      } else {
-        uri = DirectiveUriImpl();
-      }
+    switch (state) {
+      case LibraryExportWithFile():
+        var exportedLibraryKind = state.exportedLibrary;
+        if (exportedLibraryKind != null) {
+          var exportedFile = exportedLibraryKind.file;
+          var exportedUri = exportedFile.uri;
+          var elementFactory = linker.elementFactory;
+          var exportedLibrary = elementFactory.libraryOfUri2(exportedUri);
+          uri = DirectiveUriWithLibraryImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: exportedLibrary.source,
+            library: exportedLibrary,
+          );
+        } else {
+          uri = DirectiveUriWithSourceImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: state.exportedSource,
+          );
+        }
+      case LibraryExportWithInSummarySource():
+        var exportedLibrarySource = state.exportedLibrarySource;
+        if (exportedLibrarySource != null) {
+          var exportedUri = exportedLibrarySource.uri;
+          var elementFactory = linker.elementFactory;
+          var exportedLibrary = elementFactory.libraryOfUri2(exportedUri);
+          uri = DirectiveUriWithLibraryImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: exportedLibrary.source,
+            library: exportedLibrary,
+          );
+        } else {
+          uri = DirectiveUriWithSourceImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: state.exportedSource,
+          );
+        }
+      default:
+        var selectedUri = state.selectedUri;
+        switch (selectedUri) {
+          case file_state.DirectiveUriWithUri():
+            uri = DirectiveUriWithRelativeUriImpl(
+              relativeUriString: selectedUri.relativeUriStr,
+              relativeUri: selectedUri.relativeUri,
+            );
+          case file_state.DirectiveUriWithString():
+            uri = DirectiveUriWithRelativeUriStringImpl(
+              relativeUriString: selectedUri.relativeUriStr,
+            );
+          default:
+            uri = DirectiveUriImpl();
+        }
     }
 
     return LibraryExportElementImpl(
@@ -1187,59 +1206,61 @@
     );
 
     DirectiveUri uri;
-    if (state is LibraryImportWithFile) {
-      var importedLibraryKind = state.importedLibrary;
-      if (importedLibraryKind != null) {
-        var importedFile = importedLibraryKind.file;
-        var importedUri = importedFile.uri;
-        var elementFactory = linker.elementFactory;
-        var importedLibrary = elementFactory.libraryOfUri2(importedUri);
-        uri = DirectiveUriWithLibraryImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: importedLibrary.source,
-          library: importedLibrary,
-        );
-      } else {
-        uri = DirectiveUriWithSourceImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: state.importedSource,
-        );
-      }
-    } else if (state is LibraryImportWithInSummarySource) {
-      var importedLibrarySource = state.importedLibrarySource;
-      if (importedLibrarySource != null) {
-        var importedUri = importedLibrarySource.uri;
-        var elementFactory = linker.elementFactory;
-        var importedLibrary = elementFactory.libraryOfUri2(importedUri);
-        uri = DirectiveUriWithLibraryImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: importedLibrary.source,
-          library: importedLibrary,
-        );
-      } else {
-        uri = DirectiveUriWithSourceImpl(
-          relativeUriString: state.selectedUri.relativeUriStr,
-          relativeUri: state.selectedUri.relativeUri,
-          source: state.importedSource,
-        );
-      }
-    } else {
-      var selectedUri = state.selectedUri;
-      if (selectedUri is file_state.DirectiveUriWithUri) {
-        uri = DirectiveUriWithRelativeUriImpl(
-          relativeUriString: selectedUri.relativeUriStr,
-          relativeUri: selectedUri.relativeUri,
-        );
-      } else if (selectedUri is file_state.DirectiveUriWithString) {
-        uri = DirectiveUriWithRelativeUriStringImpl(
-          relativeUriString: selectedUri.relativeUriStr,
-        );
-      } else {
-        uri = DirectiveUriImpl();
-      }
+    switch (state) {
+      case LibraryImportWithFile():
+        var importedLibraryKind = state.importedLibrary;
+        if (importedLibraryKind != null) {
+          var importedFile = importedLibraryKind.file;
+          var importedUri = importedFile.uri;
+          var elementFactory = linker.elementFactory;
+          var importedLibrary = elementFactory.libraryOfUri2(importedUri);
+          uri = DirectiveUriWithLibraryImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: importedLibrary.source,
+            library: importedLibrary,
+          );
+        } else {
+          uri = DirectiveUriWithSourceImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: state.importedSource,
+          );
+        }
+      case LibraryImportWithInSummarySource():
+        var importedLibrarySource = state.importedLibrarySource;
+        if (importedLibrarySource != null) {
+          var importedUri = importedLibrarySource.uri;
+          var elementFactory = linker.elementFactory;
+          var importedLibrary = elementFactory.libraryOfUri2(importedUri);
+          uri = DirectiveUriWithLibraryImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: importedLibrary.source,
+            library: importedLibrary,
+          );
+        } else {
+          uri = DirectiveUriWithSourceImpl(
+            relativeUriString: state.selectedUri.relativeUriStr,
+            relativeUri: state.selectedUri.relativeUri,
+            source: state.importedSource,
+          );
+        }
+      default:
+        var selectedUri = state.selectedUri;
+        switch (selectedUri) {
+          case file_state.DirectiveUriWithUri():
+            uri = DirectiveUriWithRelativeUriImpl(
+              relativeUriString: selectedUri.relativeUriStr,
+              relativeUri: selectedUri.relativeUri,
+            );
+          case file_state.DirectiveUriWithString():
+            uri = DirectiveUriWithRelativeUriStringImpl(
+              relativeUriString: selectedUri.relativeUriStr,
+            );
+          default:
+            uri = DirectiveUriImpl();
+        }
     }
 
     return LibraryImportElementImpl(
@@ -1274,6 +1295,89 @@
     }
   }
 
+  PartElementImpl _buildPartInclude({
+    required LibraryElementImpl containerLibrary,
+    required CompilationUnitElementImpl containerUnit,
+    required file_state.PartIncludeState state,
+  }) {
+    DirectiveUri directiveUri;
+    switch (state) {
+      case PartIncludeWithFile():
+        var includedPart = state.includedPart;
+        if (includedPart != null) {
+          var partFile = includedPart.file;
+          var partUnitNode = partFile.parse(
+            performance: OperationPerformanceImpl('<root>'),
+          );
+          var unitElement = CompilationUnitElementImpl(
+            library: containerLibrary,
+            source: partFile.source,
+            lineInfo: partUnitNode.lineInfo,
+          );
+          partUnitNode.declaredElement = unitElement;
+          unitElement.isSynthetic = !partFile.exists;
+          unitElement.uri = partFile.uriStr;
+          unitElement.setCodeRange(0, partUnitNode.length);
+
+          var unitReference =
+              reference.getChild('@fragment').getChild(partFile.uriStr);
+          _bindReference(unitReference, unitElement);
+
+          units.add(
+            LinkingUnit(
+              reference: unitReference,
+              node: partUnitNode,
+              container: containerLibrary,
+              element: unitElement,
+            ),
+          );
+
+          _buildDirectives(
+            kind: includedPart,
+            containerLibrary: element,
+            containerUnit: unitElement,
+          );
+
+          directiveUri = DirectiveUriWithUnitImpl(
+            relativeUriString: state.uri.relativeUriStr,
+            relativeUri: state.uri.relativeUri,
+            unit: unitElement,
+          );
+        } else {
+          directiveUri = DirectiveUriWithSourceImpl(
+            relativeUriString: state.uri.relativeUriStr,
+            relativeUri: state.uri.relativeUri,
+            source: state.includedFile.source,
+          );
+        }
+      default:
+        var uriState = state.uri;
+        switch (uriState) {
+          case file_state.DirectiveUriWithSource():
+            directiveUri = DirectiveUriWithSourceImpl(
+              relativeUriString: uriState.relativeUriStr,
+              relativeUri: uriState.relativeUri,
+              source: uriState.source,
+            );
+          case file_state.DirectiveUriWithUri():
+            directiveUri = DirectiveUriWithRelativeUriImpl(
+              relativeUriString: uriState.relativeUriStr,
+              relativeUri: uriState.relativeUri,
+            );
+          case file_state.DirectiveUriWithString():
+            directiveUri = DirectiveUriWithRelativeUriStringImpl(
+              relativeUriString: uriState.relativeUriStr,
+            );
+          default:
+            directiveUri = DirectiveUriImpl();
+        }
+    }
+
+    return PartElementImpl(
+      uri: directiveUri,
+    );
+  }
+
   /// These elements are implicitly declared in `dart:core`.
   void _declareDartCoreDynamicNever() {
     if (reference.name == 'dart:core') {
@@ -1362,75 +1466,6 @@
       libraryElement.definingCompilationUnit = unitElement;
     }
 
-    libraryElement.parts = inputLibrary.partIncludes.map((partState) {
-      var uriState = partState.uri;
-      DirectiveUri directiveUri;
-      if (partState is PartIncludeWithFile) {
-        var includedPart = partState.includedPart;
-        if (includedPart != null) {
-          var partFile = includedPart.file;
-          var partUnitNode = partFile.parse(
-            performance: OperationPerformanceImpl('<root>'),
-          );
-          var unitElement = CompilationUnitElementImpl(
-            library: libraryElement,
-            source: partFile.source,
-            lineInfo: partUnitNode.lineInfo,
-          );
-          partUnitNode.declaredElement = unitElement;
-          unitElement.isSynthetic = !partFile.exists;
-          unitElement.uri = partFile.uriStr;
-          unitElement.setCodeRange(0, partUnitNode.length);
-
-          var unitReference = unitContainerRef.getChild(partFile.uriStr);
-          _bindReference(unitReference, unitElement);
-
-          linkingUnits.add(
-            LinkingUnit(
-              reference: unitReference,
-              node: partUnitNode,
-              container: libraryElement,
-              element: unitElement,
-            ),
-          );
-
-          directiveUri = DirectiveUriWithUnitImpl(
-            relativeUriString: partState.uri.relativeUriStr,
-            relativeUri: partState.uri.relativeUri,
-            unit: unitElement,
-          );
-        } else {
-          directiveUri = DirectiveUriWithSourceImpl(
-            relativeUriString: partState.uri.relativeUriStr,
-            relativeUri: partState.uri.relativeUri,
-            source: partState.includedFile.source,
-          );
-        }
-      } else if (uriState is file_state.DirectiveUriWithSource) {
-        directiveUri = DirectiveUriWithSourceImpl(
-          relativeUriString: uriState.relativeUriStr,
-          relativeUri: uriState.relativeUri,
-          source: uriState.source,
-        );
-      } else if (uriState is file_state.DirectiveUriWithUri) {
-        directiveUri = DirectiveUriWithRelativeUriImpl(
-          relativeUriString: uriState.relativeUriStr,
-          relativeUri: uriState.relativeUri,
-        );
-      } else if (uriState is file_state.DirectiveUriWithString) {
-        directiveUri = DirectiveUriWithRelativeUriStringImpl(
-          relativeUriString: uriState.relativeUriStr,
-        );
-      } else {
-        directiveUri = DirectiveUriImpl();
-      }
-      return directiveUri;
-    }).map((directiveUri) {
-      return PartElementImpl(
-        uri: directiveUri,
-      );
-    }).toFixedList();
-
     var builder = LibraryBuilder._(
       linker: linker,
       kind: inputLibrary,
diff --git a/pkg/analyzer/test/src/summary/elements_test.dart b/pkg/analyzer/test/src/summary/elements_test.dart
index bca5029..3762f0d 100644
--- a/pkg/analyzer/test/src/summary/elements_test.dart
+++ b/pkg/analyzer/test/src/summary/elements_test.dart
@@ -46884,6 +46884,117 @@
     expect(prefixNames, unorderedEquals(['p1', 'p2']));
   }
 
+  test_libraryExports_part() async {
+    newFile('$testPackageLibPath/a.dart', r'''
+part of 'test.dart';
+export 'dart:math';
+''');
+
+    var library = await buildLibrary(r'''
+export 'dart:io';
+part 'a.dart';
+''');
+
+    checkElementText(library, r'''
+library
+  reference: <testLibrary>
+  libraryExports
+    dart:io
+      enclosingElement: <testLibrary>
+      enclosingElement3: <testLibraryFragment>
+  definingUnit
+    reference: <testLibraryFragment>
+    enclosingElement: <testLibrary>
+    libraryExports
+      dart:io
+        enclosingElement: <testLibrary>
+        enclosingElement3: <testLibraryFragment>
+  parts
+    package:test/a.dart
+      reference: <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>
+      enclosingElement3: <testLibraryFragment>
+      libraryExports
+        dart:math
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+''');
+  }
+
+  test_libraryImports_part() async {
+    newFile('$testPackageLibPath/a.dart', r'''
+part of 'test.dart';
+import 'dart:math';
+''');
+
+    var library = await buildLibrary(r'''
+import 'dart:io';
+part 'a.dart';
+''');
+
+    checkElementText(library, r'''
+library
+  reference: <testLibrary>
+  libraryImports
+    dart:io
+      enclosingElement: <testLibrary>
+      enclosingElement3: <testLibraryFragment>
+  definingUnit
+    reference: <testLibraryFragment>
+    enclosingElement: <testLibrary>
+    libraryImports
+      dart:io
+        enclosingElement: <testLibrary>
+        enclosingElement3: <testLibraryFragment>
+  parts
+    package:test/a.dart
+      reference: <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        dart:math
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+''');
+  }
+
+  test_libraryImports_part_metadata() async {
+    newFile('$testPackageLibPath/a.dart', r'''
+part of 'test.dart';
+@deprecated
+import 'dart:math';
+''');
+
+    var library = await buildLibrary(r'''
+part 'a.dart';
+''');
+
+    checkElementText(library, r'''
+library
+  reference: <testLibrary>
+  definingUnit
+    reference: <testLibraryFragment>
+    enclosingElement: <testLibrary>
+  parts
+    package:test/a.dart
+      reference: <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        dart:math
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+          metadata
+            Annotation
+              atSign: @ @21
+              name: SimpleIdentifier
+                token: deprecated @22
+                staticElement: dart:core::<fragment>::@getter::deprecated
+                staticType: null
+              element: dart:core::<fragment>::@getter::deprecated
+''');
+  }
+
   test_localFunctions() async {
     var library = await buildLibrary(r'''
 f() {
diff --git a/pkg/dartdev/lib/src/sdk.dart b/pkg/dartdev/lib/src/sdk.dart
index 89ac5a1..168294b 100644
--- a/pkg/dartdev/lib/src/sdk.dart
+++ b/pkg/dartdev/lib/src/sdk.dart
@@ -30,15 +30,25 @@
   // Assume that we want to use the same Dart executable that we used to spawn
   // DartDev. We should be able to run programs with out/ReleaseX64/dart even
   // if the SDK isn't completely built.
-  String get dart => path.absolute(
-        _runFromBuildRoot
-            ? sdkPath
-            : path.absolute(
-                sdkPath,
-                'bin',
-              ),
-        path.basename(Platform.executable),
-      );
+  String get dart {
+    var basename = path.basename(Platform.executable);
+    // It's possible that Platform.executable won't include the .exe extension
+    // on Windows (e.g., launching `dart` from cmd.exe where `dart` is on the
+    // PATH). Append .exe in this case so the `checkArtifactExists` check won't
+    // fail.
+    if (Platform.isWindows && !basename.endsWith('.exe')) {
+      basename += '.exe';
+    }
+    return path.absolute(
+      _runFromBuildRoot
+          ? sdkPath
+          : path.absolute(
+              sdkPath,
+              'bin',
+            ),
+      basename,
+    );
+  }
 
   String get dartAotRuntime => _runFromBuildRoot
       ? path.absolute(
diff --git a/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart b/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart
index 8ac3986..73b5ed7 100644
--- a/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart
+++ b/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart
@@ -45,32 +45,23 @@
           await driver.checkInFrame(
               breakpointId: 'bp',
               expression: 'myAssert()',
-              // TODO(sigmund): Since Chrome 125, Chrome broke how errors are
-              // printed. The fix landed in Chrome 128. When that version gets
-              // rolled, this expectation can be updated back to:
-              //  expectedError: allOf(
-              //      contains('Error: Assertion failed:'),
-              //      contains('test.dart:8:16'),
-              //      contains('false'),
-              //      contains('is not true'),
-              //    ));
-              expectedError: startsWith('Error\n'));
+              expectedError: allOf(
+                contains('Error: Assertion failed:'),
+                contains('test.dart:8:16'),
+                contains('false'),
+                contains('is not true'),
+              ));
         });
-
         test('assert errors in evaluated expression', () async {
           await driver.checkInFrame(
               breakpointId: 'bp',
               expression: '() { assert(false); return 0; } ()',
-              // TODO(sigmund): Since Chrome 125, Chrome broke how errors are
-              // printed. The fix landed in Chrome 128. When that version gets
-              // rolled, this expectation can be updated back to:
-              //  expectedError: allOf(
-              //    contains('Error: Assertion failed:'),
-              //    contains('org-dartlang-debug:synthetic_debug_expression:1:13'),
-              //    contains('false'),
-              //    contains('is not true'),
-              //  ));
-              expectedError: startsWith('Error\n'));
+              expectedError: allOf(
+                contains('Error: Assertion failed:'),
+                contains('org-dartlang-debug:synthetic_debug_expression:1:13'),
+                contains('false'),
+                contains('is not true'),
+              ));
         });
       });
     }
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart
index dc295d8..65308cb 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart
@@ -822,12 +822,8 @@
           await driver.checkInFrame(
               breakpointId: 'lateGlobalVariableBP',
               expression: 'lateGlobal2',
-              // TODO(sigmund): Since Chrome 125, Chrome broke how errors are
-              // printed. The fix landed in Chrome 128. When that version gets
-              // rolled, this expectation can be updated back to:
-              //expectedError: 'Error: LateInitializationError: '
-              //    "Field 'lateGlobal2' has not been initialized.");
-              expectedError: startsWith('Error\n'));
+              expectedError: 'Error: LateInitializationError: '
+                  "Field 'lateGlobal2' has not been initialized.");
         });
       });
     });
diff --git a/tools/VERSION b/tools/VERSION
index 6f7908c..e247a58 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 3
 MINOR 6
 PATCH 0
-PRERELEASE 106
+PRERELEASE 107
 PRERELEASE_PATCH 0