[GTK] Add support for loading web process extensions
[WebKit-https.git] / Source / WebKit2 / UIProcess / API / gtk / tests / GNUmakefile.am
1 if ENABLE_WEBKIT2
2
3 TEST_PROGS += \
4         Programs/WebKit2APITests/InspectorTestServer \
5         Programs/WebKit2APITests/TestBackForwardList \
6         Programs/WebKit2APITests/TestContextMenu \
7         Programs/WebKit2APITests/TestCookieManager \
8         Programs/WebKit2APITests/TestDownloads \
9         Programs/WebKit2APITests/TestInspector \
10         Programs/WebKit2APITests/TestInspectorServer \
11         Programs/WebKit2APITests/TestLoaderClient \
12         Programs/WebKit2APITests/TestPrinting \
13         Programs/WebKit2APITests/TestResources \
14         Programs/WebKit2APITests/TestSSL \
15         Programs/WebKit2APITests/TestWebExtensions \
16         Programs/WebKit2APITests/TestWebKitVersion \
17         Programs/WebKit2APITests/TestWebKitFaviconDatabase \
18         Programs/WebKit2APITests/TestWebKitFindController \
19         Programs/WebKit2APITests/TestWebKitPolicyClient \
20         Programs/WebKit2APITests/TestWebKitSettings \
21         Programs/WebKit2APITests/TestWebKitWebContext \
22         Programs/WebKit2APITests/TestWebKitWebView \
23         Programs/WebKit2APITests/TestWebViewEditor
24
25 noinst_PROGRAMS += $(TEST_PROGS)
26
27 if HAVE_ATSPI2
28 TEST_PROGS += Programs/WebKit2APITests/TestWebKitAccessibility
29
30 noinst_PROGRAMS += Programs/WebKit2APITests/AccessibilityTestServer
31 endif
32
33 webkit2_tests_cppflags = \
34         -DWEBKIT_EXEC_PATH=\"${shell pwd}/$(top_builddir)/Programs\" \
35         -DWEBKIT_SRC_DIR=\"${shell pwd}/${srcdir}\" \
36         -DWEBKIT_DERIVED_SRC_DIR=\"${shell pwd}/${top_builddir}/DerivedSources\" \
37         -DWEBKIT_TEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" \
38         -DWEBKIT_TEST_WEB_EXTENSIONS_DIR=\"${shell pwd}/${top_builddir}/Libraries/WebExtensions/.libs\" \
39         -DWEBKIT_INJECTED_BUNDLE_PATH=\"${shell pwd}/$(top_builddir)/.libs\" \
40         $(javascriptcore_cppflags) \
41         -I$(srcdir)/Source/JavaScriptCore \
42         -I$(srcdir)/Source \
43         -I$(srcdir)/Source/WebKit2 \
44         -I$(top_builddir)/DerivedSources/WebKit2/include \
45         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
46         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
47         -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
48         $(global_cppflags) \
49         $(GLIB_CFLAGS) \
50         $(GTK_CFLAGS) \
51         $(LIBSOUP_CFLAGS)
52
53 webkit2_tests_ldadd = \
54         Libraries/libWebKit2APITestCore.la \
55         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
56         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
57         $(GEOCLUE_LIBS) \
58         $(GLIB_LIBS) \
59         $(GTK_LIBS) \
60         $(LIBSOUP_LIBS)
61
62 webkit2_tests_ldflags = \
63         -no-install \
64         -no-fast-install
65
66 Programs/resources/webkit2gtk-tests-resources.gresource: Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml)
67         $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $<
68
69 DISTCLEANFILES += Programs/resources/webkit2gtk-tests-resources.gresource
70 noinst_DATA += Programs/resources/webkit2gtk-tests-resources.gresource
71
72 noinst_LTLIBRARIES += Libraries/libWebKit2APITestCore.la
73 Libraries_libWebKit2APITestCore_la_SOURCES = \
74         Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp \
75         Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h \
76         Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp \
77         Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h \
78         Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp \
79         Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h \
80         Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp \
81         Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h \
82         Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp \
83         Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h
84 Libraries_libWebKit2APITestCore_la_CPPFLAGS = $(webkit2_tests_cppflags)
85
86 noinst_LTLIBRARIES += Libraries/WebExtensions/libWebExtensionTest.la
87 Libraries_WebExtensions_libWebExtensionTest_la_SOURCES = \
88         Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp
89
90 Libraries_WebExtensions_libWebExtensionTest_la_LDFLAGS = \
91         -rpath ${shell pwd}/$(top_builddir)/Libraries/WebExtensions/.libs \
92         $(no_undefined) \
93         -avoid-version \
94         -module
95
96 Libraries_WebExtensions_libWebExtensionTest_la_CPPFLAGS = \
97         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
98         -I$(top_builddir)/DerivedSources \
99         -I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
100         -DWEBKIT2_COMPILATION \
101         $(webkit2_tests_cppflags)
102
103 Libraries_WebExtensions_libWebExtensionTest_la_CXXFLAGS = \
104         $(global_cxxflags)
105
106 Libraries_WebExtensions_libWebExtensionTest_la_CFLAGS = \
107         $(global_cflags)
108
109
110 EXTRA_DIST += \
111         Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem \
112         Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem \
113         Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml \
114         Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js
115
116 Programs_WebKit2APITests_TestWebKitWebContext_SOURCES = \
117         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp
118 Programs_WebKit2APITests_TestWebKitWebContext_CPPFLAGS = $(webkit2_tests_cppflags)
119 Programs_WebKit2APITests_TestWebKitWebContext_LDADD = $(webkit2_tests_ldadd)
120 Programs_WebKit2APITests_TestWebKitWebContext_LDFLAGS = $(webkit2_tests_ldflags)
121
122 Programs_WebKit2APITests_TestWebKitWebView_SOURCES = \
123         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp
124 Programs_WebKit2APITests_TestWebKitWebView_CPPFLAGS = $(webkit2_tests_cppflags)
125 Programs_WebKit2APITests_TestWebKitWebView_LDADD = $(webkit2_tests_ldadd)
126 Programs_WebKit2APITests_TestWebKitWebView_LDFLAGS = $(webkit2_tests_ldflags)
127
128 Programs_WebKit2APITests_TestLoaderClient_SOURCES = \
129         Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp
130 Programs_WebKit2APITests_TestLoaderClient_CPPFLAGS = $(webkit2_tests_cppflags)
131 Programs_WebKit2APITests_TestLoaderClient_LDADD = $(webkit2_tests_ldadd)
132 Programs_WebKit2APITests_TestLoaderClient_LDFLAGS = $(webkit2_tests_ldflags)
133
134 Programs_WebKit2APITests_TestWebKitSettings_SOURCES = \
135         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp
136 Programs_WebKit2APITests_TestWebKitSettings_CPPFLAGS = $(webkit2_tests_cppflags)
137 Programs_WebKit2APITests_TestWebKitSettings_LDADD = $(webkit2_tests_ldadd)
138 Programs_WebKit2APITests_TestWebKitSettings_LDFLAGS = $(webkit2_tests_ldflags)
139
140 Programs_WebKit2APITests_InspectorTestServer_SOURCES = \
141         Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp
142 Programs_WebKit2APITests_InspectorTestServer_CPPFLAGS = $(webkit2_tests_cppflags)
143 Programs_WebKit2APITests_InspectorTestServer_LDADD = $(webkit2_tests_ldadd)
144 Programs_WebKit2APITests_InspectorTestServer_LDFLAGS = $(webkit2_tests_ldflags)
145
146 Programs_WebKit2APITests_TestBackForwardList_SOURCES = \
147         Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp
148 Programs_WebKit2APITests_TestBackForwardList_CPPFLAGS = $(webkit2_tests_cppflags)
149 Programs_WebKit2APITests_TestBackForwardList_LDADD = $(webkit2_tests_ldadd)
150 Programs_WebKit2APITests_TestBackForwardList_LDFLAGS = $(webkit2_tests_ldflags)
151
152 Programs_WebKit2APITests_TestWebKitPolicyClient_SOURCES = \
153         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp
154 Programs_WebKit2APITests_TestWebKitPolicyClient_CPPFLAGS = $(webkit2_tests_cppflags)
155 Programs_WebKit2APITests_TestWebKitPolicyClient_LDADD = $(webkit2_tests_ldadd)
156 Programs_WebKit2APITests_TestWebKitPolicyClient_LDFLAGS = $(webkit2_tests_ldflags)
157
158 if HAVE_ATSPI2
159 Programs_WebKit2APITests_AccessibilityTestServer_SOURCES = \
160         Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp
161 Programs_WebKit2APITests_AccessibilityTestServer_CPPFLAGS = $(webkit2_tests_cppflags)
162 Programs_WebKit2APITests_AccessibilityTestServer_LDADD = $(webkit2_tests_ldadd)
163 Programs_WebKit2APITests_AccessibilityTestServer_LDFLAGS = $(webkit2_tests_ldflags)
164
165 Programs_WebKit2APITests_TestWebKitAccessibility_SOURCES = \
166         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp
167 Programs_WebKit2APITests_TestWebKitAccessibility_CPPFLAGS = $(webkit2_tests_cppflags) $(ATSPI2_CFLAGS)
168 Programs_WebKit2APITests_TestWebKitAccessibility_LDADD = $(webkit2_tests_ldadd) $(ATSPI2_LIBS)
169 Programs_WebKit2APITests_TestWebKitAccessibility_LDFLAGS = $(webkit2_tests_ldflags)
170 endif
171
172 Programs_WebKit2APITests_TestDownloads_SOURCES = \
173         Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
174 Programs_WebKit2APITests_TestDownloads_CPPFLAGS = $(webkit2_tests_cppflags)
175 Programs_WebKit2APITests_TestDownloads_LDADD = $(webkit2_tests_ldadd)
176 Programs_WebKit2APITests_TestDownloads_LDFLAGS = $(webkit2_tests_ldflags)
177
178 Programs_WebKit2APITests_TestWebViewEditor_SOURCES = \
179         Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp
180 Programs_WebKit2APITests_TestWebViewEditor_CPPFLAGS = $(webkit2_tests_cppflags)
181 Programs_WebKit2APITests_TestWebViewEditor_LDADD = $(webkit2_tests_ldadd)
182 Programs_WebKit2APITests_TestWebViewEditor_LDFLAGS = $(webkit2_tests_ldflags)
183
184 Programs_WebKit2APITests_TestPrinting_SOURCES = \
185         Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp
186 Programs_WebKit2APITests_TestPrinting_CPPFLAGS = $(webkit2_tests_cppflags) $(GTK_UNIX_PRINTING_CFLAGS)
187 Programs_WebKit2APITests_TestPrinting_LDADD = $(webkit2_tests_ldadd) $(GTK_UNIX_PRINTING_LIBS)
188 Programs_WebKit2APITests_TestPrinting_LDFLAGS = $(webkit2_tests_ldflags)
189
190 Programs_WebKit2APITests_TestWebKitFaviconDatabase_SOURCES = \
191         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp
192 Programs_WebKit2APITests_TestWebKitFaviconDatabase_CPPFLAGS = $(webkit2_tests_cppflags)
193 Programs_WebKit2APITests_TestWebKitFaviconDatabase_LDADD = $(webkit2_tests_ldadd)
194 Programs_WebKit2APITests_TestWebKitFaviconDatabase_LDFLAGS = $(webkit2_tests_ldflags)
195
196 Programs_WebKit2APITests_TestWebKitFindController_SOURCES = \
197         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
198 Programs_WebKit2APITests_TestWebKitFindController_CPPFLAGS = $(webkit2_tests_cppflags)
199 Programs_WebKit2APITests_TestWebKitFindController_LDADD = $(webkit2_tests_ldadd)
200 Programs_WebKit2APITests_TestWebKitFindController_LDFLAGS = $(webkit2_tests_ldflags)
201
202 Programs_WebKit2APITests_TestResources_SOURCES = \
203         Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp
204 Programs_WebKit2APITests_TestResources_CPPFLAGS = $(webkit2_tests_cppflags)
205 Programs_WebKit2APITests_TestResources_LDADD = $(webkit2_tests_ldadd)
206 Programs_WebKit2APITests_TestResources_LDFLAGS = $(webkit2_tests_ldflags)
207
208 Programs_WebKit2APITests_TestCookieManager_SOURCES = \
209         Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp
210 Programs_WebKit2APITests_TestCookieManager_CPPFLAGS = $(webkit2_tests_cppflags)
211 Programs_WebKit2APITests_TestCookieManager_LDADD = $(webkit2_tests_ldadd)
212 Programs_WebKit2APITests_TestCookieManager_LDFLAGS = $(webkit2_tests_ldflags)
213
214 Programs_WebKit2APITests_TestInspector_SOURCES = \
215         Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp
216 Programs_WebKit2APITests_TestInspector_CPPFLAGS = \
217         -DWEBKIT_INSPECTOR_PATH=\"${shell pwd}/${top_builddir}/resources/inspector\" \
218         $(webkit2_tests_cppflags)
219 Programs_WebKit2APITests_TestInspector_LDADD = $(webkit2_tests_ldadd)
220 Programs_WebKit2APITests_TestInspector_LDFLAGS = $(webkit2_tests_ldflags)
221
222 Programs_WebKit2APITests_TestInspectorServer_SOURCES = \
223         Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp
224 Programs_WebKit2APITests_TestInspectorServer_CPPFLAGS = $(webkit2_tests_cppflags)
225 Programs_WebKit2APITests_TestInspectorServer_LDADD = $(webkit2_tests_ldadd)
226 Programs_WebKit2APITests_TestInspectorServer_LDFLAGS = $(webkit2_tests_ldflags)
227
228 Programs_WebKit2APITests_TestWebKitVersion_SOURCES = \
229         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp
230 Programs_WebKit2APITests_TestWebKitVersion_CPPFLAGS = $(webkit2_tests_cppflags)
231 Programs_WebKit2APITests_TestWebKitVersion_LDADD = $(webkit2_tests_ldadd)
232 Programs_WebKit2APITests_TestWebKitVersion_LDFLAGS = $(webkit2_tests_ldflags)
233
234 Programs_WebKit2APITests_TestContextMenu_SOURCES = \
235         Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp
236 Programs_WebKit2APITests_TestContextMenu_CPPFLAGS = $(webkit2_tests_cppflags)
237 Programs_WebKit2APITests_TestContextMenu_LDADD = $(webkit2_tests_ldadd)
238 Programs_WebKit2APITests_TestContextMenu_LDFLAGS = $(webkit2_tests_ldflags)
239
240 Programs_WebKit2APITests_TestSSL_SOURCES = \
241         Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp
242 Programs_WebKit2APITests_TestSSL_CPPFLAGS = $(webkit2_tests_cppflags)
243 Programs_WebKit2APITests_TestSSL_LDADD = $(webkit2_tests_ldadd)
244 Programs_WebKit2APITests_TestSSL_LDFLAGS = $(webkit2_tests_ldflags)
245
246 Programs_WebKit2APITests_TestWebExtensions_SOURCES = \
247         Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp
248 Programs_WebKit2APITests_TestWebExtensions_CPPFLAGS = $(webkit2_tests_cppflags)
249 Programs_WebKit2APITests_TestWebExtensions_LDADD = $(webkit2_tests_ldadd)
250 Programs_WebKit2APITests_TestWebExtensions_LDFLAGS = $(webkit2_tests_ldflags)
251
252 endif # ENABLE_WEBKIT2