收口H5原生状态结果归一化门禁

H5 HostBridge 测试覆盖原生配色异常值归一化

原生壳门禁反查配色和网络状态结果归一化
This commit is contained in:
2026-06-20 04:37:10 +08:00
parent de77f59387
commit 082e056b18
2 changed files with 58 additions and 0 deletions
+21
View File
@@ -1164,6 +1164,27 @@ function assertH5HostBridgePayloadBoundaries() {
'H5 HostBridge facade must normalize haptics.impact payloads with the shared style boundary',
);
}
if (
!h5HostBridgeSource.includes(
'colorScheme: normalizeHostBridgeColorScheme(result?.colorScheme),',
)
) {
throw new Error(
'H5 HostBridge facade must normalize appearance.getColorScheme results with the shared color scheme boundary',
);
}
if (
!h5HostBridgeSource.includes(
'const connectionType = normalizeHostBridgeConnectionType(\n payload?.connectionType ?? payload?.nativeType,\n );',
) ||
!h5HostBridgeSource.includes(
'listener(normalizeHostNetworkStatus(payload));',
)
) {
throw new Error(
'H5 HostBridge facade must normalize network.status results and network.statusChanged events with shared network boundaries',
);
}
if (
!h5HostBridgeSource.includes(
'const normalizedTitle = normalizeHostBridgeAppTitle(title);',