Open the lineedit and add a few characters, to check that things look right.
At present when the user moves to a new menu item, the menu code handles this immediately. This means it is not possible to use an expo action to effect the same change. Update this so that EXPOACT_POINT_ITEM is handled in cedit_do_action(). Expand the test to cover this. Signed-off-by: Simon Glass <s...@chromium.org> --- Changes in v2: - Add new patch to test editing a lineedit test/boot/cedit.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/test/boot/cedit.c b/test/boot/cedit.c index 97ca63b3082..0c34d4b3df0 100644 --- a/test/boot/cedit.c +++ b/test/boot/cedit.c @@ -302,19 +302,40 @@ static int cedit_render(struct unit_test_state *uts) ut_assertok(expo_render(exp)); ut_asserteq(4986, video_compress_fb(uts, dev, false)); + act.type = EXPOACT_OPEN; + act.select.id = ID_POWER_LOSS; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5393, video_compress_fb(uts, dev, false)); + + act.type = EXPOACT_POINT_ITEM; + act.select.id = ID_AC_ON; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(5365, video_compress_fb(uts, dev, false)); + + /* select it */ + act.type = EXPOACT_SELECT; + act.select.id = ID_AC_ON; + ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); + ut_assertok(expo_render(exp)); + ut_asserteq(4980, video_compress_fb(uts, dev, false)); + + ut_asserteq(ID_AC_ON, menu->cur_item_id); + /* move to the line-edit field */ act.type = EXPOACT_POINT_OBJ; act.select.id = ID_MACHINE_NAME; ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); ut_assertok(expo_render(exp)); - ut_asserteq(4872, video_compress_fb(uts, dev, false)); + ut_asserteq(4862, video_compress_fb(uts, dev, false)); /* open it */ act.type = EXPOACT_OPEN; act.select.id = ID_MACHINE_NAME; ut_assertok(cedit_do_action(exp, scn, vid_priv, &act)); ut_assertok(expo_render(exp)); - ut_asserteq(4841, video_compress_fb(uts, dev, false)); + ut_asserteq(4851, video_compress_fb(uts, dev, false)); /* * Send some keypresses. Note that the console must be enabled so that @@ -330,7 +351,7 @@ static int cedit_render(struct unit_test_state *uts) ut_silence_console(uts); ut_assertok(cedit_arange(exp, vid_priv, scn->id)); ut_assertok(expo_render(exp)); - ut_asserteq(5009, video_compress_fb(uts, dev, false)); + ut_asserteq(4996, video_compress_fb(uts, dev, false)); expo_destroy(exp); cur_exp = NULL; -- 2.43.0