<operation name="http://tizen.org/appcontrol/operation/action"/>
<uri name="https"/>
</app-control>
+ <res-control resource-type="hello.rpk"></res-control>
</ui-application>
<privileges>
<privilege>http://tizen.org/privilege/alarm.set</privilege>
echo '</manifest>' >> tizen-manifest.xml
fi
+ # add res-control attribute for application-utc
+ if echo "$line" | grep -q "<res-control"; then
+ echo "module name : "
+ echo $MODULE_NAME
+ cat tizen-manifest.xml
+ if [ $MODULE_NAME == "application" ]; then
+ echo "adjust res control"
+ sed -i '/<\/ui-application>/d' tizen-manifest.xml
+ echo $line >> tizen-manifest.xml
+ echo '</ui-application>' >> tizen-manifest.xml
+ fi
+ fi
+
if [[ $line =~ "</ui-application>" ]] || [[ $line =~ "</service-application>" ]] || [[ $line =~ "</widget-application>" ]]
then
sed -i '/<\/manifest>/d' tizen-manifest.xml
extern int utc_application_app_control_uri_query_foreach_p(void);
extern int utc_application_app_control_uri_query_foreach_n1(void);
extern int utc_application_app_control_uri_query_foreach_n2(void);
+extern int utc_application_app_get_res_control_allowed_resource_path_p(void);
+extern int utc_application_app_get_res_control_allowed_resource_path_n1(void);
+extern int utc_application_app_get_res_control_allowed_resource_path_n2(void);
+extern int utc_application_app_get_res_control_global_resource_path_p(void);
+extern int utc_application_app_get_res_control_global_resource_path_n1(void);
+extern int utc_application_app_get_res_control_global_resource_path_n2(void);
testcase tc_array[] = {
{"utc_application_app_watchdog_timer_disable_n", utc_application_app_watchdog_timer_disable_n, NULL, NULL},
{"utc_application_app_watchdog_timer_kick_p", utc_application_app_watchdog_timer_kick_p, utc_application_app_watchdog_timer_kick_p_startup, utc_application_app_watchdog_timer_kick_p_cleanup},
{"utc_application_app_watchdog_timer_kick_n", utc_application_app_watchdog_timer_kick_n, NULL, NULL},
+ {"utc_application_app_get_res_control_allowed_resource_path_p", utc_application_app_get_res_control_allowed_resource_path_p, NULL, NULL},
+ {"utc_application_app_get_res_control_allowed_resource_path_n1", utc_application_app_get_res_control_allowed_resource_path_n1, NULL, NULL},
+ {"utc_application_app_get_res_control_allowed_resource_path_n2", utc_application_app_get_res_control_allowed_resource_path_n2, NULL, NULL},
+ {"utc_application_app_get_res_control_global_resource_path_p", utc_application_app_get_res_control_global_resource_path_p, NULL, NULL},
+ {"utc_application_app_get_res_control_global_resource_path_n1", utc_application_app_get_res_control_global_resource_path_n1, NULL, NULL},
+ {"utc_application_app_get_res_control_global_resource_path_n2", utc_application_app_get_res_control_global_resource_path_n2, NULL, NULL},
{NULL, NULL}
};
extern int utc_application_app_control_uri_query_foreach_p(void);
extern int utc_application_app_control_uri_query_foreach_n1(void);
extern int utc_application_app_control_uri_query_foreach_n2(void);
+extern int utc_application_app_get_res_control_allowed_resource_path_p(void);
+extern int utc_application_app_get_res_control_allowed_resource_path_n1(void);
+extern int utc_application_app_get_res_control_allowed_resource_path_n2(void);
+extern int utc_application_app_get_res_control_global_resource_path_p(void);
+extern int utc_application_app_get_res_control_global_resource_path_n1(void);
+extern int utc_application_app_get_res_control_global_resource_path_n2(void);
testcase tc_array[] = {
{"utc_application_app_watchdog_timer_disable_n", utc_application_app_watchdog_timer_disable_n, NULL, NULL},
{"utc_application_app_watchdog_timer_kick_p", utc_application_app_watchdog_timer_kick_p, utc_application_app_watchdog_timer_kick_p_startup, utc_application_app_watchdog_timer_kick_p_cleanup},
{"utc_application_app_watchdog_timer_kick_n", utc_application_app_watchdog_timer_kick_n, NULL, NULL},
+ {"utc_application_app_get_res_control_allowed_resource_path_p", utc_application_app_get_res_control_allowed_resource_path_p, NULL, NULL},
+ {"utc_application_app_get_res_control_allowed_resource_path_n1", utc_application_app_get_res_control_allowed_resource_path_n1, NULL, NULL},
+ {"utc_application_app_get_res_control_allowed_resource_path_n2", utc_application_app_get_res_control_allowed_resource_path_n2, NULL, NULL},
+ {"utc_application_app_get_res_control_global_resource_path_p", utc_application_app_get_res_control_global_resource_path_p, NULL, NULL},
+ {"utc_application_app_get_res_control_global_resource_path_n1", utc_application_app_get_res_control_global_resource_path_n1, NULL, NULL},
+ {"utc_application_app_get_res_control_global_resource_path_n2", utc_application_app_get_res_control_global_resource_path_n2, NULL, NULL},
{NULL, NULL}
};
return 0;
}
+
+/**
+ * @testcase utc_application_app_get_res_control_allowed_resource_path_p
+ * @since_tizen 7.5
+ * @type Positive
+ * @description Gets the absolute path to the shated data directory of the application
+ * which is used to share data with other applications.
+ * @scenario Calls the app_get_res_control_allowed_resource_path() and then checks the return value.
+ */
+int utc_application_app_get_res_control_allowed_resource_path_p(void)
+{
+ const char *resource_type = "hello.rpk";
+ char *path;
+ int ret;
+
+ ret = app_get_res_control_allowed_resource_path(resource_type, &path);
+ assert_eq_with_exit(ret, APP_ERROR_NONE);
+ free(path);
+ normal_exit(0);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_application_app_get_res_control_allowed_resource_path_n1
+ * @since_tizen 7.5
+ * @type Negative
+ * @description Gets the absolute path to the shated data directory of the application
+ * which is used to share data with other applications.
+ * @scenario Calls the app_get_res_control_allowed_resource_path() and then checks the return value.
+ */
+int utc_application_app_get_res_control_allowed_resource_path_n1(void)
+{
+ char *path;
+ int ret;
+
+ ret = app_get_res_control_allowed_resource_path(NULL, &path);
+ assert_neq_with_exit(ret, APP_ERROR_NONE);
+ normal_exit(0);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_application_app_get_res_control_allowed_resource_path_n2
+ * @since_tizen 7.5
+ * @type Negative
+ * @description Gets the absolute path to the shated data directory of the application
+ * which is used to share data with other applications.
+ * @scenario Calls the app_get_res_control_allowed_resource_path() and then checks the return value.
+ */
+int utc_application_app_get_res_control_allowed_resource_path_n2(void)
+{
+ const char *invalid_resource_type = "invalid";
+ char *path;
+ int ret;
+
+ ret = app_get_res_control_allowed_resource_path(invalid_resource_type, &path);
+ assert_neq_with_exit(ret, APP_ERROR_NONE);
+ normal_exit(0);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_application_app_get_res_control_global_resource_path_p
+ * @since_tizen 7.5
+ * @type Positive
+ * @description Gets the absolute path to the shated data directory of the application
+ * which is used to share data with other applications.
+ * @scenario Calls the app_get_res_control_global_resource_path() and then checks the return value.
+ */
+int utc_application_app_get_res_control_global_resource_path_p(void)
+{
+ const char *resource_type = "hello.rpk";
+ char *path;
+ int ret;
+
+ ret = app_get_res_control_global_resource_path(resource_type, &path);
+ assert_eq_with_exit(ret, APP_ERROR_NONE);
+ free(path);
+ normal_exit(0);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_application_app_get_res_control_global_resource_path_n1
+ * @since_tizen 7.5
+ * @type Negative
+ * @description Gets the absolute path to the shated data directory of the application
+ * which is used to share data with other applications.
+ * @scenario Calls the app_get_res_control_global_resource_path() and then checks the return value.
+ */
+int utc_application_app_get_res_control_global_resource_path_n1(void)
+{
+ char *path;
+ int ret;
+
+ ret = app_get_res_control_global_resource_path(NULL, &path);
+ assert_neq_with_exit(ret, APP_ERROR_NONE);
+ normal_exit(0);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_application_app_get_res_control_global_resource_path_n2
+ * @since_tizen 7.5
+ * @type Negative
+ * @description Gets the absolute path to the shated data directory of the application
+ * which is used to share data with other applications.
+ * @scenario Calls the app_get_res_control_global_resource_path() and then checks the return value.
+ */
+int utc_application_app_get_res_control_global_resource_path_n2(void)
+{
+ const char *invalid_resource_type = "invalid";
+ char *path;
+ int ret;
+
+ ret = app_get_res_control_global_resource_path(invalid_resource_type, &path);
+ assert_neq_with_exit(ret, APP_ERROR_NONE);
+ normal_exit(0);
+
+ return 0;
+}