[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_context_cache_disabled_set_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 #include "utc_blink_ewk_base.h"
6
7 class utc_blink_ewk_context_cache_disabled_set : public utc_blink_ewk_base
8 {
9 protected:
10 };
11
12 /**
13  * @brief Checking whether cache is cleared.
14  */
15 TEST_F(utc_blink_ewk_context_cache_disabled_set, POS_TEST1)
16 {
17   Ewk_Context* context = ewk_context_default_get();
18   if (!context) {
19     FAIL();
20   }
21   Eina_Bool result = ewk_context_cache_disabled_set(context, true);
22   if (!result) {
23     FAIL();
24   }
25   EXPECT_EQ(result, EINA_TRUE);
26 }
27
28 TEST_F(utc_blink_ewk_context_cache_disabled_set, POS_TEST2)
29 {
30   Eina_Bool result = ewk_context_cache_disabled_set(ewk_context_default_get(), false);
31   if (!result) {
32     FAIL();
33   }
34   EXPECT_EQ(result, EINA_TRUE);
35 }
36 /**
37  * @brief Checking whether function works properly in case of NULL of a context.
38  */
39 TEST_F(utc_blink_ewk_context_cache_disabled_set, NEG_TEST)
40 {
41   Eina_Bool result = ewk_context_cache_disabled_set(NULL, true);
42   if (result) {
43     FAIL();
44   }
45   EXPECT_NE(result, EINA_TRUE);
46 }