e_test_base: add method for activate immediately after show 51/190451/1
authorJunSeok, Kim <juns.kim@samsung.com>
Tue, 2 Oct 2018 05:42:04 +0000 (14:42 +0900)
committerJunSeok, Kim <juns.kim@samsung.com>
Tue, 2 Oct 2018 05:42:04 +0000 (14:42 +0900)
Change-Id: I9a60bd91209f9dc2034dc0b658bc9c65a56fb091

src/e_test_base.cpp
src/e_test_base.h

index e6bd251..8654809 100644 (file)
@@ -184,6 +184,28 @@ etTCBase::showTCWin(etWin *tw)
 }
 
 Eina_Bool
+etTCBase::showActivateTCWin(etWin *tw)
+{
+   Eina_Bool res = EINA_FALSE;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tw, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tw->elm_win, EINA_FALSE);
+
+   res = registerTCWin(tw);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EINA_FALSE);
+
+   tw->updateGeometry();
+   tw->show();
+
+   res = etRunner::get().setWinActivate(tw);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EINA_FALSE);
+
+   etRunner::get().waitEvent(E_TC_EVENT_TYPE_VIS_ON);
+
+   return EINA_TRUE;
+}
+
+Eina_Bool
 etTCBase::removeTCWin(etWin *tw)
 {
    Eina_Bool res = EINA_FALSE;
index 39bc6ab..c381cce 100644 (file)
@@ -19,6 +19,7 @@ class etTCBase : public ::testing::Test
    Eina_Bool  registerTCWin(etWin *tw);
    Eina_Bool  deregisterTCWin(etWin *tw);
    Eina_Bool  showTCWin(etWin *tw);
+   Eina_Bool  showActivateTCWin(etWin *tw);
    Eina_Bool  removeTCWin(etWin *tw);
 
  private: