diff options
| author | Simon Glass <[email protected]> | 2025-05-02 08:46:24 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-30 09:49:32 +0100 |
| commit | 9f44b544e1d8b23dec51567c657e81488a289d6d (patch) | |
| tree | 6d8232cd634cc5a8b8c8b28543a6085f8eec6517 /test/boot | |
| parent | c43791c4871a0635594b1f08c57a54c4a533c710 (diff) | |
expo: Provide access to the current menu item
Add functions to allow a caller to find out the current menu item and to
select a different one.
Update the event handling so that an attempt to change the current item
(e.g. by pressing the up-arrow key) is reported to the caller, since
this may be used to cancel an autoboot timeout.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/boot')
| -rw-r--r-- | test/boot/expo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c index 1d283a2ac95..616071ead48 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -588,6 +588,8 @@ static int expo_render_image(struct unit_test_state *uts) expo_set_scene_id(exp, SCENE1); ut_assertok(expo_render(exp)); + ut_asserteq(0, scn->highlight_id); + /* move down */ ut_assertok(expo_send_key(exp, BKEY_DOWN)); @@ -595,6 +597,8 @@ static int expo_render_image(struct unit_test_state *uts) ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM2, act.select.id); + ut_assertok(scene_menu_select_item(scn, OBJ_MENU, act.select.id)); + ut_asserteq(ITEM2, scene_menu_get_cur_item(scn, OBJ_MENU)); ut_assertok(expo_render(exp)); /* make sure only the preview for the second item is shown */ |
