1 // Copyright 2016 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 #include "utc_blink_ewk_base.h"
7 class utc_blink_ewk_settings_dom_paste_allowed_get_func
8 : public utc_blink_ewk_base {
10 utc_blink_ewk_settings_dom_paste_allowed_get_func()
11 : settings_(nullptr) {
14 void PostSetUp() override {
15 settings_ = ewk_view_settings_get(GetEwkWebView());
16 ASSERT_TRUE(settings_ != nullptr);
19 Ewk_Settings* settings_;
23 * @brief Tests whether the function works properly for case 2nd param is TRUE.
25 TEST_F(utc_blink_ewk_settings_dom_paste_allowed_get_func, POS_ENABLE_TRUE) {
26 ASSERT_TRUE(ewk_settings_dom_paste_allowed_set(settings_, EINA_TRUE));
27 EXPECT_TRUE(ewk_settings_dom_paste_allowed_get(settings_));
31 * @brief Tests whether the function works properly for case 2nd param is FALSE.
33 TEST_F(utc_blink_ewk_settings_dom_paste_allowed_get_func, POS_ENABLE_FALSE) {
34 ASSERT_TRUE(ewk_settings_dom_paste_allowed_set(settings_, EINA_FALSE));
35 EXPECT_FALSE(ewk_settings_dom_paste_allowed_get(settings_));
39 * @brief Tests whether the function works properly
40 * for case Ewk_Settings object is NULL.
42 TEST_F(utc_blink_ewk_settings_dom_paste_allowed_get_func,
43 NEG_INVALID_SETTINGS_PARAM) {
44 EXPECT_FALSE(ewk_settings_dom_paste_allowed_get(nullptr));