@@ -238,6 +238,26 @@ void runTests({
238
238
expect (inspector.isDisplayableObject (ref), isTrue);
239
239
});
240
240
241
+ // Regression test for https://github.com/dart-lang/webdev/issues/2446.
242
+ test (
243
+ 'for a stream' ,
244
+ () async {
245
+ final remoteObject = await inspector.jsEvaluate (
246
+ libraryVariableExpression ('stream' , compilationMode),
247
+ );
248
+ final ref = await inspector.instanceRefFor (remoteObject);
249
+ expect (ref! .kind, InstanceKind .kPlainInstance);
250
+ final classRef = ref.classRef! ;
251
+ expect (classRef.name, '_ControllerStream<int>' );
252
+ expect (
253
+ classRef.id,
254
+ 'classes|dart:async|_ControllerStream<int>' ,
255
+ );
256
+ expect (inspector.isDisplayableObject (ref), isTrue);
257
+ },
258
+ skip: ! dartSdkIsAtLeast ('3.6.0-148.0.dev' ),
259
+ );
260
+
241
261
test ('for a Dart error' , () async {
242
262
final remoteObject = await inspector.jsEvaluate (newDartError);
243
263
final ref = await inspector.instanceRefFor (remoteObject);
@@ -379,6 +399,22 @@ void runTests({
379
399
expect (inspector.isDisplayableObject (instance), isTrue);
380
400
});
381
401
402
+ // Regression test for https://github.com/dart-lang/webdev/issues/2446.
403
+ test (
404
+ 'for a stream' ,
405
+ () async {
406
+ final remote = await inspector.jsEvaluate (
407
+ libraryVariableExpression ('stream' , compilationMode),
408
+ );
409
+ final instance = await inspector.instanceFor (remote);
410
+ expect (instance! .kind, InstanceKind .kPlainInstance);
411
+ final classRef = instance.classRef! ;
412
+ expect (classRef.name, '_ControllerStream<int>' );
413
+ expect (inspector.isDisplayableObject (instance), isTrue);
414
+ },
415
+ skip: ! dartSdkIsAtLeast ('3.6.0-148.0.dev' ),
416
+ );
417
+
382
418
test ('for a Dart error' , () async {
383
419
final remoteObject = await inspector.jsEvaluate (newDartError);
384
420
final instance = await inspector.instanceFor (remoteObject);
0 commit comments