TEST_F(MMIMainTest, MMIClientSetResultCbSuccess)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMIClientSetResultCbFail)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMISetResultCbSuccess)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMISetResultCbFail)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMIClientDestroyRemoveGList)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
res = mmi_set_result_cb(input_event_type, voice_touch_callback, NULL);
EXPECT_EQ(res, MMI_ERROR_NONE);
- res = mmi_set_result_cb(MMI_VOICE_RECOGNITION, voice_recognition_callback, NULL);
+ res = mmi_set_result_cb(MMI_INPUT_EVENT_TYPE_VOICE_RECOGNITION, voice_recognition_callback, NULL);
EXPECT_EQ(res, MMI_ERROR_NONE);
mmi_client_destroy();
TEST_F(MMIMainTest, MMISetResultCbFailNoClient)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMISetResultCbFailNoRpcHandle)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMIActivateInputEventSuccess)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMIActivateInputEventFailNoEvent)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
res = mmi_set_result_cb(input_event_type, voice_touch_callback, NULL);
EXPECT_EQ(res, MMI_ERROR_NONE);
- res = mmi_activate_input_event(MMI_VOICE_RECOGNITION);
+ res = mmi_activate_input_event(MMI_INPUT_EVENT_TYPE_VOICE_RECOGNITION);
EXPECT_EQ(res, MMI_ERROR_INVALID_PARAMETER);
mmi_deinitialize();
TEST_F(MMIMainTest, MMIActivateInputEventFailNoCallback)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
TEST_F(MMIMainTest, MMIActivateInputEventFailNoRpcHandle)
{
int res = mmi_initialize();
- mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH;
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
EXPECT_EQ(res, MMI_ERROR_NONE);
mmi_deinitialize();
}
+
+TEST_F(MMIMainTest, MMIActivateInputEventFailAlreadyDone)
+{
+ int res = mmi_initialize();
+ mmi_input_event_type_e input_event_type = MMI_INPUT_EVENT_TYPE_VOICE_TOUCH;
+
+ EXPECT_EQ(res, MMI_ERROR_NONE);
+
+ res = mmi_set_result_cb(input_event_type, voice_touch_callback, NULL);
+ EXPECT_EQ(res, MMI_ERROR_NONE);
+
+ res = mmi_activate_input_event(input_event_type);
+ EXPECT_EQ(res, MMI_ERROR_NONE);
+
+ res = mmi_activate_input_event(input_event_type);
+ EXPECT_EQ(res, MMI_ERROR_OPERATION_FAILED);
+
+ mmi_deinitialize();
+}