}
etRunner::get().freeWinInfoList(list);
}
+
+TEST_F(etTestFocus, focus_touch_basic)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ res = initTC(EINA_TRUE, EINA_TRUE);
+ ASSERT_TRUE(res);
+
+ // touch red win
+ res = registerTCWin(tw_red);
+ EXPECT_TRUE(res);
+ etRunner::get().generateMouseDown(50, 50);
+ etRunner::get().generateMouseUp(50, 50);
+ etRunner::get().waitEvent(E_TC_EVENT_TYPE_FOCUS_CHANGED);
+
+ // Expected focus res:
+ // [Top] Blue -> Green -> Red[focused] [Bottom]
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->native_win == tw_red->native_win)
+ ASSERT_TRUE(tw->Focus.obj);
+ else
+ ASSERT_FALSE(tw->Focus.obj);
+ }
+ etRunner::get().freeWinInfoList(list);
+}
TEST_F(etTestFocus, focus_fullsize_basic)
{
etWin *tw = NULL;