etRunner::get().freeWinInfoList(list);
}
+TEST_F(etTestFocus, focus_activate1)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ res = initTC(EINA_TRUE, EINA_TRUE);
+ ASSERT_TRUE(res);
+
+ // Activate tw_red
+ res = registerTCWin(tw_red);
+ EXPECT_TRUE(res);
+ res = etRunner::get().setWinActivate(tw_red);
+ ASSERT_TRUE(res);
+ etRunner::get().waitEvent(E_TC_EVENT_TYPE_VIS_ON);
+
+ // Expected focus res:
+ // [Top] Red[focused] -> Blue -> Green [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_activate2)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ res = initTC(EINA_TRUE, EINA_TRUE);
+ ASSERT_TRUE(res);
+
+ // show Blocker
+ showTCWin(tw_blocker);
+
+ // Activate tw_red
+ res = registerTCWin(tw_red);
+ EXPECT_TRUE(res);
+ res = etRunner::get().setWinActivate(tw_red);
+ ASSERT_TRUE(res);
+ etRunner::get().waitEvent(E_TC_EVENT_TYPE_VIS_ON);
+
+ // Expected focus res:
+ // [Top] Red[focused] -> Blocker -> Blue -> Green [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;
}
etRunner::get().freeWinInfoList(list);
}
+
+TEST_F(etTestFocus, focus_fullsize_activate)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ res = initTC(EINA_TRUE, EINA_FALSE);
+ ASSERT_TRUE(res);
+
+ // Activate tw_red
+ res = registerTCWin(tw_red);
+ EXPECT_TRUE(res);
+ res = etRunner::get().setWinActivate(tw_red);
+ ASSERT_TRUE(res);
+ etRunner::get().waitEvent(E_TC_EVENT_TYPE_VIS_ON);
+
+ // Expected focus res:
+ // [Top] Red[focused] -> Blue -> Green [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);
+}