etRunner::get().freeWinInfoList(list);
}
+TEST_F(etTestFocus, focus_fullsize_obscured_activate_check_event)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ // init TC window, show=true, geom=false
+ initTC(EINA_TRUE, EINA_FALSE);
+
+ // show blocker
+ res = etRunner::get().setWinNotiLevel(tw_blocker,
+ EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT);
+ EXPECT_TRUE(res);
+ showTCWin(tw_blocker);
+ etRunner::get().waitEvent(tw_blocker, E_TC_EVENT_TYPE_VIS_ON);
+
+ // set event checkpoint
+ etRunner::get().setEventCheckpoint();
+
+ // Activate tw_red
+ res = etRunner::get().setWinActivate(tw_red);
+ ASSERT_TRUE(res);
+ etRunner::get().waitEvent(tw_red, E_TC_EVENT_TYPE_STACK_ABOVE);
+
+ // Expected focus res:
+ // [Top] Blocker[focused] -> ... -> Red -> Blue -> Green [Bottom]
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->native_win == tw_blocker->native_win)
+ ASSERT_TRUE(tw->Focus.obj);
+ else
+ ASSERT_FALSE(tw->Focus.obj);
+ }
+ etRunner::get().freeWinInfoList(list);
+
+ // check event of tw_red
+ ASSERT_FALSE(etRunner::get().isEventOccuredAfterCheckpoint(tw_red, E_TC_EVENT_TYPE_FOCUS_CHANGED));
+}
+
TEST_F(etTestFocus, focus_fullsize_obscured_activate_destroy)
{
etWin *tw = NULL;
etRunner::get().freeWinInfoList(list);
}
+TEST_F(etTestFocus, focus_fullsize_show_activate_under_blocker)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ // init TC window, show=false, geom=false
+ initTC(EINA_FALSE, EINA_FALSE);
+
+ showTCWin(tw_blocker);
+ etRunner::get().setWinNotiLevel(tw_blocker,
+ EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT);
+ etRunner::get().waitEvent(tw_blocker, E_TC_EVENT_TYPE_VIS_ON);
+
+ // Activate tw_red
+ res = showActivateTCWin(tw_red);
+ ASSERT_TRUE(res);
+ etRunner::get().waitEvent(tw_red, E_TC_EVENT_TYPE_FOCUS_CHANGED);
+
+ // Expected focus res:
+ // [Top] Blocker[focused] -> ... -> Red [Bottom]
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->native_win == tw_blocker->native_win)
+ ASSERT_TRUE(tw->Focus.obj);
+ else
+ ASSERT_FALSE(tw->Focus.obj);
+ }
+ etRunner::get().freeWinInfoList(list);
+}
+
+TEST_F(etTestFocus, focus_fullsize_show_activate_under_blocker_check_event)
+{
+ etWin *tw = NULL;
+ Eina_Bool res = EINA_FALSE;
+ Eina_List *list = NULL, *l = NULL;
+
+ // init TC window, show=false, geom=false
+ initTC(EINA_FALSE, EINA_FALSE);
+
+ showTCWin(tw_blocker);
+ etRunner::get().setWinNotiLevel(tw_blocker,
+ EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT);
+ etRunner::get().waitEvent(tw_blocker, E_TC_EVENT_TYPE_VIS_ON);
+
+ // set event checkpoint
+ etRunner::get().setEventCheckpoint();
+
+ // Activate tw_red
+ res = showActivateTCWin(tw_red);
+ ASSERT_TRUE(res);
+ etRunner::get().waitEvent(tw_red, E_TC_EVENT_TYPE_FOCUS_CHANGED);
+
+ // Expected focus res:
+ // [Top] Blocker[focused] -> ... -> Red [Bottom]
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->native_win == tw_blocker->native_win)
+ ASSERT_TRUE(tw->Focus.obj);
+ else
+ ASSERT_FALSE(tw->Focus.obj);
+ }
+ etRunner::get().freeWinInfoList(list);
+
+ // check event of tw_red
+ ASSERT_FALSE(etRunner::get().isEventOccuredAfterCheckpoint(tw_red, E_TC_EVENT_TYPE_FOCUS_CHANGED));
+}
+
TEST_F(etTestFocus, focus_fullsize_transient_for)
{
etWin *tw = NULL;