--- /dev/null
+#include "e_test_event.h"
+#include "e_test_base.h"
+
+static int test_hint_id = 486;
+
+class etTestAuxHint : public ::etTCBase
+{
+ public:
+ etTestAuxHint()
+ {
+ etRunner::get().addSupportedAuxHint("win.test.auxhint");
+ };
+ ~etTestAuxHint()
+ {
+ etRunner::get().delSupportedAuxHint("win.test.auxhint");
+ };
+
+ protected:
+ etWin *tw = NULL;
+
+ void initTC();
+};
+
+void
+etTestAuxHint::initTC()
+{
+ tw = initNormalWin("TCWin_Normal", EINA_TRUE);
+ ASSERT_TRUE(tw != NULL) << "failed to initiation window";
+ ASSERT_TRUE(showTCWin(tw)) << "failed to show window";
+}
+
+TEST_F(etTestAuxHint, add_hint)
+{
+ std::shared_ptr<auxHintEventItem> data = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ initTC();
+ etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_VIS_ON);
+
+ ret = etRunner::get().addAuxHint(tw, test_hint_id, "win.test.auxhint", "test");
+ ASSERT_TRUE(ret);
+ data = std::static_pointer_cast<auxHintEventItem>(etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED));
+ ASSERT_TRUE(data != NULL);
+ ASSERT_TRUE(data->isSameHint(std::string("win.test.auxhint"))) << "Err: " << data->getHint();
+ ASSERT_TRUE(data->isSameVal(std::string("test"))) << "Err: " << data->getVal();
+}
+
+TEST_F(etTestAuxHint, change_hint)
+{
+ std::shared_ptr<auxHintEventItem> data = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ initTC();
+ etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_VIS_ON);
+
+ ret = etRunner::get().addAuxHint(tw, test_hint_id, "win.test.auxhint", "test");
+ ASSERT_TRUE(ret);
+ data = std::static_pointer_cast<auxHintEventItem>(etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED));
+ ASSERT_TRUE(data != NULL);
+ ASSERT_TRUE(data->isSameHint(std::string("win.test.auxhint"))) << "Err: " << data->getHint();
+ ASSERT_TRUE(data->isSameVal(std::string("test"))) << "Err: " << data->getVal();
+
+ ret = etRunner::get().changeAuxHint(tw, test_hint_id, "test2");
+ ASSERT_TRUE(ret);
+ data = std::static_pointer_cast<auxHintEventItem>(etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED));
+ ASSERT_TRUE(data != NULL);
+ ASSERT_TRUE(data->isSameHint(std::string("win.test.auxhint"))) << "Err: " << data->getHint();
+ ASSERT_TRUE(data->isSameVal(std::string("test2"))) << "Err: " << data->getVal();
+}
+
+TEST_F(etTestAuxHint, del_hint)
+{
+ std::shared_ptr<auxHintEventItem> data = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ initTC();
+ etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_VIS_ON);
+
+ ret = etRunner::get().addAuxHint(tw, test_hint_id, "win.test.auxhint", "test");
+ ASSERT_TRUE(ret);
+ data = std::static_pointer_cast<auxHintEventItem>(etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED));
+ ASSERT_TRUE(data != NULL);
+ ASSERT_TRUE(data->isSameHint(std::string("win.test.auxhint"))) << "Err: " << data->getHint();
+ ASSERT_TRUE(data->isSameVal(std::string("test"))) << "Err: " << data->getVal();
+
+ ret = etRunner::get().delAuxHint(tw, test_hint_id);
+ ASSERT_TRUE(ret);
+ etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED);
+}
+