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 #include "utc_blink_ewk_base.h"
7 class utc_blink_ewk_settings_default_encoding_set : public utc_blink_ewk_base {
9 static const char* SET_DEFAULT_ENCODING;
12 const char* utc_blink_ewk_settings_default_encoding_set::SET_DEFAULT_ENCODING = "utf-8";
16 * @brief Positive test case for ewk_settings_default_encoding_set(). Set the encoding, get the value and then compare.
18 TEST_F(utc_blink_ewk_settings_default_encoding_set, POS_TEST)
20 Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
25 Eina_Bool result = ewk_settings_default_encoding_set(settings, SET_DEFAULT_ENCODING);
29 const char* defaultEncoding = ewk_settings_default_encoding_get(settings);
30 if (!defaultEncoding) {
33 EXPECT_STREQ(defaultEncoding, SET_DEFAULT_ENCODING);
37 * @brief Negative test case for ewk_settings_default_encoding_set(). Check if it works fine with NULL as settings.
39 TEST_F(utc_blink_ewk_settings_default_encoding_set, NEG_TEST)
41 Eina_Bool result = ewk_settings_default_encoding_set(NULL, SET_DEFAULT_ENCODING);
42 EXPECT_EQ(result, EINA_FALSE);