锁定移动扫码失败响应

移动扫码失败统一返回稳定 host_error

移动扫码 overlay 不再向 H5 透出相机权限细节

移动壳测试和配置检查反查扫码失败边界
This commit is contained in:
2026-06-20 13:09:51 +08:00
parent 1f4d662054
commit c381f9a3eb
6 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -2286,8 +2286,7 @@ for (const snippet of [
'describe(\'QrScannerOverlay\'',
'scanQrCode()',
'requestCameraPermissionsAsync',
"message: 'camera permission denied'",
"message: 'camera permission unavailable'",
"message: 'qr scanner unavailable'",
"message: 'qr scan cancelled'",
"test('logs and rejects the active scan when camera permission request fails'",
"'mobile QR scanner permission request failed'",
@@ -2344,6 +2343,7 @@ for (const scannerSnippet of [
'ok(request, await scanQrCode())',
'normalizeHostBridgeQrCodeValue',
"hostBridgeError('cancelled', 'qr scan cancelled')",
"hostBridgeError('host_error', 'qr scanner unavailable')",
]) {
if (!scannerSource.includes(scannerSnippet)) {
throw new Error(`mobile shell QR scanner module missing ${scannerSnippet}`);
@@ -2357,7 +2357,7 @@ for (const scannerTestSnippet of [
'cancelQrCodeScan',
'failQrCodeScan',
'qr scanner already active',
'camera permission denied',
'qr scanner unavailable',
'qr scan cancelled',
'PZ-00000001',
]) {