Skip to content

Commit c37d419

Browse files
author
Daniel Chevalier
authored
Fix for listening to custom streams in DWDS. (#2011)
1 parent c007560 commit c37d419

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

dwds/lib/src/services/chrome_proxy_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ ${globalLoadStrategy.loadModuleSnippet}("dart_sdk").developer.invokeExtension(
707707
default:
708708
throw RPCError(
709709
'streamListen',
710-
RPCError.kMethodNotFound,
710+
RPCError.kInvalidParams,
711711
'The stream `$streamId` is not supported on web devices',
712712
);
713713
}

dwds/test/chrome_proxy_service_test.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,13 @@ void main() {
20192019
e.kind == EventKind.kVMUpdate && e.vm!.name == 'test')));
20202020
await service.setVMName('test');
20212021
});
2022+
2023+
test('custom stream', () {
2024+
expect(
2025+
() => service.streamListen('aCustomStreamId'),
2026+
throwsA(predicate(
2027+
(e) => (e is RPCError) && e.code == RPCError.kInvalidParams)));
2028+
});
20222029
});
20232030

20242031
test('Logging', () async {

0 commit comments

Comments
 (0)