-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable JSI integration tests for Hermes CDPAgent (#43391)
Summary: Pull Request resolved: #43391 ## Context We are migrating to the new Hermes `CDPAgent` and `CDPDebugAPI` APIs in the modern CDP server (previously `HermesCDPHandler`). ## This diff Bootstraps `HermesRuntimeAgentDelegateNew` within `JsiIntegrationTest.cpp`. Test cases which currently do not pass with `HermesRuntimeAgentDelegateNew` are selectively matched against a new alias to exclude them: `JsiIntegrationHermesLegacyTest`. Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D53810357 fbshipit-source-id: 2d7d7446038530d19d93add71361b4bf581cff18
- Loading branch information
1 parent
c6ca7d6
commit a7fde7c
Showing
9 changed files
with
109 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...on/jsinspector-modern/tests/engines/JsiIntegrationTestHermesWithCDPAgentEngineAdapter.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#include "JsiIntegrationTestHermesWithCDPAgentEngineAdapter.h" | ||
|
||
namespace facebook::react::jsinspector_modern { | ||
|
||
JsiIntegrationTestHermesWithCDPAgentEngineAdapter:: | ||
JsiIntegrationTestHermesWithCDPAgentEngineAdapter( | ||
folly::Executor& jsExecutor) | ||
: JsiIntegrationTestHermesEngineAdapter(jsExecutor) {} | ||
|
||
/* static */ InspectorFlagOverrides | ||
JsiIntegrationTestHermesWithCDPAgentEngineAdapter:: | ||
getInspectorFlagOverrides() noexcept { | ||
return { | ||
.enableHermesCDPAgent = true, | ||
.enableModernCDPRegistry = true, | ||
}; | ||
} | ||
|
||
} // namespace facebook::react::jsinspector_modern |
28 changes: 28 additions & 0 deletions
28
...mmon/jsinspector-modern/tests/engines/JsiIntegrationTestHermesWithCDPAgentEngineAdapter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "../utils/InspectorFlagOverridesGuard.h" | ||
#include "JsiIntegrationTestHermesEngineAdapter.h" | ||
|
||
namespace facebook::react::jsinspector_modern { | ||
|
||
/** | ||
* An engine adapter for JsiIntegrationTest that uses Hermes (and Hermes's | ||
* new CDPAgent API). | ||
*/ | ||
class JsiIntegrationTestHermesWithCDPAgentEngineAdapter | ||
: public JsiIntegrationTestHermesEngineAdapter { | ||
public: | ||
explicit JsiIntegrationTestHermesWithCDPAgentEngineAdapter( | ||
folly::Executor& jsExecutor); | ||
|
||
static InspectorFlagOverrides getInspectorFlagOverrides() noexcept; | ||
}; | ||
|
||
} // namespace facebook::react::jsinspector_modern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters