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.
5 /* Define those macros _before_ you include the utc_blink_ewk.h header file. */
7 #include "utc_blink_ewk_base.h"
9 class utc_blink_ewk_view_custom_header_remove : public utc_blink_ewk_base {
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;
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";
26 * @brief Checking whether the custom header is removed properly.
28 TEST_F(utc_blink_ewk_view_custom_header_remove, POS_TEST)
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);
36 * @brief Checking whether function works properly in case of NULL of a webview.
38 TEST_F(utc_blink_ewk_view_custom_header_remove, NEG_TEST1)
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);
45 TEST_F(utc_blink_ewk_view_custom_header_remove, NEG_TEST2)
47 Eina_Bool result = ewk_view_custom_header_remove(GetEwkWebView(), testnotexisting_name);
48 EXPECT_NE(result, EINA_TRUE);