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