Add saturation arithmetic support to FractionalLayoutUnit
[WebKit-https.git] / Tools / TestWebKitAPI / CMakeLists.txt
1 SET(TESTWEBKITAPI_DIR "${TOOLS_DIR}/TestWebKitAPI")
2
3 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}
4     ${TESTWEBKITAPI_DIR}
5     ${CMAKE_SOURCE_DIR}/Source
6     ${DERIVED_SOURCES_WEBKIT2_DIR}/include
7     ${JAVASCRIPTCORE_DIR}
8     ${JAVASCRIPTCORE_DIR}/API
9     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
10     ${THIRDPARTY_DIR}/gtest/include
11     ${WEBCORE_DIR}/editing
12     ${WEBCORE_DIR}/platform
13     ${WEBCORE_DIR}/platform/graphics
14     ${WEBCORE_DIR}/platform/text
15     ${WEBCORE_DIR}/platform/network
16     ${WEBKIT2_DIR}/Shared
17     ${WEBKIT2_DIR}/Shared/API/c
18     ${WEBKIT2_DIR}/UIProcess
19     ${WTF_DIR}
20 )
21
22 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
23
24 ADD_LIBRARY(TestWebKitAPIInjectedBundle SHARED
25     ${bundle_harness_SOURCES}
26     ${TESTWEBKITAPI_DIR}/InjectedBundleController.cpp
27     ${TESTWEBKITAPI_DIR}/InjectedBundleMain.cpp
28     ${TESTWEBKITAPI_DIR}/PlatformUtilities.cpp
29     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/CanHandleRequest_Bundle.cpp
30     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp
31     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp
32     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp
33     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp
34     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp
35     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp
36     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp
37     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp
38     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp
39     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp
40     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp
41     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp
42     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp
43     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/ParentFrame_Bundle.cpp
44     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp
45     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp
46     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/UserMessage_Bundle.cpp
47     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKConnection_Bundle.cpp
48     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp
49 )
50
51 TARGET_LINK_LIBRARIES(TestWebKitAPIInjectedBundle ${WTF_LIBRARY_NAME})
52 ADD_DEPENDENCIES(TestWebKitAPIInjectedBundle ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
53
54 GET_PROPERTY(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
55
56 ADD_DEFINITIONS(-DGTEST_LINKED_AS_SHARED_LIBRARY=1
57     -DTEST_WEBKIT2_RESOURCES_DIR=\"${TESTWEBKITAPI_DIR}/Tests/WebKit2\"
58     -DTEST_INJECTED_BUNDLE_PATH=\"${TestWebKitAPIInjectedBundle_PATH}\"
59 )
60
61 SET(test_wtf_LIBRARIES
62     ${WTF_LIBRARY_NAME}
63     gtest
64 )
65
66 ADD_EXECUTABLE(test_wtf
67     ${test_main_SOURCES}
68     ${TESTWEBKITAPI_DIR}/TestsController.cpp
69     ${TESTWEBKITAPI_DIR}/Tests/WTF/AtomicString.cpp
70     ${TESTWEBKITAPI_DIR}/Tests/WTF/CString.cpp
71     ${TESTWEBKITAPI_DIR}/Tests/WTF/CheckedArithmeticOperations.cpp
72     ${TESTWEBKITAPI_DIR}/Tests/WTF/Functional.cpp
73     ${TESTWEBKITAPI_DIR}/Tests/WTF/HashMap.cpp
74     ${TESTWEBKITAPI_DIR}/Tests/WTF/MetaAllocator.cpp
75     ${TESTWEBKITAPI_DIR}/Tests/WTF/RedBlackTree.cpp
76     ${TESTWEBKITAPI_DIR}/Tests/WTF/SaturatedArithmeticOperations.cpp
77     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringBuilder.cpp
78     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringImpl.cpp
79     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringOperators.cpp
80     ${TESTWEBKITAPI_DIR}/Tests/WTF/TemporaryChange.cpp
81     ${TESTWEBKITAPI_DIR}/Tests/WTF/Vector.cpp
82     ${TESTWEBKITAPI_DIR}/Tests/WTF/VectorBasic.cpp
83     ${TESTWEBKITAPI_DIR}/Tests/WTF/VectorReverse.cpp
84 )
85
86 TARGET_LINK_LIBRARIES(test_wtf ${test_wtf_LIBRARIES})
87 ADD_DEPENDENCIES(test_wtf ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
88 ADD_TEST(test_wtf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_wtf)
89 SET_TESTS_PROPERTIES(test_wtf PROPERTIES TIMEOUT 60)
90
91 SET(test_webcore_LIBRARIES
92     ${WTF_LIBRARY_NAME}
93     ${WebCore_LIBRARY_NAME}
94     gtest
95 )
96
97 ADD_EXECUTABLE(test_webcore
98     ${test_main_SOURCES}
99     ${TESTWEBKITAPI_DIR}/TestsController.cpp
100     ${TESTWEBKITAPI_DIR}/Tests/WebCore/KURL.cpp
101 )
102
103 TARGET_LINK_LIBRARIES(test_webcore ${test_webcore_LIBRARIES})
104 ADD_DEPENDENCIES(test_webcore ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
105 ADD_TEST(test_webcore ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webcore)
106 SET_TESTS_PROPERTIES(test_webcore PROPERTIES TIMEOUT 60)
107
108 ADD_LIBRARY(TestWebKitAPIBase
109     ${test_main_SOURCES}
110     ${webkit2_api_harness_SOURCES}
111     ${TESTWEBKITAPI_DIR}/JavaScriptTest.cpp
112     ${TESTWEBKITAPI_DIR}/PlatformUtilities.cpp
113     ${TESTWEBKITAPI_DIR}/TestsController.cpp
114 )
115
116 ADD_DEPENDENCIES(TestWebKitAPIBase ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
117
118 SET(test_webkit2_api_LIBRARIES
119     TestWebKitAPIBase
120     ${WTF_LIBRARY_NAME}
121     ${JavaScriptCore_LIBRARY_NAME}
122     ${WebKit2_LIBRARY_NAME}
123     gtest
124 )
125
126 FOREACH(testName ${test_webkit2_api_BINARIES})
127     ADD_EXECUTABLE(test_webkit2_api_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
128     ADD_TEST(test_webkit2_api_${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webkit2_api_${testName})
129     SET_TESTS_PROPERTIES(test_webkit2_api_${testName} PROPERTIES TIMEOUT 60)
130     TARGET_LINK_LIBRARIES(test_webkit2_api_${testName} ${test_webkit2_api_LIBRARIES})
131 ENDFOREACH()
132
133 # We don't run tests that are expected to fail. We could use the WILL_FAIL
134 # property, but it reports failure when the test crashes or timeouts and would
135 # make the bot red.
136
137 FOREACH(testName ${test_webkit2_api_fail_BINARIES})
138     ADD_EXECUTABLE(test_webkit2_api_fail_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
139     TARGET_LINK_LIBRARIES(test_webkit2_api_fail_${testName} ${test_webkit2_api_LIBRARIES})
140 ENDFOREACH()