4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the
8 * Free Software Foundation; either version 2.1 of the License, or (at your option)
11 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 * License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this library; if not, write to the Free Software Foundation, Inc., 51
18 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 * @file utc_webkit2_ewk_context_cookies_policy_set_func.c
24 * @author Yuni Jeong <yhnet.jung@samsung.com>
26 * @brief Tests EWK function ewk_context_cookies_policy_set()
29 /* Define those macros _before_ you include the utc_webkit2_ewk.h header file. */
30 #define TESTED_FUN_NAME ewk_context_cookies_policy_set
31 #define POSITIVE_TEST_FUN_NUM 3
32 #define NEGATIVE_TEST_FUN_NUM 3
34 #include "utc_webkit2_ewk.h"
36 /* Startup and cleanup functions */
37 static void startup(void)
39 utc_webkit2_ewk_test_init();
42 static void cleanup(void)
44 utc_webkit2_ewk_test_end();
48 * @brief Checking whether cookies's policy is set to EWK_COOKIE_JAR_ACCEPT_NEVER.
52 Eina_Bool result = ewk_context_cookies_policy_set(ewk_context_default_get(), EWK_COOKIE_JAR_ACCEPT_NEVER);
56 utc_check_eq(result, EINA_TRUE);
60 * @brief Checking whether cookies's policy is set to EWK_COOKIE_JAR_ACCEPT_ALWAYS.
64 Eina_Bool result = ewk_context_cookies_policy_set(ewk_context_default_get(), EWK_COOKIE_JAR_ACCEPT_ALWAYS);
68 utc_check_eq(result, EINA_TRUE);
72 * @brief Checking whether cookies's policy is set to EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY.
76 Eina_Bool result = ewk_context_cookies_policy_set(ewk_context_default_get(), EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY);
80 utc_check_eq(result, EINA_TRUE);
84 * @brief Checking whether function works properly in case of NULL of a context.
88 Eina_Bool result = ewk_context_cookies_policy_set(NULL, EWK_COOKIE_JAR_ACCEPT_NEVER);
92 utc_check_ne(result, EINA_TRUE);
96 * @brief Checking whether function works properly in case of NULL of a context.
100 Eina_Bool result = ewk_context_cookies_policy_set(NULL, EWK_COOKIE_JAR_ACCEPT_ALWAYS);
104 utc_check_ne(result, EINA_TRUE);}
107 * @brief Checking whether function works properly in case of NULL of a context.
111 Eina_Bool result = ewk_context_cookies_policy_set(NULL, EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY);
115 utc_check_ne(result, EINA_TRUE);