diff --git a/dwds/test/instances/common/instance_common.dart b/dwds/test/instances/common/instance_common.dart index f4186f2fa..c72e4b8c7 100644 --- a/dwds/test/instances/common/instance_common.dart +++ b/dwds/test/instances/common/instance_common.dart @@ -238,6 +238,26 @@ void runTests({ expect(inspector.isDisplayableObject(ref), isTrue); }); + // Regression test for https://github.com/dart-lang/webdev/issues/2446. + test( + 'for a stream', + () async { + final remoteObject = await inspector.jsEvaluate( + libraryVariableExpression('stream', compilationMode), + ); + final ref = await inspector.instanceRefFor(remoteObject); + expect(ref!.kind, InstanceKind.kPlainInstance); + final classRef = ref.classRef!; + expect(classRef.name, '_ControllerStream'); + expect( + classRef.id, + 'classes|dart:async|_ControllerStream', + ); + expect(inspector.isDisplayableObject(ref), isTrue); + }, + skip: !dartSdkIsAtLeast('3.6.0-148.0.dev'), + ); + test('for a Dart error', () async { final remoteObject = await inspector.jsEvaluate(newDartError); final ref = await inspector.instanceRefFor(remoteObject); @@ -379,6 +399,22 @@ void runTests({ expect(inspector.isDisplayableObject(instance), isTrue); }); + // Regression test for https://github.com/dart-lang/webdev/issues/2446. + test( + 'for a stream', + () async { + final remote = await inspector.jsEvaluate( + libraryVariableExpression('stream', compilationMode), + ); + final instance = await inspector.instanceFor(remote); + expect(instance!.kind, InstanceKind.kPlainInstance); + final classRef = instance.classRef!; + expect(classRef.name, '_ControllerStream'); + expect(inspector.isDisplayableObject(instance), isTrue); + }, + skip: !dartSdkIsAtLeast('3.6.0-148.0.dev'), + ); + test('for a Dart error', () async { final remoteObject = await inspector.jsEvaluate(newDartError); final instance = await inspector.instanceFor(remoteObject); diff --git a/fixtures/_testSound/example/scopes/main.dart b/fixtures/_testSound/example/scopes/main.dart index 899b043f2..50765f725 100644 --- a/fixtures/_testSound/example/scopes/main.dart +++ b/fixtures/_testSound/example/scopes/main.dart @@ -21,6 +21,8 @@ var identityMap = {}; var map = {}; +final stream = Stream.value(1); + void staticFunction(int formal) { print(formal); // Breakpoint: staticFunction }