ASSERT_TRUE(ev_result_iconic->isUniconified()) << "Window is iconified"; \
} while (0)
+#define RETURN_VIS_ON(TEST_WINDOW) \
+ do { \
+ if (TEST_WINDOW == nullptr) return etTCResult(false, "Window is NULL"); \
+ ev_result_vis = std::static_pointer_cast<visibleEventItem>(etRunner::get().waitEvent(TEST_WINDOW, E_TC_EVENT_TYPE_VIS_ON)); \
+ if (ev_result_vis == nullptr) return etTCResult(false, "result is NULL"); \
+ if (ev_result_vis->isTimeout) return etTCResult(false, "waitEvent timeout (1.0 sec)"); \
+ if (!ev_result_vis->result) return etTCResult(false, "waitEvent failed"); \
+ if (!ev_result_vis->isVisible()) return etTCResult(false, "Window is invisible"); \
+ } while (0)
+
+#define RETURN_FOCUS_IN(TEST_WINDOW) \
+ do { \
+ if (TEST_WINDOW == nullptr) return etTCResult(false, "Window is NULL"); \
+ ev_result_focus = std::static_pointer_cast<focusEventItem>(etRunner::get().waitEvent(TEST_WINDOW, E_TC_EVENT_TYPE_FOCUS_CHANGED)); \
+ if (ev_result_focus == nullptr) return etTCResult(false, "result is NULL"); \
+ if (ev_result_focus->isTimeout) return etTCResult(false, "waitEvent timeout (1.0 sec)"); \
+ if (!ev_result_focus->result) return etTCResult(false, "waitEvent failed"); \
+ if (!ev_result_focus->isFocused()) return etTCResult(false, "Window isn't focused"); \
+ } while (0)
+
+#define RETURN_ICONIFIED_BY_SERVER(TEST_WINDOW) \
+ do { \
+ if (TEST_WINDOW == nullptr) return etTCResult(false, "Window is NULL"); \
+ ev_result_iconic = std::static_pointer_cast<iconicStateEventItem>(etRunner::get().waitEvent(TEST_WINDOW, E_TC_EVENT_TYPE_ICONIC_STATE_CHANGED)); \
+ if (ev_result_iconic == nullptr) return etTCResult(false, "result is NULL"); \
+ if (ev_result_iconic->isTimeout) return etTCResult(false, "waitEvent timeout (1.0 sec)"); \
+ if (!ev_result_iconic->result) return etTCResult(false, "waitEvent failed"); \
+ if (!ev_result_iconic->isIconified()) return etTCResult(false, "Window is uniconified"); \
+ if (ev_result_iconic->isIconifiedByClient()) return etTCResult(false, "Window is iconified by client"); \
+ } while (0)
+
#define CAPTURE_WIDTH_MOBILE 720
#define CAPTURE_HEIGHT_MOBILE 1280
#define CAPTURE_WIDTH_COMMON 1920