[GTK] [CMake] Build the WebKit1 GObject API tests
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Dec 2013 21:48:46 +0000 (21:48 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Dec 2013 21:48:46 +0000 (21:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125684

Reviewed by Daniel Bates.

.:

* Source/PlatformGTK.cmake: Added.

Source/WebKit/gtk:

* tests/CMakeLists.txt: Added.
* tests/testapplicationcache.c: Use the WTF config.h instead of including the autotools configuration directly.
* tests/testatk.c: Ditto.
* tests/testatkroles.c: Ditto.
* tests/testcontextmenu.c: Ditto.
* tests/testcopyandpaste.c: Ditto.
* tests/testdomdocument.c: Ditto.
* tests/testdomdomwindow.c: Ditto.
* tests/testdomnode.c: Ditto.
* tests/testdownload.c: Ditto.
* tests/testfavicondatabase.c: Ditto.
* tests/testglobals.c: Ditto.
* tests/testhittestresult.c: Ditto.
* tests/testhttpbackend.c: Ditto.
* tests/testkeyevents.c: Ditto.
* tests/testloading.c: Ditto.
* tests/testmimehandling.c: Ditto.
* tests/testnetworkrequest.c: Ditto.
* tests/testnetworkresponse.c: Ditto.
* tests/testwebbackforwardlist.c: Ditto.
* tests/testwebdatasource.c: Ditto.
* tests/testwebframe.c: Ditto.
* tests/testwebhistoryitem.c: Ditto.
* tests/testwebinspector.c: Ditto.
* tests/testwebplugindatabase.c: Ditto.
* tests/testwebresource.c: Ditto.
* tests/testwebsettings.c: Ditto.
* tests/testwebview.c: Ditto.
* tests/testwindow.c: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
ChangeLog
Source/PlatformGTK.cmake [new file with mode: 0644]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/tests/CMakeLists.txt [new file with mode: 0644]
Source/WebKit/gtk/tests/testapplicationcache.c
Source/WebKit/gtk/tests/testatk.c
Source/WebKit/gtk/tests/testatkroles.c
Source/WebKit/gtk/tests/testcontextmenu.c
Source/WebKit/gtk/tests/testcopyandpaste.c
Source/WebKit/gtk/tests/testdomdocument.c
Source/WebKit/gtk/tests/testdomdomwindow.c
Source/WebKit/gtk/tests/testdomnode.c
Source/WebKit/gtk/tests/testdownload.c
Source/WebKit/gtk/tests/testfavicondatabase.c
Source/WebKit/gtk/tests/testglobals.c
Source/WebKit/gtk/tests/testhittestresult.c
Source/WebKit/gtk/tests/testhttpbackend.c
Source/WebKit/gtk/tests/testkeyevents.c
Source/WebKit/gtk/tests/testloading.c
Source/WebKit/gtk/tests/testmimehandling.c
Source/WebKit/gtk/tests/testnetworkrequest.c
Source/WebKit/gtk/tests/testnetworkresponse.c
Source/WebKit/gtk/tests/testwebbackforwardlist.c
Source/WebKit/gtk/tests/testwebdatasource.c
Source/WebKit/gtk/tests/testwebframe.c
Source/WebKit/gtk/tests/testwebhistoryitem.c
Source/WebKit/gtk/tests/testwebinspector.c
Source/WebKit/gtk/tests/testwebplugindatabase.c
Source/WebKit/gtk/tests/testwebresource.c
Source/WebKit/gtk/tests/testwebsettings.c
Source/WebKit/gtk/tests/testwebview.c
Source/WebKit/gtk/tests/testwindow.c

index 4cb3267721289558d7f256fa07c7384d3cc8b2d4..11660afde3f60423df7350e5036399c020c6d957 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-12-23  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Build the WebKit1 GObject API tests
+        https://bugs.webkit.org/show_bug.cgi?id=125684
+
+        Reviewed by Daniel Bates.
+
+        * Source/PlatformGTK.cmake: Added.
+
 2013-12-22  Martin Robinson  <mrobinson@igalia.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=125511
diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake
new file mode 100644 (file)
index 0000000..bd39d1f
--- /dev/null
@@ -0,0 +1,3 @@
+if (ENABLE_WEBKIT)
+    add_subdirectory(${WEBKIT_DIR}/gtk/tests)
+endif ()
index 59e2df9f211ba15358bceb883d7c6f27476fdcb6..b81ab1e9ad15e6fe7ac909f6e1a98f14cfd17599 100644 (file)
@@ -1,3 +1,40 @@
+2013-12-23  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Build the WebKit1 GObject API tests
+        https://bugs.webkit.org/show_bug.cgi?id=125684
+
+        Reviewed by Daniel Bates.
+
+        * tests/CMakeLists.txt: Added.
+        * tests/testapplicationcache.c: Use the WTF config.h instead of including the autotools configuration directly.
+        * tests/testatk.c: Ditto.
+        * tests/testatkroles.c: Ditto.
+        * tests/testcontextmenu.c: Ditto.
+        * tests/testcopyandpaste.c: Ditto.
+        * tests/testdomdocument.c: Ditto.
+        * tests/testdomdomwindow.c: Ditto.
+        * tests/testdomnode.c: Ditto.
+        * tests/testdownload.c: Ditto.
+        * tests/testfavicondatabase.c: Ditto.
+        * tests/testglobals.c: Ditto.
+        * tests/testhittestresult.c: Ditto.
+        * tests/testhttpbackend.c: Ditto.
+        * tests/testkeyevents.c: Ditto.
+        * tests/testloading.c: Ditto.
+        * tests/testmimehandling.c: Ditto.
+        * tests/testnetworkrequest.c: Ditto.
+        * tests/testnetworkresponse.c: Ditto.
+        * tests/testwebbackforwardlist.c: Ditto.
+        * tests/testwebdatasource.c: Ditto.
+        * tests/testwebframe.c: Ditto.
+        * tests/testwebhistoryitem.c: Ditto.
+        * tests/testwebinspector.c: Ditto.
+        * tests/testwebplugindatabase.c: Ditto.
+        * tests/testwebresource.c: Ditto.
+        * tests/testwebsettings.c: Ditto.
+        * tests/testwebview.c: Ditto.
+        * tests/testwindow.c: Ditto.
+
 2013-12-20  Enrique Ocaña González  <eocanha@igalia.com>
 
         [GTK] The fullscreen API should be enabled by default
diff --git a/Source/WebKit/gtk/tests/CMakeLists.txt b/Source/WebKit/gtk/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..82d1c44
--- /dev/null
@@ -0,0 +1,60 @@
+set(TEST_BINARY_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit2GObjectAPITests)
+
+add_definitions(-DTEST_PLUGIN_DIR="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+include_directories(
+    ${CMAKE_BINARY_DIR}
+    ${CMAKE_SOURCE_DIR}/Source
+    ${CMAKE_SOURCE_DIR}/Source/JavaScriptCore/ForwardingHeaders
+    ${CMAKE_SOURCE_DIR}/Source/WebKit/gtk
+    ${CMAKE_SOURCE_DIR}/Source/WebCore/platform/gtk
+    ${CMAKE_SOURCE_DIR}/Source/WebCore/platform
+    ${CMAKE_SOURCE_DIR}/Source/WTF
+    ${DERIVED_SOURCES_DIR}
+    ${DERIVED_SOURCES_DIR}/webkit
+    ${GLIB_INCLUDE_DIRS}
+    ${GTK3_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
+)
+
+macro(ADD_WK1_TEST test_name)
+    add_executable(${test_name} ${ARGN})
+    target_link_libraries(${test_name}
+        JavaScriptCore
+        WebKit
+        ${GLIB_LIBRARIES}
+        ${GTK3_LIBRARIES}
+        ${LIBSOUP_LIBRARIES}
+    )
+    set_target_properties(${test_name} PROPERTIES
+        RUNTIME_OUTPUT_DIRECTORY ${TEST_BINARY_DIR}/WebKit1GObjectAPITests
+    )
+endmacro()
+
+ADD_WK1_TEST(testapplicationcache testapplicationcache.c)
+ADD_WK1_TEST(testatkroles testatkroles.c)
+ADD_WK1_TEST(testatk testatk.c)
+ADD_WK1_TEST(testcontextmenu testcontextmenu.c)
+ADD_WK1_TEST(testcopyandpaste testcopyandpaste.c ${WEBCORE_DIR}/platform/gtk/GtkVersioning.c)
+ADD_WK1_TEST(testdomdocument testdomdocument.c)
+ADD_WK1_TEST(testdomdomwindow testdomdomwindow.c)
+ADD_WK1_TEST(testdomnode testdomnode.c)
+ADD_WK1_TEST(testdownload testdownload.c)
+ADD_WK1_TEST(testfavicondatabase testfavicondatabase.c test_utils.c)
+ADD_WK1_TEST(testglobals testglobals.c)
+ADD_WK1_TEST(testhittestresult testhittestresult.c)
+ADD_WK1_TEST(testhttpbackend testhttpbackend.c)
+ADD_WK1_TEST(testkeyevents testkeyevents.c)
+ADD_WK1_TEST(testloading testloading.c)
+ADD_WK1_TEST(testmimehandling testmimehandling.c test_utils.c)
+ADD_WK1_TEST(testnetworkrequest testnetworkrequest.c)
+ADD_WK1_TEST(testnetworkresponse testnetworkresponse.c)
+ADD_WK1_TEST(testwebbackforwardlist testwebbackforwardlist.c)
+ADD_WK1_TEST(testwebdatasource testwebdatasource.c)
+ADD_WK1_TEST(testwebframe testwebframe.c)
+ADD_WK1_TEST(testwebhistoryitem testwebhistoryitem.c)
+ADD_WK1_TEST(testwebinspector testwebinspector.c test_utils.c)
+ADD_WK1_TEST(testwebplugindatabase testwebplugindatabase.c)
+ADD_WK1_TEST(testwebresource testwebresource.c)
+ADD_WK1_TEST(testwebsettings testwebsettings.c)
+ADD_WK1_TEST(testwebview testwebview.c test_utils.c)
+ADD_WK1_TEST(testwindow testwindow.c)
index 3a2909e26d6fcc3c5f57c253036fdd54939af0c1..718f401a7b7a15553c0b39c6471ad259277603e3 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <glib/gprintf.h>
 #include <gtk/gtk.h>
index bd041777bd3e06fbba789cb7bf942b141015e4ee..2a2db6146ea086de378d7ad133655d2e2219c7b0 100644 (file)
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <glib.h>
 #include <glib/gstdio.h>
index c32deceb9424756a86b7f2bb00cef31f4e2626e0..88817cf8ae9fcab457111eeed0c6fce429571198 100644 (file)
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
index fbf4ede5d955a1e63438ff596c84ac40b5ff61a7..54aaa571961cf61176fc9cf4e48cb93965a8555f 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <webkit/webkit.h>
 
 typedef struct {
index 5557ff87523da731968dc3f4d0ea62bbf00528e8..bb38ea66b0454ba6a608bc1861f291f395f0413f 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
index 57315931697605e671cacbe6ccace8df0ee05069..4c997ddad3a045c760b19ab6dbabfc020e6c5fa1 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 
 #include <glib.h>
index 701df4f17854bd5b9174d2a39807f77cb31f7a87..14fcd186a0ee842aa0a8d9157a0724d696538ad8 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 
 #include <glib.h>
index 0521d1715092fdae8b90517c41f2869cc6c50178..ed4bcbdaa6207fa02c68e282be2cdbf9cf5e274d 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 
 #include <glib.h>
index 106c346ce6bba71c5b71308409ed6bed68071bff..f8e8ded9322f4db844d5fc093b4d8689f8505a4d 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <glib/gstdio.h>
index 971a7e734cb41e488bca03272b2bdf15dcad6c9f..2bc606a6176184acc75b713c10a124baf130368b 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
index d7f316ccdeeefc6aacc375c1318f0e130291c7da..4b9ec4fcf5d8a660c4d849de058e91a95a5fe377 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <gtk/gtk.h>
 #include <libsoup/soup.h>
 #include <webkit/webkit.h>
index adbf98a8e2116ebadeb0304f91965aee977cd5f6..cbf0110483a1007cb6f952ddbc3ebc0057a49aef 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <glib/gstdio.h>
index d50be96c280bce691427b582f76ecc2f1a54ba3a..93776879b053a66f5f55d29d2b286856d9678cbc 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <glib.h>
index ad8e398cbd2ff175cb8c737fd7826f7e6858689d..acd01f35f48f2d6616c718fb20e0dc9af6bceba9 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
index 7949951f71e5d8e844e626cbfbd964bdc2112290..a0a920f04c5c20df5d62dad86fd48381b2575d4d 100644 (file)
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <gtk/gtk.h>
 #include <libsoup/soup.h>
 #include <string.h>
index ffaa7032d0c6a5216127cc08ab44649e0bd91a9a..bd8e1c6d67a0a55e3970154f1cd7f22adc20e877 100644 (file)
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 
 #include <glib.h>
index 2af471af9edd9d2d7c907740747bf9e0aee1b576..1b2c90f2d23ab21c08324246bd1cbe4a8d473143 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <glib.h>
index 8b12f82080606eb8c1a11aec26f19a92a1e862a8..b806aa111fe8b62791762d2fc39325da57dea7ab 100644 (file)
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <glib.h>
index 22acb45cb851841e9f41cc61050836ecf65e6c86..7782d40704182fffecdb75cf084d1a46ae3c0d65 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <webkit/webkit.h>
index ed73bdb09a58ad0becf098484785df31c246b7b5..0566257448bc77df35cb4ac340ae6aba038927b9 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <webkit/webkit.h>
index 531fae281510399bf46ae5cea3ea33608202c392..1131873d4d8ee7d68b3e7b341b9844ed3cd24555 100644 (file)
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <glib.h>
index 40ced4c710a35b31bf7c258f99cc4cd5156c0e90..82e191c208c753980deb5bb9e6075cfb64c1ab9d 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <webkit/webkit.h>
index 2c6e3a0a1a98efdd59a95bdf85dab7165b062aaf..a74382ff3f43cbe3db2dff1852bf4804529ae34e 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 
 #include <string.h>
index 7a1f7ec0e08d986ef732ccf6b60dcdd1ed02c45d..652811b13905874c9877a4a9a089d54d5eefb548 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <errno.h>
 #include <glib.h>
 #include <glib/gstdio.h>
index b91eb2c106ab4e55186a92b16566b425467df76a..fc58b7ad72a1687f85ac12addc566a8919d6341b 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <libsoup/soup.h>
index e681bc00de1d67c83ded1ad3eb6d4a48b945543c..35489cddd993451882a6897409812d842211a734 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <webkit/webkit.h>
index 2213061ca9c7985a53323aeb3b3ae3bb285ab017..170372cdcc4cccbf3961e6413ddcc9d256e07b72 100644 (file)
@@ -19,7 +19,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include "test_utils.h"
 
 #include <errno.h>
index ce66d466164714d6278b0eca96c443bbd5a612b6..5eda47b1277d65dcb58e1e379a7a2bcee66a5a0a 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <gtk/gtk.h>
 #include <webkit/webkit.h>