Add a test target to the app_that_uses_foo/ example (#6687)
* Add a test target to the app_that_uses_foo/ example
* changelog
diff --git a/packages/devtools_extensions/CHANGELOG.md b/packages/devtools_extensions/CHANGELOG.md
index 08a3e28..e782808 100644
--- a/packages/devtools_extensions/CHANGELOG.md
+++ b/packages/devtools_extensions/CHANGELOG.md
@@ -1,4 +1,6 @@
## 0.0.10
+* Add a test target to the `app_that_uses_foo` example that can also be debugged
+with the DevTools extension provided by `package:foo`.
* Add an example of performing expression evaluations from a DevTools extension.
* Add an example of registering a service extension and calling it from a DevTools extension.
* Document the DevTools extension examples.
diff --git a/packages/devtools_extensions/example/app_that_uses_foo/test/app_that_uses_foo_test.dart b/packages/devtools_extensions/example/app_that_uses_foo/test/app_that_uses_foo_test.dart
new file mode 100644
index 0000000..0ac9053
--- /dev/null
+++ b/packages/devtools_extensions/example/app_that_uses_foo/test/app_that_uses_foo_test.dart
@@ -0,0 +1,25 @@
+// Copyright 2023 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'package:app_that_uses_foo/main.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:foo/foo.dart';
+
+// This test can be run to verify that the `package:foo` DevTools extension
+// loads properly when debugging a test target with DevTools.
+//
+// To test this, run the following command and copy the VM service URI to
+// connect to DevTools:
+//
+// flutter run test/app_that_uses_foo_test.dart --start-paused
+
+void main() {
+ testWidgets('Builds $MyAppThatUsesFoo', (tester) async {
+ await tester.pumpWidget(const MyAppThatUsesFoo());
+ await tester.pumpAndSettle();
+
+ expect(find.byType(MyAppThatUsesFoo), findsOneWidget);
+ expect(find.byType(FooWidget), findsOneWidget);
+ });
+}