[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_view_custom_header_remove_func.cpp
1 // Copyright 2014 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /* Define those macros _before_ you include the utc_blink_ewk.h header file. */
6
7 #include "utc_blink_ewk_base.h"
8
9 class utc_blink_ewk_view_custom_header_remove : public utc_blink_ewk_base {
10 protected:
11   static const char* test_name;
12   static const char* test_value;
13   static const char* testnull_name;
14   static const char* testnull_value;
15   static const char* testnotexisting_name;
16 };
17
18 const char* utc_blink_ewk_view_custom_header_remove::test_name = "TestRemove-Name";
19 const char* utc_blink_ewk_view_custom_header_remove::test_value = "TestRemove-Value";
20 const char* utc_blink_ewk_view_custom_header_remove::testnull_name = "TestRemoveNull-Name";
21 const char* utc_blink_ewk_view_custom_header_remove::testnull_value = "TestRemoveNull-Value";
22 const char* utc_blink_ewk_view_custom_header_remove::testnotexisting_name = "TestRemoveNotExisting-Name";
23
24
25 /**
26  * @brief Checking whether the custom header is removed properly.
27  */
28 TEST_F(utc_blink_ewk_view_custom_header_remove, POS_TEST)
29 {
30   ewk_view_custom_header_add(GetEwkWebView(), test_name, test_value);
31   Eina_Bool result = ewk_view_custom_header_remove(GetEwkWebView(), test_name);
32   EXPECT_EQ(result, EINA_TRUE);
33 }
34
35 /**
36  * @brief Checking whether function works properly in case of NULL of a webview.
37  */
38 TEST_F(utc_blink_ewk_view_custom_header_remove, NEG_TEST1)
39 {
40   ewk_view_custom_header_add(GetEwkWebView(), testnull_name, testnull_value);
41   Eina_Bool result = ewk_view_custom_header_remove(NULL, testnull_name);
42   EXPECT_NE(result, EINA_TRUE);
43 }
44
45 TEST_F(utc_blink_ewk_view_custom_header_remove, NEG_TEST2)
46 {
47   Eina_Bool result = ewk_view_custom_header_remove(GetEwkWebView(), testnotexisting_name);
48   EXPECT_NE(result, EINA_TRUE);
49 }