tc->data->tw_red = e_tc_win_add(NULL, ELM_WIN_BASIC,
EINA_FALSE, "red",
- 0, 0, 400, 400, use_geom,
+ 0, 0, 720, 640, EINA_FALSE,
200, E_TC_WIN_COLOR_RED);
EINA_SAFETY_ON_NULL_GOTO(tc->data->tw_red, cleanup);
tc->data->tw_green = e_tc_win_add(NULL, ELM_WIN_BASIC,
EINA_FALSE, "green",
- 150, 150, 400, 400, use_geom,
+ 0, 0, 720, 640, EINA_FALSE,
200, E_TC_WIN_COLOR_GREEN);
EINA_SAFETY_ON_NULL_GOTO(tc->data->tw_green, cleanup);
tc->data->tw_blue = e_tc_win_add(NULL, ELM_WIN_BASIC,
EINA_FALSE, "blue",
- 20, 350, 400, 400, use_geom,
+ 0, 0, 720, 640, use_geom,
200, E_TC_WIN_COLOR_BLUE);
EINA_SAFETY_ON_NULL_GOTO(tc->data->tw_blue, cleanup);
return tc->passed;
}
+Eina_Bool
+tc_0604_focus_partial_basic(E_TC *tc)
+{
+ E_TC_Win *tw = NULL;
+ E_TC_Win *tw_red = NULL, *tw_green = NULL, *tw_blue = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(tc, EINA_FALSE);
+
+ res = _tc_focus_pre_run(tc, EINA_TRUE, EINA_TRUE);
+ EINA_SAFETY_ON_FALSE_GOTO(res, cleanup);
+
+ tw_red = tc->data->tw_red;
+ tw_green = tc->data->tw_green;
+ tw_blue = tc->data->tw_blue;
+
+ // Expected focus result:
+ // [Top] Blue[focused] -> Green -> Red [Bottom]
+ list = e_test_runner_req_win_info_list_get(tc->runner);
+ EINA_SAFETY_ON_NULL_GOTO(list, cleanup);
+
+ EINA_LIST_FOREACH(list, l, tw)
+ {
+ if (tw->native_win == tw_blue->native_win)
+ {
+ EINA_SAFETY_ON_FALSE_GOTO((tw->focus.obj == EINA_TRUE), cleanup);
+ }
+ else if (tw->native_win == tw_green->native_win)
+ {
+ EINA_SAFETY_ON_FALSE_GOTO((tw->focus.obj == EINA_FALSE), cleanup);
+ }
+ else if (tw->native_win == tw_red->native_win)
+ {
+ EINA_SAFETY_ON_FALSE_GOTO((tw->focus.obj == EINA_FALSE), cleanup);
+ }
+ }
+
+ tc->passed = EINA_TRUE;
+
+cleanup:
+ _tc_focus_post_run(tc);
+ _tc_focus_shutdown(tc);
+ E_FREE_LIST(list, e_tc_win_del);
+
+ return tc->passed;
+}