summaryrefslogtreecommitdiff
path: root/test/boot/expo.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-05-02 08:46:50 -0600
committerSimon Glass <sjg@chromium.org>2025-05-30 09:49:32 +0100
commit0dc8c7740c8f5a7155259f0e55618f8006c0d7af (patch)
tree55113e06998142b60e31126d5e735154ed4a33ad /test/boot/expo.c
parent86acc21d854cbd881d1612c6b8528de0a577b91e (diff)
expo: Support highlighting menu items
Expo normally uses a pointer to show the current item. Add support for highlighting as well, since this makes it easier for the user to see the current item. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/boot/expo.c')
-rw-r--r--test/boot/expo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c
index e624a00c2c0..ddfb739f9cf 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -666,6 +666,13 @@ static int expo_render_image(struct unit_test_state *uts)
ut_assertok(scene_arrange(scn));
ut_asserteq(0, scn->highlight_id);
+ scene_set_highlight_id(scn, OBJ_MENU);
+ ut_assertok(scene_arrange(scn));
+ ut_asserteq(OBJ_MENU, scn->highlight_id);
+ ut_assertok(expo_render(exp));
+
+ ut_asserteq(19704, video_compress_fb(uts, dev, false));
+
/* move down */
ut_assertok(expo_send_key(exp, BKEY_DOWN));
@@ -719,6 +726,12 @@ static int expo_render_image(struct unit_test_state *uts)
/* make sure there was no console output */
ut_assert_console_end();
+ /* now try with the highlight */
+ exp->show_highlight = true;
+ ut_assertok(scene_arrange(scn));
+ ut_assertok(expo_render(exp));
+ ut_asserteq(18844, video_compress_fb(uts, dev, false));
+
/* now try in text mode */
expo_set_text_mode(exp, true);
ut_assertok(expo_render(exp));