mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
Promote fuseboxScreenshotCaptureEnabled to stable (#57540)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57540 This feature is fully implemented, stable, and isolated — enable for all. See also https://github.com/react/react-native-devtools-frontend/pull/252. Changelog: [General][Added] - **React Native DevTools**: Users and agents can now capture app screenshots via the `Page.captureScreenshot` command Reviewed By: GijsWeterings Differential Revision: D111894234 fbshipit-source-id: eaab5cb00c1a922961382dd64f616c7bf215032f
This commit is contained in:
committed by
meta-codesync[bot]
parent
47fad096a4
commit
00efc0a440
+2
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<a31073b853e102dfad7558805194f5a3>>
|
||||
* @generated SignedSource<<8a117541421f413e517e1be1acf8be7d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -141,7 +141,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun fuseboxNetworkInspectionEnabled(): Boolean = true
|
||||
|
||||
override fun fuseboxScreenshotCaptureEnabled(): Boolean = false
|
||||
override fun fuseboxScreenshotCaptureEnabled(): Boolean = true
|
||||
|
||||
override fun fuseboxWebSocketEventsEnabled(): Boolean = false
|
||||
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<af67163b6d34bb714b783658501ca6e8>>
|
||||
* @generated SignedSource<<41f83a9921de88f659ddc22172344226>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,8 +31,6 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android :
|
||||
|
||||
override fun fuseboxFrameRecordingEnabled(): Boolean = true
|
||||
|
||||
override fun fuseboxScreenshotCaptureEnabled(): Boolean = true
|
||||
|
||||
override fun preventShadowTreeCommitExhaustion(): Boolean = true
|
||||
|
||||
override fun useSharedAnimatedBackend(): Boolean = true
|
||||
|
||||
@@ -1632,11 +1632,15 @@ TEST_F(HostTargetTest, TracingDelegateIsNotifiedOnDirectTracingCall) {
|
||||
page_->stopTracing();
|
||||
}
|
||||
|
||||
TEST_F(HostTargetProtocolTest, CaptureScreenshotNotSupportedWhenFlagDisabled) {
|
||||
TEST_F(HostTargetProtocolTest, CaptureScreenshotReturnsData) {
|
||||
EXPECT_CALL(hostTargetDelegate_, captureScreenshot(_))
|
||||
.WillOnce(Return(std::optional<std::string>("c2NyZWVuc2hvdA==")))
|
||||
.RetiresOnSaturation();
|
||||
EXPECT_CALL(
|
||||
fromPage(),
|
||||
onMessage(JsonParsed(AllOf(
|
||||
AtJsonPtr("/error/code", Eq(-32601)), AtJsonPtr("/id", Eq(1))))))
|
||||
AtJsonPtr("/id", Eq(1)),
|
||||
AtJsonPtr("/result/data", Eq("c2NyZWVuc2hvdA=="))))))
|
||||
.RetiresOnSaturation();
|
||||
toPage_->sendMessage(R"({
|
||||
"id": 1,
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<2e19fd4b007d0ae7397babcc605b5783>>
|
||||
* @generated SignedSource<<96887197bdbba2c13e11046b73572e56>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -264,7 +264,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
}
|
||||
|
||||
bool fuseboxScreenshotCaptureEnabled() override {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fuseboxWebSocketEventsEnabled() override {
|
||||
|
||||
+1
-5
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<bcd31ae20312c38ff0bbc8fdeac5ce36>>
|
||||
* @generated SignedSource<<630f900c13eb68232717fc28528253e2>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -43,10 +43,6 @@ class ReactNativeFeatureFlagsOverridesOSSExperimental : public ReactNativeFeatur
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fuseboxScreenshotCaptureEnabled() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool preventShadowTreeCommitExhaustion() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ const definitions: FeatureFlagDefinitions = {
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
fuseboxScreenshotCaptureEnabled: {
|
||||
defaultValue: false,
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
dateAdded: '2026-04-01',
|
||||
description:
|
||||
@@ -688,7 +688,7 @@ const definitions: FeatureFlagDefinitions = {
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
ossReleaseStage: 'experimental',
|
||||
ossReleaseStage: 'stable',
|
||||
},
|
||||
fuseboxWebSocketEventsEnabled: {
|
||||
defaultValue: false,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<040d7a7365dfe19ee8721892e5e5551d>>
|
||||
* @generated SignedSource<<cfeef081e12018ec3cb6f9d76049ce5e>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -445,7 +445,7 @@ export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlag
|
||||
/**
|
||||
* Enable Page.captureScreenshot CDP method support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.
|
||||
*/
|
||||
export const fuseboxScreenshotCaptureEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxScreenshotCaptureEnabled', false);
|
||||
export const fuseboxScreenshotCaptureEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxScreenshotCaptureEnabled', true);
|
||||
/**
|
||||
* Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend. Requires `fuseboxNetworkInspectionEnabled`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user