Title: [152713] trunk/Source/WebKit2
Revision
152713
Author
[email protected]
Date
2013-07-16 04:10:43 -0700 (Tue, 16 Jul 2013)

Log Message

EWK2BackForwardListTest should be defined by inheriting from EWK2UnitTestBase.
https://bugs.webkit.org/show_bug.cgi?id=118717

Patch by Dong-Gwan Kim <[email protected]> on 2013-07-16
Reviewed by Christophe Dumez.

* UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
(EWK2BackForwardListTest::checkItem):
(EWK2BackForwardListTest::urlFromTitle):
(EWK2BackForwardListTest::freeEinaList):
(TEST_F):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (152712 => 152713)


--- trunk/Source/WebKit2/ChangeLog	2013-07-16 10:47:17 UTC (rev 152712)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-16 11:10:43 UTC (rev 152713)
@@ -1,3 +1,16 @@
+2013-07-16  Dong-Gwan Kim  <[email protected]>
+
+        EWK2BackForwardListTest should be defined by inheriting from EWK2UnitTestBase.
+        https://bugs.webkit.org/show_bug.cgi?id=118717
+
+        Reviewed by Christophe Dumez.
+
+        * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
+        (EWK2BackForwardListTest::checkItem):
+        (EWK2BackForwardListTest::urlFromTitle):
+        (EWK2BackForwardListTest::freeEinaList):
+        (TEST_F):
+
 2013-07-16  Kangil Han  <[email protected]>
 
         Use toHTMLSelectElement and dismiss isHTMLSelectElement

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp (152712 => 152713)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp	2013-07-16 10:47:17 UTC (rev 152712)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp	2013-07-16 11:10:43 UTC (rev 152713)
@@ -58,32 +58,35 @@
     soup_message_body_complete(message->response_body);
 }
 
-static inline void checkItem(Ewk_Back_Forward_List_Item* item, const char* title, const char* url, const char* originalURL)
-{
-    ASSERT_TRUE(item);
-    EXPECT_STREQ(url, ewk_back_forward_list_item_url_get(item));
-    EXPECT_STREQ(title, ewk_back_forward_list_item_title_get(item));
-    EXPECT_STREQ(originalURL, ewk_back_forward_list_item_original_url_get(item));
-}
+class EWK2BackForwardListTest : public EWK2UnitTestBase {
+protected:
+    void checkItem(Ewk_Back_Forward_List_Item* item, const char* title, const char* url, const char* originalURL)
+    {
+        ASSERT_TRUE(item);
+        EXPECT_STREQ(url, ewk_back_forward_list_item_url_get(item));
+        EXPECT_STREQ(title, ewk_back_forward_list_item_title_get(item));
+        EXPECT_STREQ(originalURL, ewk_back_forward_list_item_original_url_get(item));
+    }
 
-static inline WKEinaSharedString urlFromTitle(EWK2UnitTestServer* httpServer, const char* title)
-{
-    Eina_Strbuf* path = eina_strbuf_new();
-    eina_strbuf_append_printf(path, "/%s", title);
-    WKEinaSharedString res = httpServer->getURLForPath(eina_strbuf_string_get(path)).data();
-    eina_strbuf_free(path);
+    WKEinaSharedString urlFromTitle(EWK2UnitTestServer* httpServer, const char* title)
+    {
+        Eina_Strbuf* path = eina_strbuf_new();
+        eina_strbuf_append_printf(path, "/%s", title);
+        WKEinaSharedString res = httpServer->getURLForPath(eina_strbuf_string_get(path)).data();
+        eina_strbuf_free(path);
 
-    return res;
-}
+        return res;
+    }
 
-static inline void freeEinaList(Eina_List* list)
-{
-    void* data = ""
-    EINA_LIST_FREE(list, data)
+    void freeEinaList(Eina_List* list)
+    {
+        void* data = ""
+        EINA_LIST_FREE(list, data)
         ewk_object_unref(static_cast<Ewk_Object*>(data));
-}
+    }
+};
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_current_item_get)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_current_item_get)
 {
     const char* url = ""
     ASSERT_TRUE(loadUrlSync(url));
@@ -97,7 +100,7 @@
     ASSERT_EQ(currentItem, anotherCurrentItem);
 }
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_previous_item_get)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_previous_item_get)
 {
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallbackNavigation);
@@ -119,7 +122,7 @@
     ASSERT_EQ(previousItem, anotherPreviousItem);
 }
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_next_item_get)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_next_item_get)
 {
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallbackNavigation);
@@ -145,7 +148,7 @@
     ASSERT_EQ(nextItem, anotherNextItem);
 }
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_item_at_index_get)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_item_at_index_get)
 {
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallbackNavigation);
@@ -170,7 +173,7 @@
     ASSERT_FALSE(nonExistingItem);
 }
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_count)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_count)
 {
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallbackNavigation);
@@ -187,7 +190,7 @@
     EXPECT_EQ(2, ewk_back_forward_list_count(backForwardList));
 }
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_n_back_items_copy)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_n_back_items_copy)
 {
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallbackNavigation);
@@ -224,7 +227,7 @@
     freeEinaList(backList);
 }
 
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_n_forward_items_copy)
+TEST_F(EWK2BackForwardListTest, ewk_back_forward_list_n_forward_items_copy)
 {
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallbackNavigation);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to