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_notification_test_base.h"
7 class utc_blink_ewk_security_origin_host_get : public utc_blink_ewk_notification_test_base
10 void NotificationShow(Ewk_Notification* notification) override {
11 const Ewk_Security_Origin* org = ewk_notification_security_origin_get(notification);
12 MainLoopResult result = Failure;
14 const char* host = ewk_security_origin_host_get(org);
15 if (host && !strcmp(host, ""))
18 EventLoopStop(result);
23 * @brief Positive test case for ewk_security_origin_protocol_get().
25 TEST_F(utc_blink_ewk_security_origin_host_get, POS_TEST)
27 ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
28 ASSERT_EQ(Success, EventLoopStart());
32 * @brief Checking whether function works properly in case of nullptr as origin.
34 TEST_F(utc_blink_ewk_security_origin_host_get, NEG_TEST)
36 ASSERT_FALSE(ewk_security_origin_host_get(nullptr));