From 66dd4883eaf4952b41785a8000bdad1413610b98 Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Wed, 14 Apr 2021 10:49:27 +0900 Subject: [PATCH] e_test_event: Added auxHintEventItem class. Added auxHintEventItem class inherits eventItem. It will be used by Aux hint test cases. Change-Id: I07906ae3cbd0eb09a3cf1fa22fc8e6680cdc9194 --- src/e_test_event.cpp | 6 +++++- src/e_test_event.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/e_test_event.cpp b/src/e_test_event.cpp index 84b2929..94d4dd5 100644 --- a/src/e_test_event.cpp +++ b/src/e_test_event.cpp @@ -2047,6 +2047,7 @@ _cb_signal_aux_hint_changed(void *data, Eina_Bool res = EINA_FALSE; Ecore_Window win = 0; uint32_t hint_id; + std::shared_ptr hint = NULL; const char *hint_key, *hint_val; res = eldbus_message_error_get(msg, &name, &text); @@ -2055,7 +2056,10 @@ _cb_signal_aux_hint_changed(void *data, res = eldbus_message_arguments_get(msg, "uuss", &win, &hint_id, &hint_key, &hint_val); EINA_SAFETY_ON_FALSE_GOTO(res, finish); - runner->insertEventQueue(win, E_TC_EVENT_TYPE_AUX_HINT_CHANGED); + hint = std::make_shared(win, E_TC_EVENT_TYPE_AUX_HINT_CHANGED, hint_id, hint_key, hint_val); + EINA_SAFETY_ON_NULL_GOTO(hint, finish); + + runner->insertEventQueue(hint); finish: if ((name) || (text)) diff --git a/src/e_test_event.h b/src/e_test_event.h index 908957f..c8c7fd5 100644 --- a/src/e_test_event.h +++ b/src/e_test_event.h @@ -31,6 +31,34 @@ protected: E_TC_Event_Type type; }; +class auxHintEventItem : public eventItem +{ +public: + auxHintEventItem() = delete; + auxHintEventItem (Ecore_Window win, E_TC_Event_Type type, int id, const char *hint, const char *val) : + eventItem(win, type), + id(id), + hint(std::string(hint)), + val(std::string(val)) + { + } + ~auxHintEventItem() + { + } + + Eina_Bool isSameID(int id) { return id == this->id; } + Eina_Bool isSameHint(std::string hint) { return !strncmp(hint.c_str(), this->hint.c_str(), hint.size()); } + Eina_Bool isSameVal(std::string val) { return val == this->val; } + int getID() { return this->id; } + std::string getHint() { return this->hint; } + std::string getVal() { return this->val; } + +private: + int id; + std::string hint; + std::string val; +}; + class etRunner { private: -- 2.7.4