temporary fix - add Ewk_Context to ewk_notification_showed to make WRT compile
authorTomasz Czekala <t.czekala@partner.samsung.com>
Fri, 13 Feb 2015 12:48:29 +0000 (13:48 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Context was not used and we removed it, but WRT assumes that
ewk_notification_showed takes context as one of the parameters
and after our Notification API refactoring it doesn't compile.
WRT will update to the new API, but for now we need this temporary
fix for it to work.
Reviewed by: Piotr Tworek, joonhwan kwon

Change-Id: I6d1fad4c07c4bdfdbef3511864a4b71abb71b429
Signed-off-by: Tomasz Czekala <t.czekala@partner.samsung.com>
tizen_src/ewk/efl_integration/public/ewk_notification.cc
tizen_src/ewk/efl_integration/public/ewk_notification.h
tizen_src/ewk/unittest/utc_blink_ewk_notification_callbacks_set_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_clicked_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_closed_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_showed_func.cpp

index f4815c5..9a527e4 100644 (file)
@@ -153,7 +153,7 @@ const Ewk_Security_Origin* ewk_notification_security_origin_get(const Ewk_Notifi
   return static_cast<const Ewk_Security_Origin*>(ewk_notification->GetSecurityOrigin());
 }
 
-Eina_Bool ewk_notification_showed(uint64_t notification_id)
+Eina_Bool ewk_notification_showed(Ewk_Context*, uint64_t notification_id)
 {
   ContentBrowserClientEfl* cbce = GetContentBrowserClient();
   EINA_SAFETY_ON_NULL_RETURN_VAL(cbce, EINA_FALSE);
index a02b278..15c6d03 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <Eina.h>
 #include <Evas.h>
+#include "ewk_context.h"
 #include "ewk_export.h"
 #include "ewk_security_origin.h"
 
@@ -180,9 +181,12 @@ EAPI const Ewk_Security_Origin* ewk_notification_security_origin_get(const Ewk_N
 /**
  * Notify that notification is showed.
  *
+ * @param context context - not used
  * @param notification_id identifier of notification
+ *
+ * @return true is the notification_id was not added earlier, false otherwise
  */
-EAPI Eina_Bool ewk_notification_showed(uint64_t notification_id);
+EAPI Eina_Bool ewk_notification_showed(Ewk_Context* context, uint64_t notification_id);
 
 /**
  * Notify that notification was closed.
index 3536b19..48ed4df 100755 (executable)
@@ -54,7 +54,7 @@ TEST_F(utc_blink_ewk_notification_callbacks_set, POS_TEST)
   ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_TRUE(notification_id);
-  ASSERT_TRUE(ewk_notification_showed(notification_id));
+  ASSERT_TRUE(ewk_notification_showed(nullptr, notification_id));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_STREQ("notification.show", console_message.c_str());
   ewk_view_script_execute(GetEwkWebView(), "new Notification('Title', {tag: 'replace_tag'});", nullptr, nullptr);
index ff209b7..4e25b6d 100644 (file)
@@ -42,7 +42,7 @@ TEST_F(utc_blink_ewk_notification_clicked, POS_TEST)
   ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_TRUE(notification_id);
-  ASSERT_TRUE(ewk_notification_showed(notification_id));
+  ASSERT_TRUE(ewk_notification_showed(nullptr, notification_id));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_STREQ("notification.show", console_message.c_str());
   ASSERT_TRUE(ewk_notification_clicked(notification_id));
index d8a3985..fc6334e 100755 (executable)
@@ -41,7 +41,7 @@ TEST_F(utc_blink_ewk_notification_closed, by_user_true)
   ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_TRUE(notification_id);
-  ASSERT_TRUE(ewk_notification_showed(notification_id));
+  ASSERT_TRUE(ewk_notification_showed(nullptr, notification_id));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_STREQ("notification.show", console_message.c_str());
   ASSERT_TRUE(ewk_notification_closed(notification_id, EINA_TRUE));
@@ -57,7 +57,7 @@ TEST_F(utc_blink_ewk_notification_closed, by_user_false)
   ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_TRUE(notification_id);
-  ASSERT_TRUE(ewk_notification_showed(notification_id));
+  ASSERT_TRUE(ewk_notification_showed(nullptr, notification_id));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_STREQ("notification.show", console_message.c_str());
   ASSERT_TRUE(ewk_notification_closed(notification_id, EINA_FALSE));
index bf5063f..481aecb 100755 (executable)
@@ -41,7 +41,7 @@ TEST_F(utc_blink_ewk_notification_showed, POS_TEST)
   ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), notification_sample_1.c_str()));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_TRUE(notification_id);
-  ASSERT_TRUE(ewk_notification_showed(notification_id));
+  ASSERT_TRUE(ewk_notification_showed(nullptr, notification_id));
   ASSERT_EQ(Success, EventLoopStart());
   ASSERT_STREQ("notification.show", console_message.c_str());
 }
@@ -51,5 +51,5 @@ TEST_F(utc_blink_ewk_notification_showed, POS_TEST)
 */
 TEST_F(utc_blink_ewk_notification_showed, NEG_TEST)
 {
-  ASSERT_FALSE(ewk_notification_showed(0));
+  ASSERT_FALSE(ewk_notification_showed(nullptr, 0));
 }