//ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
}
+
+TEST_F(etTestTransientForBelow, transient_for_below_activate_below_basic)
+{
+ etWin *tw = NULL;
+ etWin *tw_child = NULL;
+ Eina_List *list = NULL, *l = NULL;
+ int pass_count = 0;
+
+ // init TC window, show=true, geom=true
+ initTC(EINA_TRUE);
+
+ makeTransientBelowChild(&tw_child, tw_parent, 80, 80, 300, 300, E_TC_WIN_COLOR_BLUE, "TCWin_Normal_child");
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_base [Bottom]
+
+
+ //////////////////////////////////////////////////
+ // tw_child Activate Below tw_parent
+ //////////////////////////////////////////////////
+ etRunner::get().setWinActivateBelow(tw_child, tw_parent);
+ etRunner::get().work(1.0);
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_base [Bottom]
+
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->layer > 200) continue;
+
+ if (pass_count == 0)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 1)
+ {
+ ASSERT_EQ(tw->native_win, tw_child->native_win);
+ pass_count++;
+ continue;
+ }
+ else
+ {
+ ASSERT_EQ(tw->native_win, tw_base->native_win);
+ pass_count++;
+ }
+
+ break;
+ }
+ etRunner::get().freeWinInfoList(list);
+
+ ASSERT_EQ(3, pass_count);
+ //ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestTransientForBelow, transient_for_below_activate_above_basic)
+{
+ etWin *tw = NULL;
+ etWin *tw_child = NULL;
+ Eina_List *list = NULL, *l = NULL;
+ int pass_count = 0;
+
+ // init TC window, show=true, geom=true
+ initTC(EINA_TRUE);
+
+ makeTransientBelowChild(&tw_child, tw_parent, 80, 80, 300, 300, E_TC_WIN_COLOR_BLUE, "TCWin_Normal_child");
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_base [Bottom]
+
+
+ //////////////////////////////////////////////////
+ // tw_child Activate Above tw_parent
+ //////////////////////////////////////////////////
+ etRunner::get().setWinActivateAbove(tw_child, tw_parent);
+ etRunner::get().work(1.0);
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_base [Bottom]
+
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->layer > 200) continue;
+
+ if (pass_count == 0)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 1)
+ {
+ ASSERT_EQ(tw->native_win, tw_child->native_win);
+ pass_count++;
+ continue;
+ }
+ else
+ {
+ ASSERT_EQ(tw->native_win, tw_base->native_win);
+ pass_count++;
+ }
+
+ break;
+ }
+ etRunner::get().freeWinInfoList(list);
+
+ ASSERT_EQ(3, pass_count);
+ //ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestTransientForBelow, transient_for_below_activate_above_parent)
+{
+ etWin *tw = NULL;
+ etWin *tw_child = NULL;
+ etWin *tw_child2 = NULL;
+ etWin *tw_child3 = NULL;
+
+ etWin *tw_parent2 = NULL;
+ Eina_List *list = NULL, *l = NULL;
+ int pass_count = 0;
+
+ // init TC window, show=true, geom=true
+ initTC(EINA_TRUE);
+
+ makeTransientBelowChild(&tw_child, tw_parent, 80, 80, 300, 300, E_TC_WIN_COLOR_BLUE, "TCWin_Normal_child");
+ makeTransientBelowChild(&tw_child2, tw_parent, 110, 110, 300, 300, E_TC_WIN_COLOR_GREEN, "TCWin_Normal_child2");
+ makeTransientBelowChild(&tw_child3, tw_parent, 130, 130, 300, 300, E_TC_WIN_COLOR_YELLOW, "TCWin_Normal_child3");
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_child2 -> tw_child3 -> tw_base [Bottom]
+
+
+ tw_parent2 = initNormalWin("TCWin_Normal_parent2", 0, 300, 400, 400, E_TC_WIN_COLOR_ORANGE);
+ ASSERT_TRUE(tw_parent2 != NULL) << "failed to initiation window";
+ showTCWin(tw_parent2);
+ ASSERT_VIS_ON(tw_parent2);
+
+ // Expected stack res:
+ // [Top] tw_parent2 -> tw_parent -> tw_child -> tw_child2 -> tw_child3 -> tw_base [Bottom]
+
+
+ //////////////////////////////////////////////////
+ // activate above tw_parent
+ //////////////////////////////////////////////////
+ etRunner::get().setWinActivateAbove(tw_parent, tw_parent2);
+ ASSERT_EVENT(tw_parent, E_TC_EVENT_TYPE_STACK_RAISE);
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_child2 -> tw_child3 -> tw_parent2 -> tw_base [Bottom]
+
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->layer > 200) continue;
+
+ if (pass_count == 0)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 1)
+ {
+ ASSERT_EQ(tw->native_win, tw_child->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 2)
+ {
+ ASSERT_EQ(tw->native_win, tw_child2->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 3)
+ {
+ ASSERT_EQ(tw->native_win, tw_child3->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 4)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent2->native_win);
+ pass_count++;
+ continue;
+ }
+ else
+ {
+ ASSERT_EQ(tw->native_win, tw_base->native_win);
+ pass_count++;
+ }
+
+ break;
+ }
+ etRunner::get().freeWinInfoList(list);
+
+ ASSERT_EQ(6, pass_count);
+ //ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestTransientForBelow, transient_for_below_activate_above_parent2)
+{
+ etWin *tw = NULL;
+ etWin *tw_child = NULL;
+ etWin *tw_child2 = NULL;
+ etWin *tw_child3 = NULL;
+
+ etWin *tw_parent2 = NULL;
+ etWin *tw_parent2_child = NULL;
+ etWin *tw_parent2_child2 = NULL;
+ Eina_List *list = NULL, *l = NULL;
+ int pass_count = 0;
+
+ // init TC window, show=true, geom=true
+ initTC(EINA_TRUE);
+
+ makeTransientBelowChild(&tw_child, tw_parent, 80, 80, 300, 300, E_TC_WIN_COLOR_BLUE, "TCWin_Normal_child");
+ makeTransientBelowChild(&tw_child2, tw_parent, 110, 110, 300, 300, E_TC_WIN_COLOR_GREEN, "TCWin_Normal_child2");
+ makeTransientBelowChild(&tw_child3, tw_parent, 130, 130, 300, 300, E_TC_WIN_COLOR_YELLOW, "TCWin_Normal_child3");
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_child2 -> tw_child3 -> tw_base [Bottom]
+
+
+ tw_parent2 = initNormalWin("TCWin_Normal_parent2", 0, 300, 400, 400, E_TC_WIN_COLOR_ORANGE);
+ ASSERT_TRUE(tw_parent2 != NULL) << "failed to initiation window";
+ showTCWin(tw_parent2);
+ ASSERT_VIS_ON(tw_parent2);
+
+ makeTransientBelowChild(&tw_parent2_child, tw_parent2, 20, 320, 400, 400, E_TC_WIN_COLOR_CYAN, "TCWin_Normal_child");
+ makeTransientBelowChild(&tw_parent2_child2, tw_parent2, 40, 340, 400, 400, E_TC_WIN_COLOR_INDIGO, "TCWin_Normal_child2");
+
+ // Expected stack res:
+ // [Top] tw_parent2 -> tw_parent2_child -> tw_parent2_child2 -> tw_parent -> tw_child -> tw_child2 -> tw_child3 -> tw_base [Bottom]
+
+
+ //////////////////////////////////////////////////
+ // Activate above tw_parent
+ //////////////////////////////////////////////////
+ etRunner::get().setWinActivateAbove(tw_parent, tw_parent2);
+ ASSERT_EVENT(tw_parent, E_TC_EVENT_TYPE_STACK_RAISE);
+
+ // Expected stack res:
+ // [Top] tw_parent -> tw_child -> tw_child2 -> tw_child3 -> tw_parent2 -> tw_parent2_child -> tw_parent2_child2 -> tw_base [Bottom]
+
+ list = etRunner::get().getWinInfoList();
+ ASSERT_TRUE(list != NULL);
+
+ EINA_LIST_CAST_FOREACH(list, l, tw, etWin*)
+ {
+ if (tw->layer > 200) continue;
+
+ if (pass_count == 0)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 1)
+ {
+ ASSERT_EQ(tw->native_win, tw_child->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 2)
+ {
+ ASSERT_EQ(tw->native_win, tw_child2->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 3)
+ {
+ ASSERT_EQ(tw->native_win, tw_child3->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 4)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent2->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 5)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent2_child->native_win);
+ pass_count++;
+ continue;
+ }
+ else if (pass_count == 6)
+ {
+ ASSERT_EQ(tw->native_win, tw_parent2_child2->native_win);
+ pass_count++;
+ continue;
+ }
+ else
+ {
+ ASSERT_EQ(tw->native_win, tw_base->native_win);
+ pass_count++;
+ }
+
+ break;
+ }
+ etRunner::get().freeWinInfoList(list);
+
+ ASSERT_EQ(8, pass_count);
+ //ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}