[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 4cb3267..11660af 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 59e2df9..b81ab1e 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 3a2909e..718f401 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 bd04177..2a2db61 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 c32dece..88817cf 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 fbf4ede..54aaa57 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "autotoolsconfig.h"
+#include "config.h"
 #include <webkit/webkit.h>
 
 typedef struct {
index 5557ff8..bb38ea6 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 5731593..4c997dd 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 701df4f..14fcd18 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 0521d17..ed4bcbd 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 106c346..f8e8ded 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 971a7e7..2bc606a 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 d7f316c..4b9ec4f 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 adbf98a..cbf0110 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 d50be96..9377687 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 ad8e398..acd01f3 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 7949951..a0a920f 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 ffaa703..bd8e1c6 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 2af471a..1b2c90f 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 8b12f82..b806aa1 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 22acb45..7782d40 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 ed73bdb..0566257 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 531fae2..1131873 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 40ced4c..82e191c 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 2c6e3a0..a74382f 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 7a1f7ec..652811b 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 b91eb2c..fc58b7a 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 e681bc0..35489cd 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 2213061..170372c 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 ce66d46..5eda47b 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>