[GTK] Set up the TestJavaScriptCore in TestWebKitAPI
[WebKit-https.git] / Tools / TestWebKitAPI / GNUmakefile.am
1 noinst_LTLIBRARIES += \
2         Libraries/libTestWebKitAPIMain.la
3
4 Libraries_libTestWebKitAPIMain_la_SOURCES = \
5         Tools/TestWebKitAPI/Test.h \
6         Tools/TestWebKitAPI/TestsController.cpp \
7         Tools/TestWebKitAPI/TestsController.h \
8         Tools/TestWebKitAPI/gtk/main.cpp
9
10 # Use -isystem gcc flag so that gcc considers gtest headers as system headers.
11 # We need this to avoid a lot of compile warnings due to -Wundef.
12 # See http://code.google.com/p/googletest/issues/detail?id=258
13 Libraries_libTestWebKitAPIMain_la_CPPFLAGS = \
14         -isystem $(srcdir)/Source/ThirdParty/gtest/include \
15         -I$(srcdir)/Tools/TestWebKitAPI \
16         -I$(srcdir)/Source/ThirdParty/gtest/include \
17         -I$(top_builddir)/DerivedSources/WebKit2/include \
18         $(global_cppflags) \
19         $(javascriptcore_cppflags) \
20         $(GTK_CFLAGS)
21
22 noinst_PROGRAMS += \
23         Programs/TestWebKitAPI/TestWTF \
24         Programs/TestWebKitAPI/TestJavaScriptCore \
25         Programs/TestWebKitAPI/TestGtk
26
27 if ENABLE_WEBKIT2
28 noinst_PROGRAMS += \
29         Programs/TestWebKitAPI/TestWebKit2
30 endif # ENABLE_WEBKIT2
31
32 Programs_TestWebKitAPI_TestWTF_CPPFLAGS = \
33         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
34         $(GLIB_LIBS) \
35         $(CAIRO_CFLAGS)
36
37 Programs_TestWebKitAPI_TestWTF_CXXFLAGS = \
38         $(global_cxxflags)
39
40 Programs_TestWebKitAPI_TestWTF_LDADD = \
41         Libraries/libTestWebKitAPIMain.la \
42         Libraries/libgtest.la \
43         libWTF.la \
44         $(GTK_LIBS) \
45         $(GLIB_LIBS)
46
47 Programs_TestWebKitAPI_TestWTF_LDFLAGS = \
48         -no-install \
49         -no-fast-install
50
51 Programs_TestWebKitAPI_TestWTF_SOURCES = \
52         Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp \
53         Tools/TestWebKitAPI/Tests/WTF/CString.cpp \
54         Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp \
55         Tools/TestWebKitAPI/Tests/WTF/Functional.cpp \
56         Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp \
57         Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp \
58         Tools/TestWebKitAPI/Tests/WTF/IntegerToStringConversion.cpp \
59         Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp \
60         Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp \
61         Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp \
62         Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp \
63         Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp \
64         Tools/TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp \
65         Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp \
66         Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp \
67         Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp \
68         Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp \
69         Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp \
70         Tools/TestWebKitAPI/Tests/WTF/Vector.cpp \
71         Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp \
72         Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp \
73         Tools/TestWebKitAPI/WTFStringUtilities.h
74
75 Programs_TestWebKitAPI_TestJavaScriptCore_CPPFLAGS = \
76         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS)
77
78 Programs_TestWebKitAPI_TestJavaScriptCore_CXXFLAGS = \
79         $(global_cxxflags)
80
81 Programs_TestWebKitAPI_TestJavaScriptCore_LDADD = \
82         Libraries/libTestWebKitAPIMain.la \
83         Libraries/libgtest.la \
84         libWTF.la \
85         $(GTK_LIBS)
86
87 Programs_TestWebKitAPI_TestJavaScriptCore_LDFLAGS = \
88         -no-install \
89         -no-fast-install
90
91 Programs_TestWebKitAPI_TestJavaScriptCore_SOURCES = \
92         Tools/TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp
93
94 Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
95         $(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
96         $(platformgtk_cppflags) \
97         $(webcore_cppflags) \
98         $(webcoregtk_cppflags) \
99         $(FREETYPE_CFLAGS) \
100         $(GLIB_CFLAGS) \
101         $(GTK_CFLAGS) \
102         $(LIBSOUP_CFLAGS)
103
104 Programs_TestWebKitAPI_TestGtk_LDADD = \
105         Libraries/libTestWebKitAPIMain.la \
106         Libraries/libgtest.la \
107         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
108         libPlatformGtk.la \
109         libWebCore.la \
110         libWebCoreGtk.la \
111         $(FREETYPE_LIBS) \
112         $(GLIB_LIBS) \
113         $(GTK_LIBS) \
114         $(LIBSOUP_LIBS)
115
116 Programs_TestWebKitAPI_TestGtk_LDFLAGS = \
117         $(Programs_TestWebKitAPI_TestWTF_LDFLAGS)
118
119 Programs_TestWebKitAPI_TestGtk_SOURCES = \
120         Source/WebCore/platform/graphics/IntRect.cpp \
121         Source/WebCore/platform/graphics/cairo/IntRectCairo.cpp \
122         Source/WebCore/platform/graphics/gtk/IntRectGtk.cpp \
123         Source/WebCore/platform/gtk/GtkInputMethodFilter.cpp \
124         Tools/TestWebKitAPI/config.h \
125         Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
126
127 Programs_TestWebKitAPI_TestWebKit2_CPPFLAGS = \
128         $(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
129         -I$(top_builddir)/DerivedSources/WebKit2/include \
130         $(FREETYPE_CFLAGS) \
131         $(GLIB_CFLAGS) \
132         $(GTK_CFLAGS) \
133         $(LIBSOUP_CFLAGS)
134
135 Programs_TestWebKitAPI_TestWebKit2_LDADD = \
136         Libraries/libTestWebKitAPIMain.la \
137         Libraries/libgtest.la \
138         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
139         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
140         $(FREETYPE_LIBS) \
141         $(GLIB_LIBS) \
142         $(GTK_LIBS) \
143         $(LIBSOUP_LIBS)
144
145 Programs_TestWebKitAPI_TestWebKit2_LDFLAGS = \
146         $(Programs_TestWebKitAPI_TestWTF_LDFLAGS)
147
148 Programs_TestWebKitAPI_TestWebKit2_SOURCES = \
149         Tools/TestWebKitAPI/config.h \
150         Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp \
151         Tools/TestWebKitAPI/gtk/PlatformWebViewGtk.cpp \
152         Tools/TestWebKitAPI/JavaScriptTest.cpp \
153         Tools/TestWebKitAPI/JavaScriptTest.h \
154         Tools/TestWebKitAPI/PlatformUtilities.cpp \
155         Tools/TestWebKitAPI/PlatformUtilities.h \
156         Tools/TestWebKitAPI/PlatformWebView.h \
157         Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp \
158         Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp \
159         Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp \
160         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp \
161         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp \
162         Tools/TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp \
163         Tools/TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp \
164         Tools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp \
165         Tools/TestWebKitAPI/Tests/WebKit2/Find.cpp \
166         Tools/TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp \
167         Tools/TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp \
168         Tools/TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp \
169         Tools/TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback.cpp \
170         Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp \
171         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp \
172         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins.cpp \
173         Tools/TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp \
174         Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp \
175         Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp \
176         Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp \
177         Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp \
178         Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp \
179         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp \
180         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp \
181         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages.cpp \
182         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames.cpp \
183         Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp \
184         Tools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp \
185         Tools/TestWebKitAPI/Tests/WebKit2/ParentFrame.cpp \
186         Tools/TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp \
187         Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp \
188         Tools/TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly.cpp \
189         Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp \
190         Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp \
191         Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp \
192         Tools/TestWebKitAPI/Tests/WebKit2/UserMessage.cpp \
193         Tools/TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent.cpp \
194         Tools/TestWebKitAPI/Tests/WebKit2/WKConnection.cpp \
195         Tools/TestWebKitAPI/Tests/WebKit2/WKPageGetScaleFactorNotZero.cpp \
196         Tools/TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp \
197         Tools/TestWebKitAPI/Tests/WebKit2/WKString.cpp \
198         Tools/TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp
199
200 if ENABLE_WEBKIT2
201 noinst_LTLIBRARIES += \
202         Libraries/libTestWebKitAPIInjectedBundle.la
203 endif # ENABLE_WEBKIT2
204
205 Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES = \
206         Tools/TestWebKitAPI/InjectedBundleController.cpp \
207         Tools/TestWebKitAPI/InjectedBundleController.h \
208         Tools/TestWebKitAPI/InjectedBundleMain.cpp \
209         Tools/TestWebKitAPI/InjectedBundleTest.h \
210         Tools/TestWebKitAPI/PlatformUtilities.cpp \
211         Tools/TestWebKitAPI/PlatformUtilities.h \
212         Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp \
213         Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp \
214         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp \
215         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp \
216         Tools/TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp \
217         Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp \
218         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp \
219         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp \
220         Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp \
221         Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp \
222         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp \
223         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp \
224         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp \
225         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp \
226         Tools/TestWebKitAPI/Tests/WebKit2/ParentFrame_Bundle.cpp \
227         Tools/TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp \
228         Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp \
229         Tools/TestWebKitAPI/Tests/WebKit2/UserMessage_Bundle.cpp \
230         Tools/TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp \
231         Tools/TestWebKitAPI/Tests/WebKit2/WKConnection_Bundle.cpp \
232         Tools/TestWebKitAPI/gtk/InjectedBundleControllerGtk.cpp \
233         Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp
234
235 Libraries_libTestWebKitAPIInjectedBundle_la_LDFLAGS = \
236         -rpath ${shell pwd}/$(top_builddir)/Libraries/.libs \
237         $(no_undefined) \
238         -avoid-version \
239         -module
240
241 Libraries_libTestWebKitAPIInjectedBundle_la_CPPFLAGS = \
242         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
243         -I$(top_builddir)/DerivedSources/InjectedBundle \
244         $(GTK_CFLAGS)
245
246 Libraries_libTestWebKitAPIInjectedBundle_la_CXXFLAGS = \
247         $(global_cxxflags)
248
249 Libraries_libTestWebKitAPIInjectedBundle_la_CFLAGS = \
250         $(global_cflags)
251
252 stamp-testwebkitapi-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebKit2_SOURCES) $(Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES)
253         $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk \
254         && echo timestamp > $(@F)
255
256 if ENABLE_WEBKIT2
257 BUILT_SOURCES += $(top_builddir)/stamp-testwebkitapi-forwarding-headers
258 endif # ENABLE_WEBKIT2
259
260 EXTRA_DIST += \
261         Tools/TestWebKitAPI/Tests/WebKit2/18-characters.html \
262         Tools/TestWebKitAPI/Tests/WebKit2/file-with-anchor.html \
263         Tools/TestWebKitAPI/Tests/WebKit2/find.html \
264         Tools/TestWebKitAPI/Tests/WebKit2/icon.png \
265         Tools/TestWebKitAPI/Tests/WebKit2/lots-of-iframes.html \
266         Tools/TestWebKitAPI/Tests/WebKit2/lots-of-images.html \
267         Tools/TestWebKitAPI/Tests/WebKit2/lots-of-text.html \
268         Tools/TestWebKitAPI/Tests/WebKit2/mouse-move-listener.html \
269         Tools/TestWebKitAPI/Tests/WebKit2/push-state.html \
270         Tools/TestWebKitAPI/Tests/WebKit2/simple-accelerated-compositing.html \
271         Tools/TestWebKitAPI/Tests/WebKit2/simple-form.html \
272         Tools/TestWebKitAPI/Tests/WebKit2/simple.html \
273         Tools/TestWebKitAPI/Tests/WebKit2/simple-iframe.html \
274         Tools/TestWebKitAPI/Tests/WebKit2/simple-tall.html \
275         Tools/TestWebKitAPI/Tests/WebKit2/spacebar-scrolling.html