Commit fc60030
Add basic test for NetworkReporter and CDP Network domain (#54049)
Summary:
Pull Request resolved: #54049
Changelog: [Internal]
Adds `JsiIntegrationTest`-based tests for the C++ layer responsible for handling the CDP `Network` domain. The tests use `NetworkReporter` to mimic the behaviour of a React Native platform that is generating network events.
NOTE: There are **significant problems** with the `NetworkReporter` / `NetworkHandler` singleton design: cross-Host and cross-Instance data pollution/corruption, inability to inspect multiple Hosts at once, inconsistency between the singleton's state and the CDP session's state, etc. The singletons similarly lack any kind of mechanism for test isolation (e.g. methods for clearing state between tests). As we iteratively fix these problems, the tests will require updating (and we'll be able to write stricter tests to cover the fixes).
Reviewed By: huntie
Differential Revision: D83746505
fbshipit-source-id: 7ee3c68e67f0d29587cbfafa98cf107d27065ffc1 parent c0e381d commit fc60030
File tree
6 files changed
+481
-13
lines changed- packages/react-native/ReactCommon/jsinspector-modern/tests
- engines
- utils
6 files changed
+481
-13
lines changedLines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 50 | + | |
| 51 | + | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
0 commit comments