ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
}
+TEST_F(etTestAuxHint, generate_hint)
+{
+ int hint_id = -1;
+
+ initTC();
+
+ // add hint with generate(2, "win.test.auxhint", "test")
+ hint_id = etRunner::get().generateAuxHint(tw, "win.test.auxhint", "test");
+ ASSERT_NE(hint_id, -1);
+ ASSERT_HINT(tw, hint_id, "win.test.auxhint", "test");
+
+ ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestAuxHint, generate_duplicated_hint)
+{
+ Eina_Bool ret = EINA_FALSE;
+ int hint_id = -1;
+
+ initTC();
+
+ // add hint (486, "win.test.auxhint", "test")
+ ret = etRunner::get().addAuxHint(tw, test_hint_id, "win.test.auxhint", "test");
+ ASSERT_TRUE(ret);
+ ASSERT_HINT(tw, test_hint_id, "win.test.auxhint", "test");
+
+ // change hint with generate(486, "win.test.auxhint", "test2")
+ hint_id = etRunner::get().generateAuxHint(tw, "win.test.auxhint", "test2");
+ ASSERT_EQ(hint_id, test_hint_id);
+ ASSERT_HINT(tw, hint_id, "win.test.auxhint", "test2");
+
+ // verify server's aux hint of "win.test.auxhint" // "origin"
+ ev_result_hint = etRunner::get().getAuxHint(tw, "win.test.auxhint");
+ compareHint(ev_result_hint, test_hint_id, "win.test.auxhint", "test2");
+
+ ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestAuxHint, delete_generated_hint)
+{
+ Eina_Bool ret = EINA_FALSE;
+ int hint_id = -1, hint_id2 = -1;
+
+ initTC();
+ etRunner::get().addSupportedAuxHint("win.test.auxhint.2");
+
+ // generate hint (2, "win.test.auxhint", "test")
+ hint_id = etRunner::get().generateAuxHint(tw, "win.test.auxhint", "test");
+ ASSERT_NE(hint_id, -1);
+ ASSERT_HINT(tw, hint_id, "win.test.auxhint", "test");
+
+ ret = etRunner::get().delAuxHint(tw, hint_id);
+ ASSERT_TRUE(ret);
+ ASSERT_HINT(tw, hint_id, "win.test.auxhint", "test");
+
+ // generate hint (2, "win.test.auxhint", "test")
+ hint_id2 = etRunner::get().generateAuxHint(tw, "win.test.auxhint.2", "test2");
+ ASSERT_EQ(hint_id2, hint_id);
+ ASSERT_HINT(tw, hint_id2, "win.test.auxhint.2", "test2");
+
+ ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+TEST_F(etTestAuxHint, generate_hint_id_robustness)
+{
+ int hint_id = -1;
+ int invalIDList[] = {1, 10, 49, 8, 30, 0x7fffffff, -49, 0xfff000, 0xf0f0f0, 5, 10};
+ char auxHintStr[30] = {0};
+ Eina_Bool ret = EINA_FALSE;
+
+ // disable timeout
+ etRunner::get().setTCTimeout(EINA_FALSE, 0);
+
+ initTC();
+ etRunner::get().addSupportedAuxHint("win.test.auxhint.dup");
+
+ for (int i = 0 ; i < 11 ; i++)
+ {
+ ret = etRunner::get().addAuxHint(tw, invalIDList[i] , "win.test.auxhint.dup", "test");
+ ASSERT_TRUE(ret);
+ ASSERT_NE(hint_id, EINA_FALSE);
+ etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED);
+ }
+
+ for (int i = 0 ; i <= 50 ; i++)
+ {
+ sprintf(auxHintStr, "win.test.testhint.%d", i);
+ etRunner::get().addSupportedAuxHint(auxHintStr);
+ hint_id = etRunner::get().generateAuxHint(tw, auxHintStr, "test");
+ ASSERT_NE(hint_id, -1);
+
+ ASSERT_HINT(tw, hint_id, auxHintStr, "test");
+
+ for (int j = 0 ; j < 11 ; j++)
+ {
+ ASSERT_NE(hint_id, invalIDList[j]);
+ }
+ }
+
+ etRunner::get().setTCTimeout(EINA_TRUE, 10);
+
+ ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+
+// FOR ecore_wl2_window_aux_hint APIs
+TEST_F(etTestAuxHint, aux_hint_id_val_get)
+{
+ int hint_id = -1;
+ int returned_hint_id = -1;
+ int invalIDList[] = {1, 10, 49, 8, 30, 0x7fffffff, -49, 0xfff000, 0xf0f0f0, 5, 10};
+ char auxHintStr[30] = {0};
+ char auxHintVal[30] = {0};
+ Eina_Bool ret = EINA_FALSE;
+
+ // disable timeout
+ etRunner::get().setTCTimeout(EINA_FALSE, 0);
+
+ initTC();
+ etRunner::get().addSupportedAuxHint("win.test.auxhint.dup");
+
+ for (int i = 0 ; i < 11 ; i++)
+ {
+ ret = etRunner::get().addAuxHint(tw, invalIDList[i] , "win.test.auxhint.dup", "test");
+ ASSERT_TRUE(ret);
+ ASSERT_NE(hint_id, EINA_FALSE);
+ etRunner::get().waitEvent(tw, E_TC_EVENT_TYPE_AUX_HINT_CHANGED);
+ }
+
+ for (int i = 0 ; i <= 50 ; i++)
+ {
+ sprintf(auxHintStr, "win.test.testhint.%d", i);
+ sprintf(auxHintVal, "test%d", i);
+ etRunner::get().addSupportedAuxHint(auxHintStr);
+ hint_id = etRunner::get().generateAuxHint(tw, auxHintStr, auxHintVal);
+ ASSERT_NE(hint_id, -1);
+
+ ASSERT_HINT(tw, hint_id, auxHintStr, auxHintVal);
+
+ returned_hint_id = etRunner::get().getAuxHintID(tw, auxHintStr);
+ std::string hint_val = etRunner::get().getAuxHintValue(tw, returned_hint_id);
+ ASSERT_EQ(returned_hint_id, hint_id);
+ ASSERT_TRUE(hint_val == std::string(auxHintVal));
+ }
+
+ etRunner::get().setTCTimeout(EINA_TRUE, 10);
+
+ ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
+}
+