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. */
6 #include "utc_blink_ewk_notification_test_base.h"
8 class utc_blink_ewk_notification_silent_get : public utc_blink_ewk_notification_test_base {
10 utc_blink_ewk_notification_silent_get()
11 : silent(false), notification_silent_ref(true) {}
13 ~utc_blink_ewk_notification_silent_get() override {}
15 void NotificationShow(Ewk_Notification* notification) override {
16 silent = ewk_notification_silent_get(notification);
17 EventLoopStop(Success);
22 const bool notification_silent_ref;
26 * @brief Positive test case for ewk_notification_silent_get(). Text returned by api is compared against expected text and result is set in notificationShow()
28 TEST_F(utc_blink_ewk_notification_silent_get, POS_TEST)
30 ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
31 ASSERT_EQ(Success, EventLoopStart());
32 ASSERT_EQ(notification_silent_ref, silent);
36 * @brief Checking whether function works properly in case of nullptr of a webview.
38 TEST_F(utc_blink_ewk_notification_silent_get, NEG_TEST)
40 ASSERT_FALSE(ewk_notification_silent_get(nullptr));