@@ -382,7 +382,7 @@ mod tests {
382382 response. payload . value
383383 } ;
384384
385- // Default mock supports the feature: [Ok 0x00][V1 0x00][supported=1].
385+ // Default mock supports the feature: [V1 0x00][Ok 0x00][supported=1].
386386 assert_eq ! ( dispatch( MockPlatform :: new( ) ) , vec![ 0x00 , 0x00 , 0x01 ] ) ;
387387 // A configured "unsupported" answer flows through the same dispatcher.
388388 let unsupported = MockPlatform :: with_config ( MockConfig {
@@ -441,15 +441,15 @@ mod tests {
441441 key : "k" . into ( ) ,
442442 value : vec ! [ 1 , 2 , 3 ] ,
443443 } ) ;
444- // Ok 0x00, V1 0x00.
444+ // V1 0x00, Ok 0x00.
445445 assert_eq ! (
446446 run_request( & core, "local_storage_write" , write. encode( ) ) ,
447447 vec![ 0x00 , 0x00 ]
448448 ) ;
449449
450450 let read =
451451 HostLocalStorageReadRequest :: V1 ( v01:: HostLocalStorageReadRequest { key : "k" . into ( ) } ) ;
452- // Ok 0x00, V1 0x00, Some 0x01, compact-len(3) 0x0c, bytes.
452+ // V1 0x00, Ok 0x00, Some 0x01, compact-len(3) 0x0c, bytes.
453453 assert_eq ! (
454454 run_request( & core, "local_storage_read" , read. encode( ) ) ,
455455 vec![ 0x00 , 0x00 , 0x01 , 0x0c , 1 , 2 , 3 ]
@@ -462,7 +462,7 @@ mod tests {
462462 vec![ 0x00 , 0x00 ]
463463 ) ;
464464
465- // After clear the read misses: Ok 0x00, V1 0x00, None 0x00.
465+ // After clear the read misses: V1 0x00, Ok 0x00, None 0x00.
466466 let read_again =
467467 HostLocalStorageReadRequest :: V1 ( v01:: HostLocalStorageReadRequest { key : "k" . into ( ) } ) ;
468468 assert_eq ! (
@@ -483,7 +483,7 @@ mod tests {
483483 let request =
484484 || HostDevicePermissionRequest :: V1 ( v01:: HostDevicePermissionRequest :: Camera ) . encode ( ) ;
485485
486- // AllowAll (default): Ok 0x00, V1 0x00, granted=1.
486+ // AllowAll (default): V1 0x00, Ok 0x00, granted=1.
487487 let allow = make_mock_core ( MockConfig :: default ( ) ) ;
488488 assert_eq ! (
489489 run_request( & allow, "permissions_request_device_permission" , request( ) ) ,
@@ -501,9 +501,10 @@ mod tests {
501501 ) ;
502502 }
503503
504- /// Preimage submit flows through the core's confirm gate to the platform:
505- /// the default mock auto-confirms (Ok envelope), and a `confirm = false`
506- /// mock is rejected by the core before reaching the platform (Err envelope).
504+ /// Preimage submit flows through the core's confirm gate: the default mock
505+ /// auto-confirms (Ok envelope), and a `confirm = false` mock is rejected by
506+ /// the core after the confirmation prompt but before the preimage backend
507+ /// (`PreimageHost::submit_preimage`) is reached (Err envelope).
507508 #[ test]
508509 fn from_mock_platform_preimage_submit_through_core ( ) {
509510 use truapi:: versioned:: preimage:: RemotePreimageSubmitRequest ;
@@ -523,8 +524,8 @@ mod tests {
523524 assert_eq ! ( ok_payload. first( ) , Some ( & 0x00 ) ) ;
524525 assert_eq ! ( ok_payload. get( 1 ) , Some ( & 0x00 ) ) ;
525526
526- // confirm_user_actions = false: the core rejects before the platform
527- // (V1 index 0x00, Err 0x01).
527+ // confirm_user_actions = false: the core rejects after the confirmation
528+ // prompt, before the preimage backend (V1 index 0x00, Err 0x01).
528529 let rejected = make_mock_core ( MockConfig {
529530 confirm_user_actions : false ,
530531 ..Default :: default ( )
0 commit comments