1 // Copyright 2015 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_notification_test_base.h"
7 class utc_blink_ewk_notification_icon_get : public utc_blink_ewk_notification_test_base {
9 utc_blink_ewk_notification_icon_get()
10 : notification_icon(NULL)
13 void NotificationShow(Ewk_Notification* notification) override
15 notification_icon = ewk_notification_icon_get(notification, GetEwkEvas());
16 EventLoopStop(Success);
20 Evas_Object* notification_icon;
24 * @brief Positive test case for ewk_notification_icon_get()
26 TEST_F(utc_blink_ewk_notification_icon_get, POS_TEST)
28 ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
29 ASSERT_EQ(Success, EventLoopStart());
30 ASSERT_TRUE(notification_icon);
31 // Skia and Efl may decode png in different way, we add fuzziness of 3 points
32 // difference between pixel values
33 ASSERT_TRUE(CompareEvasImageWithResource(notification_icon, "/common/logo.png", 3));
34 evas_object_del(notification_icon);
38 * @brief Checking whether function works properly in case of nullptr value pass
40 TEST_F(utc_blink_ewk_notification_icon_get, NEG_TEST)
42 ASSERT_FALSE(ewk_notification_icon_get(nullptr, nullptr));
43 ASSERT_FALSE(ewk_notification_icon_get(nullptr, GetEwkEvas()));