return;
}
+/**
+* @function AutofillErrorInfoReceivedCb
+* @description Callback Function to receive Autofill Error info.
+* @parameters autofill_h hAutofill, autofill_error_info_h hAutofillErrorInfo, void *user_data
+* @return NA
+*/
+void AutofillErrorInfoReceivedCb(autofill_h hAutofill, autofill_error_info_h hAutofillErrorInfo, void *user_data)
+{
+ FPRINTF("[Line: %d][%s] %s Callback invoked\\n", __LINE__, API_NAMESPACE, "AutofillErrorInfoReceivedCb");
+ return;
+}
+
/****************************************************Callback End***********************************************************/
+/**
+* @testcase ITc_autofill_error_info_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(p.chauhan)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @description Creates and destroys autofill error information.
+* @scenario Creates and destroys autofill error information.
+* @apicovered autofill_error_info_create, autofill_error_info_destroy
+* @passcase autofill_error_info_create, autofill_error_info_destroy return(s) 0
+* @failcase autofill_error_info_create, autofill_error_info_destroy return(s) 1
+* @precondition N/A
+* @postcondition N/A
+* */
+int ITc_autofill_error_info_create_destroy_p(void)
+{
+ START_TEST;
+
+ autofill_error_info_h hAutofillErrorInfo = NULL;
+ int nRet = 0;
+
+ nRet = autofill_error_info_create(&hAutofillErrorInfo);
+ PRINT_RESULT(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_create", AutofillGetError(nRet));
+ CHECK_HANDLE(hAutofillErrorInfo, "autofill_error_info_create");
+
+ nRet = autofill_error_info_destroy(hAutofillErrorInfo);
+ PRINT_RESULT(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_destroy", AutofillGetError(nRet));
+
+ return 0;
+}
+
+/**
+* @testcase ITc_autofill_error_info_set_get_app_id_p
+* @since_tizen 5.5
+* @author SRID(p.chauhan)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @description Sets and gets the app id in autofill error information.
+* @scenario Creates the handle and Sets and gets the app id in autofill error information and destroys it.
+* @apicovered autofill_error_info_set_app_id, autofill_error_info_get_app_id
+* @passcase autofill_error_info_set_app_id, autofill_error_info_get_app_id return(s) 0
+* @failcase autofill_error_info_set_app_id, autofill_error_info_get_app_id return(s) 1
+* @precondition autofill_error_info_create
+* @postcondition autofill_error_info_destroy
+* */
+int ITc_autofill_error_info_set_get_app_id_p(void)
+{
+ START_TEST;
+
+ autofill_error_info_h hAutofillErrorInfo = NULL;
+ char *pszAppId = NULL;
+ int nRet = 0;
+
+ nRet = autofill_error_info_create(&hAutofillErrorInfo);
+ PRINT_RESULT(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_create", AutofillGetError(nRet));
+ CHECK_HANDLE(hAutofillErrorInfo, "autofill_error_info_create");
+
+ nRet = autofill_error_info_set_app_id(hAutofillErrorInfo, g_pszAppId);
+ PRINT_RESULT_CLEANUP(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_set_app_id", AutofillGetError(nRet), autofill_error_info_destroy(hAutofillErrorInfo));
+
+ nRet = autofill_error_info_get_app_id(hAutofillErrorInfo, &pszAppId);
+ PRINT_RESULT_CLEANUP(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_get_app_id", AutofillGetError(nRet), autofill_error_info_destroy(hAutofillErrorInfo));
+ CHECK_HANDLE_CLEANUP(pszAppId, "autofill_error_info_get_app_id", autofill_error_info_destroy(hAutofillErrorInfo));
+
+ if(0 != strncmp(pszAppId, g_pszAppId, strlen(g_pszAppId)))
+ {
+ FPRINTF("[Line : %d][%s] autofill_error_info_get_app_id failed.pszAppId = %d\\n", __LINE__, API_NAMESPACE, pszAppId);
+ FREE_MEMORY(pszAppId);
+ autofill_error_info_destroy(hAutofillErrorInfo);
+ return 1;
+ }
+
+ FREE_MEMORY(pszAppId);
+
+ nRet = autofill_error_info_destroy(hAutofillErrorInfo);
+ PRINT_RESULT_NORETURN(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_destroy", AutofillGetError(nRet));
+
+ return 0;
+}
+
+/**
+* @testcase ITc_autofill_error_info_set_get_error_code_p
+* @since_tizen 5.5
+* @author SRID(p.chauhan)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @description Sets and gets the error code in autofill error information.
+* @scenario Creates handle and Sets and gets all error codes in autofill error information and destroys the handle.
+* @apicovered autofill_error_info_set_error_code, autofill_error_info_get_error_code
+* @passcase autofill_error_info_set_error_code, autofill_error_info_get_error_code return(s) 0
+* @failcase autofill_error_info_set_error_code, autofill_error_info_get_error_code return(s) 1
+* @precondition autofill_error_info_create
+* @postcondition autofill_error_info_destroy
+* */
+int ITc_autofill_error_info_set_get_error_code_p(void)
+{
+ START_TEST;
+
+ autofill_error_info_h hAutofillErrorInfo = NULL;
+ int nRet = 0;
+
+ autofill_error_e eErrorCodeArr[] = {
+ AUTOFILL_ERROR_NONE,
+ AUTOFILL_ERROR_INVALID_PARAMETER,
+ AUTOFILL_ERROR_PERMISSION_DENIED,
+ AUTOFILL_ERROR_NOT_INITIALIZED,
+ AUTOFILL_ERROR_OPERATION_FAILED,
+ AUTOFILL_ERROR_OUT_OF_MEMORY,
+ AUTOFILL_ERROR_AUTHENTICATION_FAILED,
+ AUTOFILL_ERROR_COMMIT_FAILED,
+ AUTOFILL_ERROR_FILL_RESPONSE_FAILED,
+ AUTOFILL_ERROR_SERVICE_NOT_CONNECTED,
+ AUTOFILL_ERROR_SERVICE_NOT_ALLOWED,
+ AUTOFILL_ERROR_SERVICE_NOT_ACTIVATED,
+ AUTOFILL_ERROR_SAVED_VALUES_NOT_FOUND,
+ };
+
+ int nErrorCodeSize = sizeof(eErrorCodeArr)/sizeof(eErrorCodeArr[0]);
+ autofill_error_e eErrorCode;
+
+ nRet = autofill_error_info_create(&hAutofillErrorInfo);
+ PRINT_RESULT(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_create", AutofillGetError(nRet));
+ CHECK_HANDLE(hAutofillErrorInfo, "autofill_error_info_create");
+
+ for(int nErrorCodeCounter = 0; nErrorCodeCounter<nErrorCodeSize; nErrorCodeCounter++)
+ {
+
+ nRet = autofill_error_info_set_error_code(hAutofillErrorInfo, eErrorCodeArr[nErrorCodeCounter]);
+ PRINT_RESULT_CLEANUP(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_set_error_code", AutofillGetError(nRet), autofill_error_info_destroy(hAutofillErrorInfo));
+
+ nRet = autofill_error_info_get_error_code(hAutofillErrorInfo, &eErrorCode);
+ PRINT_RESULT_CLEANUP(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_get_error_code", AutofillGetError(nRet), autofill_error_info_destroy(hAutofillErrorInfo));
+
+ if( eErrorCode != eErrorCodeArr[nErrorCodeCounter])
+ {
+ FPRINTF("[Line : %d][%s] autofill_error_info_get_error_code failed. eErrorCode = %d\\n", __LINE__, API_NAMESPACE, eErrorCode);
+ autofill_error_info_destroy(hAutofillErrorInfo);
+ return 1;
+ }
+ }
+
+ nRet = autofill_error_info_destroy(hAutofillErrorInfo);
+ PRINT_RESULT_NORETURN(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_destroy", AutofillGetError(nRet));
+
+ return 0;
+}
+
+/**
+* @testcase ITc_autofill_error_info_set_unset_received_cb_p
+* @since_tizen 5.5
+* @author SRID(p.chauhan)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @description Sets and unsets the callback to receive the error information.
+* @scenario Creates handle and Sets and unsets the callback to receive the error information then destroys it.
+* @apicovered autofill_error_info_set_received_cb, autofill_error_info_unset_received_cb
+* @passcase autofill_error_info_set_received_cb, autofill_error_info_unset_received_cb return(s) 0
+* @failcase autofill_error_info_set_received_cb, autofill_error_info_unset_received_cb return(s) 1
+* @precondition autofill_create
+* @postcondition autofill_destroy
+* */
+int ITc_autofill_error_info_set_unset_received_cb_p(void)
+{
+ START_TEST;
+
+ autofill_h hAutofill = NULL;
+ int nRet = 0;
+
+ nRet = autofill_create(&hAutofill);
+ PRINT_RESULT(nRet, AUTOFILL_ERROR_NONE, "autofill_create", AutofillGetError(nRet));
+ CHECK_HANDLE(hAutofill, "autofill_create");
+
+ nRet = autofill_error_info_set_received_cb(hAutofill, AutofillErrorInfoReceivedCb, NULL);
+ PRINT_RESULT_CLEANUP(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_set_received_cb", AutofillGetError(nRet), autofill_destroy(hAutofill));
+
+ nRet = autofill_error_info_unset_received_cb(hAutofill);
+ PRINT_RESULT_CLEANUP(nRet, AUTOFILL_ERROR_NONE, "autofill_error_info_unset_received_cb", AutofillGetError(nRet), autofill_destroy(hAutofill));
+
+ nRet = autofill_destroy(hAutofill);
+ PRINT_RESULT_NORETURN(nRet, AUTOFILL_ERROR_NONE, "autofill_destroy", AutofillGetError(nRet));
+
+ return 0;
+}
/**
* @testcase ITc_autofill_item_create_destroy_p
* @since_tizen 5.5