From: Dariusz Michaluk Date: Thu, 16 Feb 2023 11:00:38 +0000 (+0100) Subject: Remove Privacy Privilege Manager UTC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72dc0a7e55921fbe671cd9ab3a1d3ae95d2227b8;p=test%2Ftct%2Fnative%2Fapi.git Remove Privacy Privilege Manager UTC All PPM APIs are deprecated since Tizen 7.5 Change-Id: Iaa9533f128d8e13c6fbb73f185cfe50143065ecd --- diff --git a/packaging/utc/core-privacy-privilege-manager-tests.xml b/packaging/utc/core-privacy-privilege-manager-tests.xml deleted file mode 100755 index d7e0c8b0b..000000000 --- a/packaging/utc/core-privacy-privilege-manager-tests.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - test - Core API test Application - - - - - - - - - - http://tizen.org/privilege/location - - diff --git a/src/utc/privacy-privilege-manager/CMakeLists.txt b/src/utc/privacy-privilege-manager/CMakeLists.txt deleted file mode 100644 index 170068da0..000000000 --- a/src/utc/privacy-privilege-manager/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -SET(PKG_NAME "privacy-privilege-manager") - -SET(EXEC_NAME "tct-${PKG_NAME}-core") -SET(RPM_NAME "core-${PKG_NAME}-tests") - -SET(CAPI_LIB "capi-privacy-privilege-manager") -SET(TC_SOURCES - utc-privacy-privilege-manager.c -) - -PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED - ${CAPI_LIB} - capi-appfw-application - capi-system-info - glib-2.0 - bundle - dlog - -) - -INCLUDE_DIRECTORIES( - ${${CAPI_LIB}_INCLUDE_DIRS} -) - -ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE}) -TARGET_LINK_LIBRARIES(${EXEC_NAME} - ${${CAPI_LIB}_LIBRARIES} - bundle -) - -INSTALL(PROGRAMS ${EXEC_NAME} - DESTINATION ${BIN_DIR}/${RPM_NAME}/bin -) - -IF( DEFINED ASAN ) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address") -ELSE() -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fPIE -Wall") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie") -ENDIF() diff --git a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core.c b/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core.c deleted file mode 100644 index 09b003d42..000000000 --- a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core.c +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#include "tct_common.h" - -#ifdef MOBILE //Starts MOBILE -#include "tct-privacy-privilege-manager-core_mobile.h" -#endif //MOBILE //End MOBILE - -#ifdef WEARABLE //Starts WEARABLE -#include "tct-privacy-privilege-manager-core_wearable.h" -#endif //WEARABLE //End WEARABLE - -#ifdef TV //Starts TV -#include "tct-privacy-privilege-manager-core_tv.h" -#endif //TV //End TV - -#ifdef TIZENIOT //Starts TIZENIOT -#include "tct-privacy-privilege-manager-core_tizeniot.h" -#endif //TIZENIOT //End TIZENIOT - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - - - - - - - -static bool app_create(void *data) -{ - return true; -} - -static void app_control(app_control_h app_control, void *data) -{ - char* pszGetTCName = NULL; - int i=0, result=0, nRet=0; - nRet = app_control_get_extra_data(app_control, "testcase_name", &pszGetTCName); - if(nRet != APP_CONTROL_ERROR_NONE) - { - dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] app_control_get_extra_data returns error = %d", __FUNCTION__, __LINE__, nRet); - PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to fetch test case name: app_control_get_extra_data API call fails\\n", __FILE__, __LINE__); - PRINT_TC_RESULT("%d",1); - FREE_MEMORY_TC(pszGetTCName); - return; - } - - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName); - for ( i = 0; tc_array[i].name; i++ ) - { - if ( 0 == strncmp(pszGetTCName, tc_array[i].name, strlen(pszGetTCName)) ) - { - DUMP_UTC_ERRLOG(); - dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", pszGetTCName); - if ( tc_array[i].startup ) - { - tc_array[i].startup(); - } - dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", pszGetTCName); - - dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", pszGetTCName); - result = tc_array[i].function(); - dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result); - dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", pszGetTCName); - - dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", pszGetTCName); - if ( tc_array[i].cleanup ) - { - tc_array[i].cleanup(); - } - dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", pszGetTCName); - - CLOSE_UTC_ERRLOG(); - PRINT_TC_RESULT("%d",result); - FREE_MEMORY_TC(pszGetTCName); - return; - } - } - - dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName); - PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName); - PRINT_TC_RESULT("%d",1); - FREE_MEMORY_TC(pszGetTCName); - return; -} - -static void app_terminate(void *data) -{ - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is now Terminating", __FUNCTION__, __LINE__); -} - -int main(int argc, char *argv[]) -{ - int ret = 0; - - - ui_app_lifecycle_callback_s event_callback = {0,}; - event_callback.create = app_create; - event_callback.terminate = app_terminate; - event_callback.app_control = app_control; - - //setting gcda file location for coverage - setenv("GCOV_PREFIX","/tmp",1); - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Coverage *.gcda File location set to /tmp/home/abuild/rpmbuild/BUILD/ ", __FUNCTION__, __LINE__); - - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Main Function is Invoked", __FUNCTION__, __LINE__); - ret = ui_app_main(argc, argv, &event_callback, NULL); - if (ret != APP_ERROR_NONE) - { - dlog_print(DLOG_ERROR, "NativeTCT", "Application ui_app_main call gets failed. err = %d", ret); - PRINT_UTC_LOG("\\n[%s][Line : %d]Application ui_app_main call gets failed. err = %d\\n", __FILE__, __LINE__, ret); - PRINT_TC_RESULT("%d",1); - return ret; - } - - dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is Terminated", __FUNCTION__, __LINE__); - return ret; -} diff --git a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_mobile.h b/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_mobile.h deleted file mode 100755 index 9733ea257..000000000 --- a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_mobile.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ -#define __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ - -#include "testcase.h" -#include "tct_common.h" - -extern int utc_ppm_check_permission_n1(void); -extern int utc_ppm_check_permission_n2(void); -extern int utc_ppm_check_permission_n3(void); -extern int utc_ppm_check_permissions_n1(void); -extern int utc_ppm_check_permissions_n2(void); -extern int utc_ppm_check_permissions_n3(void); -extern int utc_ppm_request_permission_n1(void); -extern int utc_ppm_request_permission_n2(void); -extern int utc_ppm_request_permission_n3(void); -extern int utc_ppm_request_permissions_n1(void); -extern int utc_ppm_request_permissions_n2(void); -extern int utc_ppm_request_permissions_n3(void); - -testcase tc_array[] = { - {"utc_ppm_check_permission_n1", utc_ppm_check_permission_n1, NULL, NULL}, - {"utc_ppm_check_permission_n2", utc_ppm_check_permission_n2, NULL, NULL}, - {"utc_ppm_check_permission_n3", utc_ppm_check_permission_n3, NULL, NULL}, - {"utc_ppm_check_permissions_n1", utc_ppm_check_permissions_n1, NULL, NULL}, - {"utc_ppm_check_permissions_n2", utc_ppm_check_permissions_n2, NULL, NULL}, - {"utc_ppm_check_permissions_n3", utc_ppm_check_permissions_n3, NULL, NULL}, - {"utc_ppm_request_permission_n1", utc_ppm_request_permission_n1, NULL, NULL}, - {"utc_ppm_request_permission_n2", utc_ppm_request_permission_n2, NULL, NULL}, - {"utc_ppm_request_permission_n3", utc_ppm_request_permission_n3, NULL, NULL}, - {"utc_ppm_request_permissions_n1", utc_ppm_request_permissions_n1, NULL, NULL}, - {"utc_ppm_request_permissions_n2", utc_ppm_request_permissions_n2, NULL, NULL}, - {"utc_ppm_request_permissions_n3", utc_ppm_request_permissions_n3, NULL, NULL}, - {NULL, NULL} -}; - -#endif // __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ diff --git a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_tizeniot.h b/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_tizeniot.h deleted file mode 100755 index 9733ea257..000000000 --- a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_tizeniot.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ -#define __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ - -#include "testcase.h" -#include "tct_common.h" - -extern int utc_ppm_check_permission_n1(void); -extern int utc_ppm_check_permission_n2(void); -extern int utc_ppm_check_permission_n3(void); -extern int utc_ppm_check_permissions_n1(void); -extern int utc_ppm_check_permissions_n2(void); -extern int utc_ppm_check_permissions_n3(void); -extern int utc_ppm_request_permission_n1(void); -extern int utc_ppm_request_permission_n2(void); -extern int utc_ppm_request_permission_n3(void); -extern int utc_ppm_request_permissions_n1(void); -extern int utc_ppm_request_permissions_n2(void); -extern int utc_ppm_request_permissions_n3(void); - -testcase tc_array[] = { - {"utc_ppm_check_permission_n1", utc_ppm_check_permission_n1, NULL, NULL}, - {"utc_ppm_check_permission_n2", utc_ppm_check_permission_n2, NULL, NULL}, - {"utc_ppm_check_permission_n3", utc_ppm_check_permission_n3, NULL, NULL}, - {"utc_ppm_check_permissions_n1", utc_ppm_check_permissions_n1, NULL, NULL}, - {"utc_ppm_check_permissions_n2", utc_ppm_check_permissions_n2, NULL, NULL}, - {"utc_ppm_check_permissions_n3", utc_ppm_check_permissions_n3, NULL, NULL}, - {"utc_ppm_request_permission_n1", utc_ppm_request_permission_n1, NULL, NULL}, - {"utc_ppm_request_permission_n2", utc_ppm_request_permission_n2, NULL, NULL}, - {"utc_ppm_request_permission_n3", utc_ppm_request_permission_n3, NULL, NULL}, - {"utc_ppm_request_permissions_n1", utc_ppm_request_permissions_n1, NULL, NULL}, - {"utc_ppm_request_permissions_n2", utc_ppm_request_permissions_n2, NULL, NULL}, - {"utc_ppm_request_permissions_n3", utc_ppm_request_permissions_n3, NULL, NULL}, - {NULL, NULL} -}; - -#endif // __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ diff --git a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_wearable.h b/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_wearable.h deleted file mode 100755 index 9733ea257..000000000 --- a/src/utc/privacy-privilege-manager/tct-privacy-privilege-manager-core_wearable.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ -#define __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ - -#include "testcase.h" -#include "tct_common.h" - -extern int utc_ppm_check_permission_n1(void); -extern int utc_ppm_check_permission_n2(void); -extern int utc_ppm_check_permission_n3(void); -extern int utc_ppm_check_permissions_n1(void); -extern int utc_ppm_check_permissions_n2(void); -extern int utc_ppm_check_permissions_n3(void); -extern int utc_ppm_request_permission_n1(void); -extern int utc_ppm_request_permission_n2(void); -extern int utc_ppm_request_permission_n3(void); -extern int utc_ppm_request_permissions_n1(void); -extern int utc_ppm_request_permissions_n2(void); -extern int utc_ppm_request_permissions_n3(void); - -testcase tc_array[] = { - {"utc_ppm_check_permission_n1", utc_ppm_check_permission_n1, NULL, NULL}, - {"utc_ppm_check_permission_n2", utc_ppm_check_permission_n2, NULL, NULL}, - {"utc_ppm_check_permission_n3", utc_ppm_check_permission_n3, NULL, NULL}, - {"utc_ppm_check_permissions_n1", utc_ppm_check_permissions_n1, NULL, NULL}, - {"utc_ppm_check_permissions_n2", utc_ppm_check_permissions_n2, NULL, NULL}, - {"utc_ppm_check_permissions_n3", utc_ppm_check_permissions_n3, NULL, NULL}, - {"utc_ppm_request_permission_n1", utc_ppm_request_permission_n1, NULL, NULL}, - {"utc_ppm_request_permission_n2", utc_ppm_request_permission_n2, NULL, NULL}, - {"utc_ppm_request_permission_n3", utc_ppm_request_permission_n3, NULL, NULL}, - {"utc_ppm_request_permissions_n1", utc_ppm_request_permissions_n1, NULL, NULL}, - {"utc_ppm_request_permissions_n2", utc_ppm_request_permissions_n2, NULL, NULL}, - {"utc_ppm_request_permissions_n3", utc_ppm_request_permissions_n3, NULL, NULL}, - {NULL, NULL} -}; - -#endif // __TCT_PRIVACY_PRIVILEGE_MANAGER_NATIVE_H__ diff --git a/src/utc/privacy-privilege-manager/utc-privacy-privilege-manager.c b/src/utc/privacy-privilege-manager/utc-privacy-privilege-manager.c deleted file mode 100755 index 364a26655..000000000 --- a/src/utc/privacy-privilege-manager/utc-privacy-privilege-manager.c +++ /dev/null @@ -1,249 +0,0 @@ -// -// Copyright (c) 2014 - 2018 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#include "assert.h" - -#include - -static const char *location_privilege = "http://tizen.org/privilege/location"; - -/** - * @testcase utc_ppm_check_permission_n1 - * @since_tizen 4.0 - * @description Check permission for a given privilege - * - check status of privilege when the privilege parameter is NULL - */ -int utc_ppm_check_permission_n1(void) -{ - int ret; - ppm_check_result_e result = PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW; - ret = ppm_check_permission(NULL, &result); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - assert_eq(result, PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW); - - return 0; -} - -/** - * @testcase utc_ppm_check_permission_n2 - * @since_tizen 4.0 - * @description Check permission for a given privilege - * - check status of privilege when the privilege parameter is - * an empty string - */ -int utc_ppm_check_permission_n2(void) -{ - int ret; - ppm_check_result_e result = PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW; - - ret = ppm_check_permission("", &result); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - assert_eq(result, PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW); - - return 0; -} - -/** - * @testcase utc_ppm_check_permission_n3 - * @since_tizen 4.0 - * @description Check permission for a given privilege - * - check status of privilege when the result parameter is NULL - */ -int utc_ppm_check_permission_n3(void) -{ - int ret; - - ret = ppm_check_permission(location_privilege, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_ppm_check_permissions_n1 - * @since_tizen 5.0 - * @description Check permission for a given privileges - * - check status of privileges when the privileges parameter is NULL - */ -int utc_ppm_check_permissions_n1(void) -{ - int ret; - ppm_check_result_e result = PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW; - ret = ppm_check_permissions(NULL, 0, &result); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - assert_eq(result, PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW); - - return 0; -} - -/** - * @testcase utc_ppm_check_permissions_n2 - * @since_tizen 5.0 - * @description Check permission for a given privileges - * - check status of privileges when the privileges parameter is - * an empty string - */ -int utc_ppm_check_permissions_n2(void) -{ - int ret; - ppm_check_result_e result = PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW; - const char* empty_privilege = ""; - ret = ppm_check_permissions(&empty_privilege, 1, &result); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - assert_eq(result, PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW); - - return 0; -} - -/** - * @testcase utc_ppm_check_permissions_n3 - * @since_tizen 5.0 - * @description Check permission for a given privileges - * - check status of privileges when the result parameter is NULL - */ -int utc_ppm_check_permissions_n3(void) -{ - int ret; - - ret = ppm_check_permissions(&location_privilege, 1, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -void ppm_request_response_test_cb(ppm_call_cause_e cause, - ppm_request_result_e result, - const char *privilege, - void *user_data) -{ -} - -/** - * @testcase utc_ppm_request_permission_n1 - * @since_tizen 4.0 - * @description Request user permission - * - request permission when the privilege parameter is NULL - */ -int utc_ppm_request_permission_n1(void) -{ - int ret; - - ret = ppm_request_permission(NULL, ppm_request_response_test_cb, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_ppm_request_permission_n2 - * @since_tizen 4.0 - * @description Request user permission - * - request permission when the privilege parameter is an empty - * string - */ -int utc_ppm_request_permission_n2(void) -{ - int ret; - - ret = ppm_request_permission("", ppm_request_response_test_cb, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_ppm_request_permission_n3 - * @since_tizen 4.0 - * @description Request user permission - * - request permission when the callback parameter is NULL - */ -int utc_ppm_request_permission_n3(void) -{ - int ret; - - ret = ppm_request_permission(location_privilege, NULL, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -void ppm_request_multiple_response_test_cb(ppm_call_cause_e cause, - ppm_request_result_e *results, - const char **privileges, - size_t privileges_count, - void *user_data) -{ -} - -/** - * @testcase utc_ppm_request_permissions_n1 - * @since_tizen 5.0 - * @description Request user permissions - * - request permissions when the privilege parameter is NULL - */ -int utc_ppm_request_permissions_n1(void) -{ - int ret; - - ret = ppm_request_permissions(NULL, 0, ppm_request_multiple_response_test_cb, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_ppm_request_permissions_n2 - * @since_tizen 5.0 - * @description Request user permissions - * - request permissions when the privilege parameter is an empty - * string - */ -int utc_ppm_request_permissions_n2(void) -{ - int ret; - const char* empty_privilege = ""; - ret = ppm_request_permissions(&empty_privilege, 1, ppm_request_response_test_cb, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -} - -/** - * @testcase utc_ppm_request_permissions_n3 - * @since_tizen 5.0 - * @description Request user permissions - * - request permissions when the callback parameter is NULL - */ -int utc_ppm_request_permissions_n3(void) -{ - int ret; - - ret = ppm_request_permissions(&location_privilege, 1, NULL, NULL); - - assert_eq(ret, PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER); - - return 0; -}