Allow providing max_cache_entry flag to Dart (#31881)

diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc
index 34c4596..42fd64b 100644
--- a/shell/common/shell_unittests.cc
+++ b/shell/common/shell_unittests.cc
@@ -535,6 +535,7 @@
 #if !FLUTTER_RELEASE
   flags.push_back("--max_profile_depth 1");
   flags.push_back("--random_seed 42");
+  flags.push_back("--max_subtype_cache_entries=22");
   if (!DartVM::IsRunningPrecompiledCode()) {
     flags.push_back("--enable_mirrors");
   }
diff --git a/shell/common/switches.cc b/shell/common/switches.cc
index 5ce829f..8efcf55 100644
--- a/shell/common/switches.cc
+++ b/shell/common/switches.cc
@@ -68,6 +68,7 @@
     "--strict_null_safety_checks",
     "--enable-display-list",
     "--no-enable-display-list",
+    "--max_subtype_cache_entries",
 };
 // clang-format on