mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update test to validate Debugger domain persistence (#43446)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43446 ## Context We are migrating to the new Hermes `CDPAgent` and `CDPDebugAPI` APIs in the modern CDP server (previously `HermesCDPHandler`). ## This diff Following D54712525, add a test case that validates `"Debugger.enable"` is persisted between reloads. This has been actioned by creating a further test group, `ModernHermesVariants`, and scoping the existing `ResolveBreakpointAfterReload` to this, with the removed second `"Debugger.enable"` message. Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D54808212 fbshipit-source-id: 0775beb85a0907cca4dccbc77ec461d9515ab078
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5d711f83b5
commit
4f10f3069f
@@ -179,6 +179,8 @@ using AllHermesVariants = Types<
|
||||
JsiIntegrationTestHermesEngineAdapter,
|
||||
JsiIntegrationTestHermesWithCDPAgentEngineAdapter>;
|
||||
|
||||
using ModernHermesVariants =
|
||||
Types<JsiIntegrationTestHermesWithCDPAgentEngineAdapter>;
|
||||
using LegacyHermesVariants = Types<JsiIntegrationTestHermesEngineAdapter>;
|
||||
|
||||
TYPED_TEST_SUITE(JsiIntegrationPortableTest, AllEngines);
|
||||
@@ -192,7 +194,12 @@ using JsiIntegrationHermesLegacyTest =
|
||||
JsiIntegrationPortableTest<EngineAdapter>;
|
||||
TYPED_TEST_SUITE(JsiIntegrationHermesLegacyTest, LegacyHermesVariants);
|
||||
|
||||
#pragma region JsiIntegrationPortableTest
|
||||
template <typename EngineAdapter>
|
||||
using JsiIntegrationHermesModernTest =
|
||||
JsiIntegrationPortableTest<EngineAdapter>;
|
||||
TYPED_TEST_SUITE(JsiIntegrationHermesModernTest, ModernHermesVariants);
|
||||
|
||||
#pragma region AllEngines
|
||||
|
||||
TYPED_TEST(JsiIntegrationPortableTest, ConnectWithoutCrashing) {
|
||||
this->connect();
|
||||
@@ -472,8 +479,8 @@ TYPED_TEST(JsiIntegrationPortableTest, ExceptionDuringAddBindingIsIgnored) {
|
||||
EXPECT_TRUE(this->eval("globalThis.foo === 42").getBool());
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region JsiIntegrationHermesTest
|
||||
#pragma endregion // AllEngines
|
||||
#pragma region AllHermesVariants
|
||||
|
||||
TYPED_TEST(JsiIntegrationHermesTest, EvaluateExpression) {
|
||||
this->connect();
|
||||
@@ -559,7 +566,10 @@ TYPED_TEST(JsiIntegrationHermesTest, EvaluateExpressionInExecutionContext) {
|
||||
std::to_string(executionContextId)));
|
||||
}
|
||||
|
||||
TYPED_TEST(JsiIntegrationHermesTest, ResolveBreakpointAfterReload) {
|
||||
#pragma endregion // AllHermesVariants
|
||||
#pragma region ModernHermesVariants
|
||||
|
||||
TYPED_TEST(JsiIntegrationHermesModernTest, ResolveBreakpointAfterReload) {
|
||||
this->connect();
|
||||
|
||||
InSequence s;
|
||||
@@ -610,6 +620,6 @@ TYPED_TEST(JsiIntegrationHermesTest, ResolveBreakpointAfterReload) {
|
||||
scriptInfo->value()["params"]["scriptId"]);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma endregion // ModernHermesVariants
|
||||
|
||||
} // namespace facebook::react::jsinspector_modern
|
||||
|
||||
Reference in New Issue
Block a user