Fixed a problem that remember popup does not disappear
[framework/web/webkit-efl.git] / TC / unit_test / webkit2 / utc_webkit2_ewk_view_horizontal_panning_hold_set_func.c
1 /*\r
2  * WebKit2 EFL\r
3  *\r
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
5  *\r
6  * This library is free software; you can redistribute it and/or modify it under\r
7  * the terms of the GNU Lesser General Public License as published by the\r
8  * Free Software Foundation; either version 2.1 of the License, or (at your option)\r
9  * any later version.\r
10  *\r
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY\r
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public\r
14  * License for more details.\r
15  *\r
16  * You should have received a copy of the GNU Lesser General Public License\r
17  * along with this library; if not, write to the Free Software Foundation, Inc., 51\r
18  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r
19  *\r
20  */\r
21 \r
22 /**\r
23  * @file utc_webkit2_ewk_view_horizontal_panning_hold_set.cpp\r
24  * @author Shubhank\r
25  * @date 12-06-2012\r
26  * @brief Tests EWK function ewk_view_horizontal_panning_hold_set()\r
27  */\r
28 \r
29 #define TESTED_FUN_NAME ewk_view_horizontal_panning_hold_set\r
30 \r
31 #define POSITIVE_TEST_FUN_NUM 2\r
32 #define NEGATIVE_TEST_FUN_NUM 1\r
33 \r
34 #include "utc_webkit2_ewk.h"\r
35 \r
36 #ifndef NULL\r
37 #define NULL    0x0\r
38 #endif\r
39 \r
40 \r
41 /* Startup function */\r
42 static void startup(void)\r
43 {\r
44     utc_webkit2_ewk_test_init();\r
45 }\r
46 \r
47 /* Cleanup function */\r
48 static void cleanup(void)\r
49 {\r
50     utc_webkit2_ewk_test_end();\r
51 }\r
52 \r
53 /**\r
54 * @brief Check whether it is possible to forward when setting panning functionality on or off\r
55 */\r
56 POS_TEST_FUN(1)\r
57 {\r
58     ewk_view_horizontal_panning_hold_set(test_view.webview,EINA_TRUE);\r
59     utc_check_eq(ewk_view_horizontal_panning_hold_get(test_view.webview), EINA_TRUE);\r
60 }\r
61 \r
62 /**\r
63 * @brief Check whether it is possible to forward when setting panning functionality on or off\r
64 */\r
65 POS_TEST_FUN(2)\r
66 {\r
67     ewk_view_horizontal_panning_hold_set(test_view.webview,EINA_FALSE);\r
68     utc_check_eq(ewk_view_horizontal_panning_hold_get(test_view.webview), EINA_FALSE);\r
69 }\r
70 \r
71 \r
72 /**\r
73 * @brief Checking whether function works properly in case of NULL of a webview.\r
74 */\r
75 NEG_TEST_FUN(1)\r
76 {\r
77     ewk_view_horizontal_panning_hold_set(test_view.webview,EINA_TRUE);\r
78     ewk_view_horizontal_panning_hold_set(NULL,EINA_FALSE);\r
79     utc_check_eq(ewk_view_horizontal_panning_hold_get(test_view.webview), EINA_TRUE);\r
80 }\r