Changeset 244857 in webkit


Ignore:
Timestamp:
May 1, 2019 4:47:28 PM (5 years ago)
Author:
don.olmstead@sony.com
Message:

TestWebKitAPI config.h should be aware of what suite is being built
https://bugs.webkit.org/show_bug.cgi?id=196583

Reviewed by Konstantin Tokarev.

Migrate to WEBKIT_EXECUTABLE to define the Test* executables. As an added
benefit the macro defines BUILDING_* for the executable which allows the includes
of the config.h to be tailored to the test suite being built. Because of that the
dependencies of the Test* executable are specific to the test suite which may
speed up the build.

Some source files were including "PlatformUtilities.h" which includes WebKit headers
when "Utilities.h" is what was needed.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformJSCOnly.cmake:
  • TestWebKitAPI/PlatformMac.cmake:
  • TestWebKitAPI/PlatformPlayStation.cmake:
  • TestWebKitAPI/PlatformUtilities.h:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • TestWebKitAPI/Tests/WTF/RefPtr.cpp:
  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
  • TestWebKitAPI/Tests/WebCore/LineBreaking.mm:
  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
  • TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
  • TestWebKitAPI/config.h:
Location:
trunk/Tools
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r244853 r244857  
     12019-05-01  Don Olmstead  <don.olmstead@sony.com>
     2
     3        TestWebKitAPI config.h should be aware of what suite is being built
     4        https://bugs.webkit.org/show_bug.cgi?id=196583
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        Migrate to WEBKIT_EXECUTABLE to define the Test* executables. As an added
     9        benefit the macro defines BUILDING_* for the executable which allows the includes
     10        of the config.h to be tailored to the test suite being built. Because of that the
     11        dependencies of the Test* executable are specific to the test suite which may
     12        speed up the build.
     13
     14        Some source files were including "PlatformUtilities.h" which includes WebKit headers
     15        when "Utilities.h" is what was needed.
     16
     17        * TestWebKitAPI/CMakeLists.txt:
     18        * TestWebKitAPI/PlatformGTK.cmake:
     19        * TestWebKitAPI/PlatformJSCOnly.cmake:
     20        * TestWebKitAPI/PlatformMac.cmake:
     21        * TestWebKitAPI/PlatformPlayStation.cmake:
     22        * TestWebKitAPI/PlatformUtilities.h:
     23        * TestWebKitAPI/PlatformWPE.cmake:
     24        * TestWebKitAPI/PlatformWin.cmake:
     25        * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
     26        * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
     27        * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
     28        * TestWebKitAPI/Tests/WebCore/LineBreaking.mm:
     29        * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
     30        * TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
     31        * TestWebKitAPI/config.h:
     32
    1332019-05-01  Jiewen Tan  <jiewen_tan@apple.com>
    234
  • trunk/Tools/TestWebKitAPI/CMakeLists.txt

    r244443 r244857  
    11set(TESTWEBKITAPI_DIR "${TOOLS_DIR}/TestWebKitAPI")
    2 set(test_wtf_LIBRARIES
    3     WTF${DEBUG_SUFFIX}
     2
     3get_property(gtest_DEFINITIONS GLOBAL PROPERTY gtest_DEFINITIONS)
     4add_definitions(${gtest_DEFINITIONS})
     5
     6macro(WEBKIT_TEST _target)
     7    WEBKIT_EXECUTABLE(${_target})
     8    add_test(${_target} ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/${_target})
     9    set_tests_properties(${_target} PROPERTIES TIMEOUT 60)
     10    set_target_properties(${_target} PROPERTIES
     11        RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}
     12    )
     13
     14    if (COMPILER_IS_GCC_OR_CLANG)
     15        WEBKIT_ADD_TARGET_CXX_FLAGS(${_target} -Wno-dangling-else
     16                                               -Wno-sign-compare
     17                                               -Wno-undef
     18                                               -Wno-unused-parameter)
     19    endif ()
     20endmacro()
     21
     22# TestWTF definitions
     23set(TestWTF_SOURCES
     24    Counters.cpp
     25    TestsController.cpp
     26
     27    Tests/WTF/AtomicString.cpp
     28    Tests/WTF/BloomFilter.cpp
     29    Tests/WTF/CString.cpp
     30    Tests/WTF/CheckedArithmeticOperations.cpp
     31    Tests/WTF/ConcurrentPtrHashSet.cpp
     32    Tests/WTF/Condition.cpp
     33    Tests/WTF/CrossThreadTask.cpp
     34    Tests/WTF/DateMath.cpp
     35    Tests/WTF/Deque.cpp
     36    Tests/WTF/EnumTraits.cpp
     37    Tests/WTF/Expected.cpp
     38    Tests/WTF/FileSystem.cpp
     39    Tests/WTF/Function.cpp
     40    Tests/WTF/HashCountedSet.cpp
     41    Tests/WTF/HashMap.cpp
     42    Tests/WTF/HashSet.cpp
     43    Tests/WTF/Hasher.cpp
     44    Tests/WTF/IntegerToStringConversion.cpp
     45    Tests/WTF/IteratorRange.cpp
     46    Tests/WTF/JSONValue.cpp
     47    Tests/WTF/LEBDecoder.cpp
     48    Tests/WTF/LifecycleLogger.cpp
     49    Tests/WTF/LineEnding.cpp
     50    Tests/WTF/ListHashSet.cpp
     51    Tests/WTF/Lock.cpp
     52    Tests/WTF/Logger.cpp
     53    Tests/WTF/MD5.cpp
     54    Tests/WTF/Markable.cpp
     55    Tests/WTF/MathExtras.cpp
     56    Tests/WTF/MediaTime.cpp
     57    Tests/WTF/MetaAllocator.cpp
     58    Tests/WTF/MoveOnlyLifecycleLogger.cpp
     59    Tests/WTF/NakedPtr.cpp
     60    Tests/WTF/NeverDestroyed.cpp
     61    Tests/WTF/OptionSet.cpp
     62    Tests/WTF/Optional.cpp
     63    Tests/WTF/ParkingLot.cpp
     64    Tests/WTF/PriorityQueue.cpp
     65    Tests/WTF/RedBlackTree.cpp
     66    Tests/WTF/Ref.cpp
     67    Tests/WTF/RefCounter.cpp
     68    Tests/WTF/RefLogger.cpp
     69    Tests/WTF/RefPtr.cpp
     70    Tests/WTF/RunLoop.cpp
     71    Tests/WTF/SHA1.cpp
     72    Tests/WTF/SaturatedArithmeticOperations.cpp
     73    Tests/WTF/Scope.cpp
     74    Tests/WTF/ScopedLambda.cpp
     75    Tests/WTF/SetForScope.cpp
     76    Tests/WTF/StringBuilder.cpp
     77    Tests/WTF/StringConcatenate.cpp
     78    Tests/WTF/StringHasher.cpp
     79    Tests/WTF/StringImpl.cpp
     80    Tests/WTF/StringOperators.cpp
     81    Tests/WTF/StringView.cpp
     82    Tests/WTF/SynchronizedFixedQueue.cpp
     83    Tests/WTF/TextBreakIterator.cpp
     84    Tests/WTF/ThreadGroup.cpp
     85    Tests/WTF/ThreadMessages.cpp
     86    Tests/WTF/Threading.cpp
     87    Tests/WTF/Time.cpp
     88    Tests/WTF/URL.cpp
     89    Tests/WTF/URLParser.cpp
     90    Tests/WTF/UniqueArray.cpp
     91    Tests/WTF/UniqueRef.cpp
     92    Tests/WTF/Variant.cpp
     93    Tests/WTF/Vector.cpp
     94    Tests/WTF/WTFString.cpp
     95    Tests/WTF/WeakPtr.cpp
     96    Tests/WTF/WorkQueue.cpp
     97    Tests/WTF/WorkerPool.cpp
     98)
     99
     100set(TestWTF_PRIVATE_INCLUDE_DIRECTORIES
     101    ${CMAKE_BINARY_DIR}
     102    ${TESTWEBKITAPI_DIR}
     103    ${THIRDPARTY_DIR}/gtest/include
     104    ${WTF_FRAMEWORK_HEADERS_DIR}
     105)
     106
     107set(TestWTF_LIBRARIES
     108    WTF
    4109    gtest
    5110)
    6111
    7 set(test_webcore_LIBRARIES
    8     WTF${DEBUG_SUFFIX}
    9     WebCore${DEBUG_SUFFIX}
    10     gtest
    11 )
    12 
    13 set(TestWebKitAPI_LIBRARIES
    14     WTF${DEBUG_SUFFIX}
    15 )
    16 
    17 set(TestWebKitAPI_DEPENDENCIES
    18     JavaScriptCoreFrameworkHeaders
    19     JavaScriptCorePrivateFrameworkHeaders
    20     WTFFrameworkHeaders
    21 )
    22 
     112set(TestWTF_DEPENDENCIES WTFFrameworkHeaders)
     113
     114WEBKIT_EXECUTABLE_DECLARE(TestWTF)
     115
     116# TestWebCore definitions
    23117if (ENABLE_WEBCORE)
    24     list(APPEND TestWebKitAPI_DEPENDENCIES
    25         PALFrameworkHeaders
    26         WebCorePrivateFrameworkHeaders
    27     )
    28 endif ()
    29 
     118    set(TestWebCore_SOURCES
     119        TestsController.cpp
     120
     121        Tests/WebCore/AffineTransform.cpp
     122        Tests/WebCore/CSSParser.cpp
     123        Tests/WebCore/CalculationValue.cpp
     124        Tests/WebCore/ComplexTextController.cpp
     125        Tests/WebCore/FileMonitor.cpp
     126        Tests/WebCore/FloatPoint.cpp
     127        Tests/WebCore/FloatRect.cpp
     128        Tests/WebCore/FloatSize.cpp
     129        Tests/WebCore/GridPosition.cpp
     130        Tests/WebCore/HTMLParserIdioms.cpp
     131        Tests/WebCore/IntPoint.cpp
     132        Tests/WebCore/IntRect.cpp
     133        Tests/WebCore/IntSize.cpp
     134        Tests/WebCore/LayoutUnit.cpp
     135        Tests/WebCore/MIMETypeRegistry.cpp
     136        Tests/WebCore/ParsedContentRange.cpp
     137        Tests/WebCore/PublicSuffix.cpp
     138        Tests/WebCore/SecurityOrigin.cpp
     139        Tests/WebCore/SharedBuffer.cpp
     140        Tests/WebCore/SharedBufferTest.cpp
     141        Tests/WebCore/TimeRanges.cpp
     142        Tests/WebCore/TransformationMatrix.cpp
     143        Tests/WebCore/URLParserTextEncoding.cpp
     144    )
     145
     146    set(TestWebCore_LIBRARIES
     147        WebCore
     148        WebCoreTestSupport
     149        gtest
     150    )
     151
     152    set(TestWebCore_PRIVATE_INCLUDE_DIRECTORIES
     153        ${CMAKE_BINARY_DIR}
     154        ${TESTWEBKITAPI_DIR}
     155        ${THIRDPARTY_DIR}/gtest/include
     156        ${PAL_FRAMEWORK_HEADERS_DIR}
     157        ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
     158        ${WTF_FRAMEWORK_HEADERS_DIR}
     159    )
     160
     161    set(TestWebCore_DEPENDENCIES WebCorePrivateFrameworkHeaders)
     162
     163    WEBKIT_EXECUTABLE_DECLARE(TestWebCore)
     164endif ()
     165
     166# TestWebKitLegacy definitions
     167if (ENABLE_WEBKIT_LEGACY)
     168    set(TestWebKitLegacy_SOURCES
     169        TestsController.cpp
     170    )
     171
     172    set(TestWebKitLegacy_LIBRARIES
     173        WebKitLegacy
     174        gtest
     175    )
     176
     177    set(TestWebKitLegacy_PRIVATE_INCLUDE_DIRECTORIES
     178        ${CMAKE_BINARY_DIR}
     179        ${TESTWEBKITAPI_DIR}
     180        ${THIRDPARTY_DIR}/gtest/include
     181        ${PAL_FRAMEWORK_HEADERS_DIR}
     182        ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
     183        ${WTF_FRAMEWORK_HEADERS_DIR}
     184        ${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
     185    )
     186
     187    set(TestWebKitLegacy_DEPENDENCIES WebKitLegacyFrameworkHeaders)
     188
     189    WEBKIT_EXECUTABLE_DECLARE(TestWebKitLegacy)
     190endif ()
     191
     192# TestWebKit definitions
    30193if (ENABLE_WEBKIT)
    31     set(test_webkit_api_LIBRARIES
    32         JavaScriptCore
     194    set(TestWebKit_SOURCES
     195        Tests/WebKit/AboutBlankLoad.cpp
     196        Tests/WebKit/CanHandleRequest.cpp
     197        Tests/WebKit/CookieManager.cpp
     198        Tests/WebKit/DOMWindowExtensionBasic.cpp
     199        Tests/WebKit/DOMWindowExtensionNoCache.cpp
     200        Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp
     201        Tests/WebKit/DownloadDecideDestinationCrash.cpp
     202        Tests/WebKit/EnumerateMediaDevices.cpp
     203        Tests/WebKit/EvaluateJavaScript.cpp
     204        Tests/WebKit/FailedLoad.cpp
     205        Tests/WebKit/Find.cpp
     206        Tests/WebKit/FirstMeaningfulPaintMilestone.cpp
     207        Tests/WebKit/ForceRepaint.cpp
     208        Tests/WebKit/FrameMIMETypeHTML.cpp
     209        Tests/WebKit/FrameMIMETypePNG.cpp
     210        Tests/WebKit/Geolocation.cpp
     211        Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp
     212        Tests/WebKit/HitTestResultNodeHandle.cpp
     213        Tests/WebKit/InjectedBundleBasic.cpp
     214        Tests/WebKit/InjectedBundleFrameHitTest.cpp
     215        Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp
     216        Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp
     217        Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp
     218        Tests/WebKit/LoadPageOnCrash.cpp
     219        Tests/WebKit/MouseMoveAfterCrash.cpp
     220        Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp
     221        Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp
     222        Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp
     223        Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp
     224        Tests/WebKit/PageLoadBasic.cpp
     225        Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp
     226        Tests/WebKit/ParentFrame.cpp
     227        Tests/WebKit/PendingAPIRequestURL.cpp
     228        Tests/WebKit/PreventEmptyUserAgent.cpp
     229        Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp
     230        Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback.cpp
     231        Tests/WebKit/ReloadPageAfterCrash.cpp
     232        Tests/WebKit/ResizeWindowAfterCrash.cpp
     233        Tests/WebKit/RestoreSessionStateContainingFormData.cpp
     234        Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp
     235        Tests/WebKit/UserMedia.cpp
     236        Tests/WebKit/UserMessage.cpp
     237        Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp
     238        Tests/WebKit/WKPageGetScaleFactorNotZero.cpp
     239        Tests/WebKit/WKPreferences.cpp
     240        Tests/WebKit/WKRetainPtr.cpp
     241        Tests/WebKit/WKString.cpp
     242        Tests/WebKit/WKStringJSString.cpp
     243        Tests/WebKit/WKURL.cpp
     244        Tests/WebKit/WillSendSubmitEvent.cpp
     245    )
     246
     247    set(TestWebKit_PRIVATE_INCLUDE_DIRECTORIES
     248        ${CMAKE_BINARY_DIR}
     249        ${TESTWEBKITAPI_DIR}
     250        ${THIRDPARTY_DIR}/gtest/include
     251        ${PAL_FRAMEWORK_HEADERS_DIR}
     252        ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
     253        ${JavaScriptCore_FRAMEWORK_HEADERS_DIR}
     254        ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
     255        ${WTF_FRAMEWORK_HEADERS_DIR}
     256        ${WebKit_FRAMEWORK_HEADERS_DIR}
     257    )
     258
     259    set(TestWebKit_LIBRARIES
    33260        TestWebKitAPIBase
    34         WTF
    35261        WebKit
    36262        gtest
    37263    )
    38264
    39     set(test_webkit_api_SOURCES
    40         ${TESTWEBKITAPI_DIR}/Tests/WebKit/AboutBlankLoad.cpp
    41         ${TESTWEBKITAPI_DIR}/Tests/WebKit/CanHandleRequest.cpp
    42         ${TESTWEBKITAPI_DIR}/Tests/WebKit/CookieManager.cpp
    43         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp
    44         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DOMWindowExtensionBasic.cpp
    45         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DOMWindowExtensionNoCache.cpp
    46         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DownloadDecideDestinationCrash.cpp
    47         ${TESTWEBKITAPI_DIR}/Tests/WebKit/EnumerateMediaDevices.cpp
    48         ${TESTWEBKITAPI_DIR}/Tests/WebKit/EvaluateJavaScript.cpp
    49         ${TESTWEBKITAPI_DIR}/Tests/WebKit/FailedLoad.cpp
    50         ${TESTWEBKITAPI_DIR}/Tests/WebKit/Find.cpp
    51         ${TESTWEBKITAPI_DIR}/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp
    52         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ForceRepaint.cpp
    53         ${TESTWEBKITAPI_DIR}/Tests/WebKit/FrameMIMETypeHTML.cpp
    54         ${TESTWEBKITAPI_DIR}/Tests/WebKit/FrameMIMETypePNG.cpp
    55         ${TESTWEBKITAPI_DIR}/Tests/WebKit/Geolocation.cpp
    56         ${TESTWEBKITAPI_DIR}/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback.cpp
    57         ${TESTWEBKITAPI_DIR}/Tests/WebKit/HitTestResultNodeHandle.cpp
    58         ${TESTWEBKITAPI_DIR}/Tests/WebKit/InjectedBundleBasic.cpp
    59         ${TESTWEBKITAPI_DIR}/Tests/WebKit/InjectedBundleFrameHitTest.cpp
    60         ${TESTWEBKITAPI_DIR}/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins.cpp
    61         ${TESTWEBKITAPI_DIR}/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp
    62         ${TESTWEBKITAPI_DIR}/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp
    63         ${TESTWEBKITAPI_DIR}/Tests/WebKit/LoadPageOnCrash.cpp
    64         ${TESTWEBKITAPI_DIR}/Tests/WebKit/MouseMoveAfterCrash.cpp
    65         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp
    66         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp
    67         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp
    68         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp
    69         ${TESTWEBKITAPI_DIR}/Tests/WebKit/PageLoadBasic.cpp
    70         ${TESTWEBKITAPI_DIR}/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp
    71         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ParentFrame.cpp
    72         ${TESTWEBKITAPI_DIR}/Tests/WebKit/PendingAPIRequestURL.cpp
    73         ${TESTWEBKITAPI_DIR}/Tests/WebKit/PreventEmptyUserAgent.cpp
    74         ${TESTWEBKITAPI_DIR}/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp
    75         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback.cpp
    76         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ReloadPageAfterCrash.cpp
    77         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ResizeWindowAfterCrash.cpp
    78         ${TESTWEBKITAPI_DIR}/Tests/WebKit/RestoreSessionStateContainingFormData.cpp
    79         ${TESTWEBKITAPI_DIR}/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp
    80         ${TESTWEBKITAPI_DIR}/Tests/WebKit/UserMedia.cpp
    81         ${TESTWEBKITAPI_DIR}/Tests/WebKit/UserMessage.cpp
    82         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WillSendSubmitEvent.cpp
    83         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp
    84         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp
    85         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKPreferences.cpp
    86         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKRetainPtr.cpp
    87         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKString.cpp
    88         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKStringJSString.cpp
    89         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WKURL.cpp
    90     )
    91 
    92     set(TestWebKitAPIBase_LIBRARIES
    93         JavaScriptCore
    94         WTF
    95         WebKit
    96         gtest
    97     )
    98 
    99     set(TestWebKitAPIBase_SOURCES
    100         ${TESTWEBKITAPI_DIR}/JavaScriptTest.cpp
    101         ${TESTWEBKITAPI_DIR}/PlatformUtilities.cpp
    102         ${TESTWEBKITAPI_DIR}/TestsController.cpp
    103     )
    104 
    105     list(APPEND TestWebKitAPI_LIBRARIES
    106         WebKit
    107     )
    108 else ()
    109     list(APPEND TestWebKitAPI_LIBRARIES
    110         WebKitLegacy${DEBUG_SUFFIX}
    111     )
    112 endif ()
    113 
    114 
    115 set(TestWTF_SOURCES
    116     ${TESTWEBKITAPI_DIR}/Counters.cpp
    117     ${TESTWEBKITAPI_DIR}/TestsController.cpp
    118     ${TESTWEBKITAPI_DIR}/Tests/WTF/AtomicString.cpp
    119     ${TESTWEBKITAPI_DIR}/Tests/WTF/BloomFilter.cpp
    120     ${TESTWEBKITAPI_DIR}/Tests/WTF/CString.cpp
    121     ${TESTWEBKITAPI_DIR}/Tests/WTF/CheckedArithmeticOperations.cpp
    122     ${TESTWEBKITAPI_DIR}/Tests/WTF/ConcurrentPtrHashSet.cpp
    123     ${TESTWEBKITAPI_DIR}/Tests/WTF/Condition.cpp
    124     ${TESTWEBKITAPI_DIR}/Tests/WTF/CrossThreadTask.cpp
    125     ${TESTWEBKITAPI_DIR}/Tests/WTF/DateMath.cpp
    126     ${TESTWEBKITAPI_DIR}/Tests/WTF/Deque.cpp
    127     ${TESTWEBKITAPI_DIR}/Tests/WTF/EnumTraits.cpp
    128     ${TESTWEBKITAPI_DIR}/Tests/WTF/Expected.cpp
    129     ${TESTWEBKITAPI_DIR}/Tests/WTF/Function.cpp
    130     ${TESTWEBKITAPI_DIR}/Tests/WTF/HashCountedSet.cpp
    131     ${TESTWEBKITAPI_DIR}/Tests/WTF/HashMap.cpp
    132     ${TESTWEBKITAPI_DIR}/Tests/WTF/HashSet.cpp
    133     ${TESTWEBKITAPI_DIR}/Tests/WTF/Hasher.cpp
    134     ${TESTWEBKITAPI_DIR}/Tests/WTF/IntegerToStringConversion.cpp
    135     ${TESTWEBKITAPI_DIR}/Tests/WTF/IteratorRange.cpp
    136     ${TESTWEBKITAPI_DIR}/Tests/WTF/JSONValue.cpp
    137     ${TESTWEBKITAPI_DIR}/Tests/WTF/LEBDecoder.cpp
    138     ${TESTWEBKITAPI_DIR}/Tests/WTF/LifecycleLogger.cpp
    139     ${TESTWEBKITAPI_DIR}/Tests/WTF/LineEnding.cpp
    140     ${TESTWEBKITAPI_DIR}/Tests/WTF/ListHashSet.cpp
    141     ${TESTWEBKITAPI_DIR}/Tests/WTF/Lock.cpp
    142     ${TESTWEBKITAPI_DIR}/Tests/WTF/Logger.cpp
    143     ${TESTWEBKITAPI_DIR}/Tests/WTF/MD5.cpp
    144     ${TESTWEBKITAPI_DIR}/Tests/WTF/Markable.cpp
    145     ${TESTWEBKITAPI_DIR}/Tests/WTF/MathExtras.cpp
    146     ${TESTWEBKITAPI_DIR}/Tests/WTF/MediaTime.cpp
    147     ${TESTWEBKITAPI_DIR}/Tests/WTF/MetaAllocator.cpp
    148     ${TESTWEBKITAPI_DIR}/Tests/WTF/MoveOnlyLifecycleLogger.cpp
    149     ${TESTWEBKITAPI_DIR}/Tests/WTF/NakedPtr.cpp
    150     ${TESTWEBKITAPI_DIR}/Tests/WTF/NeverDestroyed.cpp
    151     ${TESTWEBKITAPI_DIR}/Tests/WTF/Optional.cpp
    152     ${TESTWEBKITAPI_DIR}/Tests/WTF/OptionSet.cpp
    153     ${TESTWEBKITAPI_DIR}/Tests/WTF/ParkingLot.cpp
    154     ${TESTWEBKITAPI_DIR}/Tests/WTF/PriorityQueue.cpp
    155     ${TESTWEBKITAPI_DIR}/Tests/WTF/RedBlackTree.cpp
    156     ${TESTWEBKITAPI_DIR}/Tests/WTF/Ref.cpp
    157     ${TESTWEBKITAPI_DIR}/Tests/WTF/RefCounter.cpp
    158     ${TESTWEBKITAPI_DIR}/Tests/WTF/RefLogger.cpp
    159     ${TESTWEBKITAPI_DIR}/Tests/WTF/RefPtr.cpp
    160     ${TESTWEBKITAPI_DIR}/Tests/WTF/RunLoop.cpp
    161     ${TESTWEBKITAPI_DIR}/Tests/WTF/SHA1.cpp
    162     ${TESTWEBKITAPI_DIR}/Tests/WTF/SaturatedArithmeticOperations.cpp
    163     ${TESTWEBKITAPI_DIR}/Tests/WTF/Scope.cpp
    164     ${TESTWEBKITAPI_DIR}/Tests/WTF/ScopedLambda.cpp
    165     ${TESTWEBKITAPI_DIR}/Tests/WTF/SetForScope.cpp
    166     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringBuilder.cpp
    167     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringConcatenate.cpp
    168     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringHasher.cpp
    169     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringImpl.cpp
    170     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringOperators.cpp
    171     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringView.cpp
    172     ${TESTWEBKITAPI_DIR}/Tests/WTF/SynchronizedFixedQueue.cpp
    173     ${TESTWEBKITAPI_DIR}/Tests/WTF/TextBreakIterator.cpp
    174     ${TESTWEBKITAPI_DIR}/Tests/WTF/ThreadGroup.cpp
    175     ${TESTWEBKITAPI_DIR}/Tests/WTF/ThreadMessages.cpp
    176     ${TESTWEBKITAPI_DIR}/Tests/WTF/Threading.cpp
    177     ${TESTWEBKITAPI_DIR}/Tests/WTF/Time.cpp
    178     ${TESTWEBKITAPI_DIR}/Tests/WTF/URL.cpp
    179     ${TESTWEBKITAPI_DIR}/Tests/WTF/URLParser.cpp
    180     ${TESTWEBKITAPI_DIR}/Tests/WTF/UniqueArray.cpp
    181     ${TESTWEBKITAPI_DIR}/Tests/WTF/UniqueRef.cpp
    182     ${TESTWEBKITAPI_DIR}/Tests/WTF/Variant.cpp
    183     ${TESTWEBKITAPI_DIR}/Tests/WTF/Vector.cpp
    184     ${TESTWEBKITAPI_DIR}/Tests/WTF/WTFString.cpp
    185     ${TESTWEBKITAPI_DIR}/Tests/WTF/WeakPtr.cpp
    186     ${TESTWEBKITAPI_DIR}/Tests/WTF/WorkQueue.cpp
    187     ${TESTWEBKITAPI_DIR}/Tests/WTF/WorkerPool.cpp
    188 )
    189 
    190 # FIXME: Make these work on Windows too.
    191 if (NOT WIN32)
    192     list(APPEND TestWTF_SOURCES
    193         ${TESTWEBKITAPI_DIR}/Tests/WTF/FileSystem.cpp
    194     )
    195 endif ()
    196 
    197 # FIXME: Platform-specific sources in Tests/WTF are not included in TestWTF_SOURCES.
    198 
    199 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
    200 
    201 include_directories(
    202     ${TESTWEBKITAPI_DIR}
    203     ${CMAKE_BINARY_DIR}
    204     ${CMAKE_SOURCE_DIR}/Source
    205     ${JAVASCRIPTCORE_DIR}
    206     ${THIRDPARTY_DIR}/gtest/include
    207     ${WEBKIT_DIR}/Platform/IPC
    208     ${WEBKIT_DIR}/Shared
    209     ${WEBKIT_DIR}/Shared/API
    210     ${WEBKIT_DIR}/Shared/API/c
    211     ${WEBKIT_DIR}/Shared/Plugins
    212     ${WEBKIT_DIR}/UIProcess
    213     ${WEBKIT_DIR}/UIProcess/API
    214     ${WEBKIT_DIR}/UIProcess/API/C
    215     ${WEBKIT_DIR}/WebProcess/InjectedBundle
    216     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/c
    217 )
    218 
    219 if (ENABLE_WEBKIT)
     265    set(TestWebKit_DEPENDENCIES
     266        NetworkProcess
     267        TestWebKitAPIInjectedBundle
     268        WebProcess
     269    )
     270
     271    add_library(TestWebKitAPIBase STATIC
     272        JavaScriptTest.cpp
     273        PlatformUtilities.cpp
     274        TestsController.cpp
     275    )
     276    target_compile_definitions(TestWebKitAPIBase PRIVATE BUILDING_TestWebKit)
     277    target_include_directories(TestWebKitAPIBase PRIVATE ${TestWebKit_PRIVATE_INCLUDE_DIRECTORIES})
     278    target_link_libraries(TestWebKitAPIBase PRIVATE WebKit gtest)
     279
     280    if (COMPILER_IS_GCC_OR_CLANG)
     281        WEBKIT_ADD_TARGET_CXX_FLAGS(TestWebKitAPIBase -Wno-dangling-else
     282                                                      -Wno-sign-compare
     283                                                      -Wno-undef
     284                                                      -Wno-unused-parameter)
     285    endif ()
     286
    220287    add_library(TestWebKitAPIInjectedBundle SHARED
    221         ${bundle_harness_SOURCES}
    222         ${TESTWEBKITAPI_DIR}/InjectedBundleController.cpp
    223         ${TESTWEBKITAPI_DIR}/InjectedBundleMain.cpp
    224         ${TESTWEBKITAPI_DIR}/PlatformUtilities.cpp
    225         ${TESTWEBKITAPI_DIR}/Tests/WebKit/CanHandleRequest_Bundle.cpp
    226         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DidAssociateFormControls_Bundle.cpp
    227         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DOMWindowExtensionBasic_Bundle.cpp
    228         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp
    229         ${TESTWEBKITAPI_DIR}/Tests/WebKit/DocumentStartUserScriptAlertCrash_Bundle.cpp
    230         ${TESTWEBKITAPI_DIR}/Tests/WebKit/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp
    231         ${TESTWEBKITAPI_DIR}/Tests/WebKit/HitTestResultNodeHandle_Bundle.cpp
    232         ${TESTWEBKITAPI_DIR}/Tests/WebKit/InjectedBundleBasic_Bundle.cpp
    233         ${TESTWEBKITAPI_DIR}/Tests/WebKit/InjectedBundleFrameHitTest_Bundle.cpp
    234         ${TESTWEBKITAPI_DIR}/Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp
    235         ${TESTWEBKITAPI_DIR}/Tests/WebKit/LoadCanceledNoServerRedirectCallback_Bundle.cpp
    236         ${TESTWEBKITAPI_DIR}/Tests/WebKit/MouseMoveAfterCrash_Bundle.cpp
    237         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp
    238         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp
    239         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp
    240         ${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayout_Bundle.cpp
    241         ${TESTWEBKITAPI_DIR}/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp
    242         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ParentFrame_Bundle.cpp
    243         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp
    244         ${TESTWEBKITAPI_DIR}/Tests/WebKit/ResponsivenessTimerDoesntFireEarly_Bundle.cpp
    245         ${TESTWEBKITAPI_DIR}/Tests/WebKit/TextFieldDidBeginAndEndEditing_Bundle.cpp
    246         ${TESTWEBKITAPI_DIR}/Tests/WebKit/UserMessage_Bundle.cpp
    247         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WillLoad_Bundle.cpp
    248         ${TESTWEBKITAPI_DIR}/Tests/WebKit/WillSendSubmitEvent_Bundle.cpp
    249     )
    250 
    251     target_link_libraries(TestWebKitAPIInjectedBundle ${TestWebKitAPI_LIBRARIES})
    252     add_dependencies(TestWebKitAPIInjectedBundle WTF ${TestWebKitAPI_DEPENDENCIES})
     288        InjectedBundleController.cpp
     289        InjectedBundleMain.cpp
     290        PlatformUtilities.cpp
     291        Tests/WebKit/CanHandleRequest_Bundle.cpp
     292        Tests/WebKit/DidAssociateFormControls_Bundle.cpp
     293        Tests/WebKit/DOMWindowExtensionBasic_Bundle.cpp
     294        Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp
     295        Tests/WebKit/DocumentStartUserScriptAlertCrash_Bundle.cpp
     296        Tests/WebKit/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp
     297        Tests/WebKit/HitTestResultNodeHandle_Bundle.cpp
     298        Tests/WebKit/InjectedBundleBasic_Bundle.cpp
     299        Tests/WebKit/InjectedBundleFrameHitTest_Bundle.cpp
     300        Tests/WebKit/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp
     301        Tests/WebKit/LoadCanceledNoServerRedirectCallback_Bundle.cpp
     302        Tests/WebKit/MouseMoveAfterCrash_Bundle.cpp
     303        Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp
     304        Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp
     305        Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp
     306        Tests/WebKit/NewFirstVisuallyNonEmptyLayout_Bundle.cpp
     307        Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp
     308        Tests/WebKit/ParentFrame_Bundle.cpp
     309        Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp
     310        Tests/WebKit/ResponsivenessTimerDoesntFireEarly_Bundle.cpp
     311        Tests/WebKit/TextFieldDidBeginAndEndEditing_Bundle.cpp
     312        Tests/WebKit/UserMessage_Bundle.cpp
     313        Tests/WebKit/WillLoad_Bundle.cpp
     314        Tests/WebKit/WillSendSubmitEvent_Bundle.cpp
     315    )
     316    target_compile_definitions(TestWebKitAPIInjectedBundle PRIVATE BUILDING_TestWebKit)
     317    target_include_directories(TestWebKitAPIInjectedBundle PRIVATE ${TestWebKit_PRIVATE_INCLUDE_DIRECTORIES})
     318    target_link_libraries(TestWebKitAPIInjectedBundle PRIVATE WebKit)
    253319
    254320    if (COMPILER_IS_GCC_OR_CLANG)
     
    258324                                                                -Wno-unused-parameter)
    259325    endif ()
    260 endif ()
    261 
    262 get_property(gtest_DEFINITIONS GLOBAL PROPERTY gtest_DEFINITIONS)
    263 
    264 add_definitions(
    265     ${gtest_DEFINITIONS}
    266     -DTEST_WEBKIT2_RESOURCES_DIR=\"${TESTWEBKITAPI_DIR}/Tests/WebKit\"
    267 )
    268 
    269 add_executable(TestWTF
    270     ${test_main_SOURCES}
    271     ${TestWTF_SOURCES}
    272 )
    273 
    274 if (WIN32)
    275     add_dependencies(TestWTF TestWTFLib)
    276 else ()
    277     add_dependencies(TestWTF WTF ${TestWebKitAPI_DEPENDENCIES})
    278 endif ()
    279 
    280 target_link_libraries(TestWTF ${test_wtf_LIBRARIES})
    281 add_test(TestWTF ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF}/TestWTF)
    282 set_tests_properties(TestWTF PROPERTIES TIMEOUT 60)
    283 set_target_properties(TestWTF PROPERTIES
    284     RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF}
    285 )
    286 
    287 if (COMPILER_IS_GCC_OR_CLANG)
    288     WEBKIT_ADD_TARGET_CXX_FLAGS(TestWTF -Wno-dangling-else
    289                                         -Wno-sign-compare
    290                                         -Wno-undef
    291                                         -Wno-unused-parameter)
    292 endif ()
    293 
     326
     327    WEBKIT_EXECUTABLE_DECLARE(TestWebKit)
     328endif ()
     329
     330# Include platform specific files
     331WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
     332
     333# TestWTF target
     334WEBKIT_TEST(TestWTF)
     335
     336# TestWebCore target
     337if (ENABLE_WEBCORE)
     338    WEBKIT_TEST(TestWebCore)
     339endif ()
     340
     341# TestWebKitLegacy target
     342if (ENABLE_WEBKIT_LEGACY)
     343    WEBKIT_TEST(TestWebKitLegacy)
     344endif ()
     345
     346# TestWebKit target
    294347if (ENABLE_WEBKIT)
    295     add_library(TestWebKitAPIBase
    296         ${test_main_SOURCES}
    297         ${webkit_api_harness_SOURCES}
    298         ${TestWebKitAPIBase_SOURCES}
    299     )
    300 
    301     target_link_libraries(TestWebKitAPIBase ${TestWebKitAPIBase_LIBRARIES})
    302 
    303     add_dependencies(TestWebKitAPIBase WebKit ${TestWebKitAPI_DEPENDENCIES})
    304 
    305     if (COMPILER_IS_GCC_OR_CLANG)
    306         WEBKIT_ADD_TARGET_CXX_FLAGS(TestWebKitAPIBase -Wno-sign-compare
    307                                                       -Wno-undef
    308                                                       -Wno-unused-parameter)
    309     endif ()
    310 endif ()
     348    WEBKIT_TEST(TestWebKit)
     349endif ()
  • trunk/Tools/TestWebKitAPI/PlatformGTK.cmake

    r243746 r244857  
    11set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI")
    2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WTF")
    3 
    4 # This is necessary because it is possible to build TestWebKitAPI with WebKit
    5 # disabled and this triggers the inclusion of the WebKit headers.
    6 add_definitions(-DBUILDING_WEBKIT2__)
    72
    83add_custom_target(TestWebKitAPI-forwarding-headers
     
    116)
    127
    13 list(APPEND TestWebKitAPI_DEPENDENCIES TestWebKitAPI-forwarding-headers)
     8list(APPEND TestWebKit_DEPENDENCIES TestWebKitAPI-forwarding-headers)
    149
    15 include_directories(
     10set(test_main_SOURCES gtk/main.cpp)
     11
     12# TestWTF
     13list(APPEND TestWTF_SOURCES
     14    ${test_main_SOURCES}
     15
     16    Tests/WTF/glib/GUniquePtr.cpp
     17    Tests/WTF/glib/WorkQueueGLib.cpp
     18
     19    glib/UtilitiesGLib.cpp
     20)
     21
     22list(APPEND TestWTF_SYSTEM_INCLUDE_DIRECTORIES
     23    ${GLIB_INCLUDE_DIRS}
     24    ${GTK3_INCLUDE_DIRS}
     25)
     26
     27list(APPEND TestWTF_LIBRARIES
     28    ${GDK3_LIBRARIES}
     29    ${GTK3_LIBRARIES}
     30)
     31
     32# TestWebCore
     33list(APPEND TestWebCore_SOURCES
     34    ${test_main_SOURCES}
     35
     36    Tests/WebCore/gstreamer/GStreamerTest.cpp
     37    Tests/WebCore/gstreamer/GstMappedBuffer.cpp
     38
     39    glib/UtilitiesGLib.cpp
     40)
     41
     42list(APPEND TestWebCore_SYSTEM_INCLUDE_DIRECTORIES
     43    ${GLIB_INCLUDE_DIRS}
     44    ${GTK3_INCLUDE_DIRS}
     45)
     46
     47list(APPEND TestWebCore_LIBRARIES
     48    ${GDK3_LIBRARIES}
     49    ${GTK3_LIBRARIES}
     50
     51    WebCorePlatformGTK
     52)
     53ADD_WHOLE_ARCHIVE_TO_LIBRARIES(TestWebCore_LIBRARIES)
     54
     55# TestWebKit
     56list(APPEND TestWebKit_SOURCES
     57    ${test_main_SOURCES}
     58
     59    Tests/WebKit/gtk/InputMethodFilter.cpp
     60
     61    glib/UtilitiesGLib.cpp
     62
     63    gtk/PlatformUtilitiesGtk.cpp
     64    gtk/PlatformWebViewGtk.cpp
     65)
     66
     67list(APPEND TestWebKit_PRIVATE_INCLUDE_DIRECTORIES
     68    "${CMAKE_SOURCE_DIR}/Source"
     69)
     70
     71list(APPEND TestWebKit_SYSTEM_INCLUDE_DIRECTORIES
     72    ${GLIB_INCLUDE_DIRS}
     73    ${GTK3_INCLUDE_DIRS}
     74)
     75
     76list(APPEND TestWebKit_LIBRARIES
     77    ${GDK3_LIBRARIES}
     78    ${GTK3_LIBRARIES}
     79)
     80
     81# TestWebKitAPIBase
     82target_include_directories(TestWebKitAPIBase PRIVATE "${CMAKE_SOURCE_DIR}/Source")
     83
     84# TestWebKitAPIInjectedBundle
     85target_sources(TestWebKitAPIInjectedBundle PRIVATE
     86    glib/UtilitiesGLib.cpp
     87
     88    gtk/InjectedBundleControllerGtk.cpp
     89    gtk/PlatformUtilitiesGtk.cpp
     90)
     91target_include_directories(TestWebKitAPIInjectedBundle PRIVATE
     92    "${CMAKE_SOURCE_DIR}/Source"
     93    ${GLIB_INCLUDE_DIRS}
     94    ${GTK3_INCLUDE_DIRS}
     95)
     96
     97# TestJSC
     98set(TestJSC_SOURCES
     99    Tests/JavaScriptCore/glib/TestJSC.cpp
     100)
     101
     102set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES
     103    ${CMAKE_BINARY_DIR}
     104    ${TESTWEBKITAPI_DIR}
     105    ${GLIB_INCLUDE_DIRS}
     106    ${GTK3_INCLUDE_DIRS}
     107    ${THIRDPARTY_DIR}/gtest/include
     108    ${WTF_FRAMEWORK_HEADERS_DIR}
     109    ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
    16110    ${FORWARDING_HEADERS_DIR}
    17111    ${FORWARDING_HEADERS_DIR}/JavaScriptCore
    18112    ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
    19113    ${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}
    20     ${WEBKIT_DIR}/UIProcess/API/C/soup
    21     ${WEBKIT_DIR}/UIProcess/API/C/gtk
    22     ${WEBKIT_DIR}/UIProcess/API/gtk
    23114)
    24115
    25 include_directories(SYSTEM
    26     ${GDK3_INCLUDE_DIRS}
    27     ${GLIB_INCLUDE_DIRS}
    28     ${GSTREAMER_INCLUDE_DIRS}
    29     ${GSTREAMER_AUDIO_INCLUDE_DIRS}
    30     ${GTK3_INCLUDE_DIRS}
    31     ${LIBSOUP_INCLUDE_DIRS}
     116set(TestJSC_LIBRARIES
     117    ${GLIB_LIBRARIES}
     118    ${GLIB_GMODULE_LIBRARIES}
     119    JavaScriptCore
    32120)
    33121
    34 set(test_main_SOURCES
    35     ${TESTWEBKITAPI_DIR}/gtk/main.cpp
     122set(TestJSC_DEFINITIONS
     123    WEBKIT_SRC_DIR="${CMAKE_SOURCE_DIR}"
    36124)
    37125
    38 set(bundle_harness_SOURCES
    39     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    40     ${TESTWEBKITAPI_DIR}/gtk/InjectedBundleControllerGtk.cpp
    41     ${TESTWEBKITAPI_DIR}/gtk/PlatformUtilitiesGtk.cpp
    42 )
    43 
    44 set(webkit_api_harness_SOURCES
    45     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    46     ${TESTWEBKITAPI_DIR}/gtk/PlatformUtilitiesGtk.cpp
    47     ${TESTWEBKITAPI_DIR}/gtk/PlatformWebViewGtk.cpp
    48 )
    49 
    50 list(APPEND test_wtf_LIBRARIES
    51     ${GDK3_LIBRARIES}
    52     ${GTK3_LIBRARIES}
    53 )
    54 
    55 list(APPEND test_webkit_api_LIBRARIES
    56     ${GDK3_LIBRARIES}
    57     ${GTK3_LIBRARIES}
    58 )
    59 
    60 list(APPEND test_webcore_LIBRARIES
    61     WebCorePlatformGTK
    62     ${GDK3_LIBRARIES}
    63     ${GTK3_LIBRARIES}
    64 )
    65 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(test_webcore_LIBRARIES)
    66 
    67 list(APPEND TestWebKitAPI_LIBRARIES
    68     ${GDK3_LIBRARIES}
    69     ${GTK3_LIBRARIES}
    70 )
    71 
    72 list(APPEND TestJavaScriptCore_LIBRARIES
    73     ${GDK3_LIBRARIES}
    74     ${GTK3_LIBRARIES}
    75 )
    76 
    77 list(APPEND test_webkit_api_SOURCES
    78     ${TESTWEBKITAPI_DIR}/Tests/WebKit/gtk/InputMethodFilter.cpp
    79 )
    80 
    81 add_executable(TestWebKit ${test_webkit_api_SOURCES})
    82 
    83 target_link_libraries(TestWebKit ${test_webkit_api_LIBRARIES})
    84 add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit/TestWebKit)
    85 set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
    86 set_target_properties(TestWebKit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit)
    87 
    88 add_executable(TestWebCore
    89     ${test_main_SOURCES}
    90     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    91     ${TESTWEBKITAPI_DIR}/TestsController.cpp
    92     ${TESTWEBKITAPI_DIR}/Tests/WebCore/AbortableTaskQueue.cpp
    93     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
    94     ${TESTWEBKITAPI_DIR}/Tests/WebCore/ComplexTextController.cpp
    95     ${TESTWEBKITAPI_DIR}/Tests/WebCore/DNS.cpp
    96     ${TESTWEBKITAPI_DIR}/Tests/WebCore/FileMonitor.cpp
    97     ${TESTWEBKITAPI_DIR}/Tests/WebCore/gstreamer/GstMappedBuffer.cpp
    98     ${TESTWEBKITAPI_DIR}/Tests/WebCore/gstreamer/GStreamerTest.cpp
    99     ${TESTWEBKITAPI_DIR}/Tests/WebCore/GridPosition.cpp
    100     ${TESTWEBKITAPI_DIR}/Tests/WebCore/HTMLParserIdioms.cpp
    101     ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
    102     ${TESTWEBKITAPI_DIR}/Tests/WebCore/MIMETypeRegistry.cpp
    103     ${TESTWEBKITAPI_DIR}/Tests/WebCore/PublicSuffix.cpp
    104     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SampleMap.cpp
    105     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SecurityOrigin.cpp
    106     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBuffer.cpp
    107     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBufferTest.cpp
    108     ${TESTWEBKITAPI_DIR}/Tests/WebCore/URLParserTextEncoding.cpp
    109     ${TESTWEBKITAPI_DIR}/Tests/WebCore/UserAgentQuirks.cpp
    110 )
    111 
    112 target_link_libraries(TestWebCore ${test_webcore_LIBRARIES})
    113 add_dependencies(TestWebCore ${TestWebKitAPI_DEPENDENCIES})
    114 
    115 add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebCore/TestWebCore)
    116 set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60)
    117 set_target_properties(TestWebCore PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebCore)
    118 
    119 list(APPEND TestWTF_SOURCES
    120     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    121     ${TESTWEBKITAPI_DIR}/Tests/WTF/glib/GUniquePtr.cpp
    122     ${TESTWEBKITAPI_DIR}/Tests/WTF/glib/WorkQueueGLib.cpp
    123 )
    124 
    125 add_definitions(-DWEBKIT_SRC_DIR="${CMAKE_SOURCE_DIR}")
    126 add_executable(TestJSC ${TESTWEBKITAPI_DIR}/Tests/JavaScriptCore/glib/TestJSC.cpp)
    127 target_link_libraries(TestJSC
    128     ${GLIB_LIBRARIES}
    129     JavaScriptCore
    130 )
    131 add_dependencies(TestJSC ${TestWebKitAPI_DEPENDENCIES})
    132 add_test(TestJSC ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/JavaScriptCore/TestJSC)
    133 set_tests_properties(TestJSC PROPERTIES TIMEOUT 60)
    134 set_target_properties(TestJSC PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/JavaScriptCore)
    135 
    136 if (COMPILER_IS_GCC_OR_CLANG)
    137     WEBKIT_ADD_TARGET_CXX_FLAGS(TestWebKit -Wno-sign-compare
    138                                            -Wno-undef
    139                                            -Wno-unused-parameter)
    140 
    141     WEBKIT_ADD_TARGET_CXX_FLAGS(TestWebCore -Wno-sign-compare
    142                                             -Wno-undef
    143                                             -Wno-unused-parameter)
    144 
    145     WEBKIT_ADD_TARGET_CXX_FLAGS(TestJSC -Wno-sign-compare
    146                                         -Wno-undef
    147                                         -Wno-unused-parameter)
    148 endif ()
     126WEBKIT_EXECUTABLE_DECLARE(TestJSC)
     127WEBKIT_TEST(TestJSC)
  • trunk/Tools/TestWebKitAPI/PlatformJSCOnly.cmake

    r240437 r244857  
    11set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI")
    2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WTF")
    32
    4 include_directories(
    5     ${FORWARDING_HEADERS_DIR}
    6 )
     3list(APPEND TestWTF_SOURCES generic/main.cpp)
    74
    85if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
    9     include_directories(SYSTEM
     6    list(APPEND TestWTF_PRIVATE_INCLUDE_DIRECTORIES
    107        ${GLIB_INCLUDE_DIRS}
    118    )
     
    1815    )
    1916endif ()
    20 
    21 set(test_main_SOURCES
    22     ${TESTWEBKITAPI_DIR}/generic/main.cpp
    23 )
  • trunk/Tools/TestWebKitAPI/PlatformMac.cmake

    r244081 r244857  
    11set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
    2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}")
    32
    43include_directories(
  • trunk/Tools/TestWebKitAPI/PlatformPlayStation.cmake

    r240437 r244857  
    11set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI")
    2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WTF")
    3 
    4 add_definitions(-DBUILDING_JSCONLY__)
    5 
    6 include_directories(
    7     ${ICU_INCLUDE_DIRS}
    8     ${FORWARDING_HEADERS_DIR}
    9 )
    102
    113set(test_main_SOURCES
    12     ${TESTWEBKITAPI_DIR}/generic/main.cpp
     4    generic/main.cpp
    135)
    146
    157list(APPEND TestWTF_SOURCES
    16     ${TESTWEBKITAPI_DIR}/generic/UtilitiesGeneric.cpp
     8    ${test_main_SOURCES}
     9
     10    generic/UtilitiesGeneric.cpp
    1711)
     12
     13list(APPEND TestWebCore_SOURCES
     14    ${test_main_SOURCES}
     15)
  • trunk/Tools/TestWebKitAPI/PlatformUtilities.h

    r242339 r244857  
    2727#define PlatformUtilities_h
    2828
    29 #ifndef BUILDING_JSCONLY__
    3029#include <WebKit/WKNativeEvent.h>
    3130#include <WebKit/WKRetainPtr.h>
    32 #endif
    3331
    3432#include "Utilities.h"
  • trunk/Tools/TestWebKitAPI/PlatformWPE.cmake

    r243746 r244857  
    11set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI")
    2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WTF")
    3 
    4 # This is necessary because it is possible to build TestWebKitAPI with WebKit2
    5 # disabled and this triggers the inclusion of the WebKit2 headers.
    6 add_definitions(-DBUILDING_WEBKIT2__)
    72
    83add_custom_target(TestWebKitAPI-forwarding-headers
     
    116)
    127
    13 list(APPEND TestWebKitAPI_DEPENDENCIES TestWebKitAPI-forwarding-headers)
    14 
    15 include_directories(
    16     ${FORWARDING_HEADERS_DIR}
    17     ${FORWARDING_HEADERS_DIR}/JavaScriptCore
    18     ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
    19     ${DERIVED_SOURCES_JAVASCRIPCOREWPE_DIR}
    20     ${TOOLS_DIR}/wpe/backends
    21 )
     8list(APPEND TestWebKit_DEPENDENCIES TestWebKitAPI-forwarding-headers)
    229
    2310include_directories(SYSTEM
     
    3118)
    3219
    33 set(test_main_SOURCES
    34     ${TESTWEBKITAPI_DIR}/generic/main.cpp
     20set(test_main_SOURCES generic/main.cpp)
     21
     22# TestWTF
     23list(APPEND TestWTF_SOURCES
     24    ${test_main_SOURCES}
     25
     26    Tests/WTF/glib/GUniquePtr.cpp
     27    Tests/WTF/glib/WorkQueueGLib.cpp
     28
     29    glib/UtilitiesGLib.cpp
    3530)
    3631
    37 set(bundle_harness_SOURCES
    38     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    39     ${TESTWEBKITAPI_DIR}/wpe/InjectedBundleControllerWPE.cpp
    40     ${TESTWEBKITAPI_DIR}/wpe/PlatformUtilitiesWPE.cpp
    41 )
    42 
    43 set(webkit_api_harness_SOURCES
    44     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    45     ${TESTWEBKITAPI_DIR}/wpe/PlatformUtilitiesWPE.cpp
    46     ${TESTWEBKITAPI_DIR}/wpe/PlatformWebViewWPE.cpp
    47 )
    48 
    49 # TestWTF
    50 
    51 list(APPEND TestWTF_SOURCES
    52     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    53     ${TESTWEBKITAPI_DIR}/Tests/WTF/glib/GUniquePtr.cpp
    54     ${TESTWEBKITAPI_DIR}/Tests/WTF/glib/WorkQueueGLib.cpp
     32list(APPEND TestWTF_SYSTEM_INCLUDE_DIRECTORIES
     33    ${GLIB_INCLUDE_DIRS}
    5534)
    5635
    5736# TestWebCore
     37list(APPEND TestWebCore_SOURCES
     38    ${test_main_SOURCES}
    5839
    59 add_executable(TestWebCore
    60     ${test_main_SOURCES}
    61     ${TESTWEBKITAPI_DIR}/glib/UtilitiesGLib.cpp
    62     ${TESTWEBKITAPI_DIR}/TestsController.cpp
    63     ${TESTWEBKITAPI_DIR}/Tests/WebCore/FileMonitor.cpp
    64     ${TESTWEBKITAPI_DIR}/Tests/WebCore/gstreamer/GstMappedBuffer.cpp
    65     ${TESTWEBKITAPI_DIR}/Tests/WebCore/gstreamer/GStreamerTest.cpp
    66     ${TESTWEBKITAPI_DIR}/Tests/WebCore/HTMLParserIdioms.cpp
    67     ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
    68     ${TESTWEBKITAPI_DIR}/Tests/WebCore/MIMETypeRegistry.cpp
    69     ${TESTWEBKITAPI_DIR}/Tests/WebCore/PublicSuffix.cpp
    70     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBuffer.cpp
    71     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBufferTest.cpp
    72     ${TESTWEBKITAPI_DIR}/Tests/WebCore/URLParserTextEncoding.cpp
     40    Tests/WebCore/gstreamer/GStreamerTest.cpp
     41    Tests/WebCore/gstreamer/GstMappedBuffer.cpp
     42
     43    glib/UtilitiesGLib.cpp
    7344)
    7445
    75 target_link_libraries(TestWebCore ${test_webcore_LIBRARIES})
    76 add_dependencies(TestWebCore ${TestWebKitAPI_DEPENDENCIES})
    77 
    78 add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebCore/TestWebCore)
    79 set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60)
    80 set_target_properties(TestWebCore PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebCore)
     46list(APPEND TestWebCore_SYSTEM_INCLUDE_DIRECTORIES
     47    ${GLIB_INCLUDE_DIRS}
     48)
    8149
    8250# TestWebKit
     51list(APPEND TestWebKit_SOURCES
     52    ${test_main_SOURCES}
    8353
    84 list(APPEND test_webkit_api_LIBRARIES
     54    ${TOOLS_DIR}/wpe/backends/ViewBackend.cpp
     55    ${TOOLS_DIR}/wpe/backends/HeadlessViewBackend.cpp
     56
     57    glib/UtilitiesGLib.cpp
     58
     59    wpe/PlatformUtilitiesWPE.cpp
     60    wpe/PlatformWebViewWPE.cpp
     61)
     62
     63list(APPEND TestWebKit_PRIVATE_INCLUDE_DIRECTORIES
     64    ${CMAKE_SOURCE_DIR}/Source
     65    ${FORWARDING_HEADERS_DIR}
     66    ${WPEBACKEND_FDO_INCLUDE_DIRS}
     67    ${TOOLS_DIR}/wpe/backends
     68)
     69
     70list(APPEND TestWebKit_SYSTEM_INCLUDE_DIRECTORIES
     71    ${GLIB_INCLUDE_DIRS}
     72)
     73
     74list(APPEND TestWebKit_LIBRARIES
     75    ${WPEBACKEND_FDO_LIBRARIES}
    8576    WPEToolingBackends
    8677)
    8778
    88 add_executable(TestWebKit ${test_webkit_api_SOURCES})
     79# TestWebKitAPIBase
     80target_include_directories(TestWebKitAPIBase PRIVATE
     81    ${CMAKE_SOURCE_DIR}/Source
     82    ${FORWARDING_HEADERS_DIR}
     83)
    8984
    90 target_link_libraries(TestWebKit ${test_webkit_api_LIBRARIES})
    91 add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit/TestWebKit)
    92 set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
    93 set_target_properties(TestWebKit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit)
     85# TestWebKitAPIInjectedBundle
     86target_sources(TestWebKitAPIInjectedBundle PRIVATE
     87    glib/UtilitiesGLib.cpp
    9488
    95 # TestWebKitAPIBase
    96 list(APPEND TestWebKitAPIBase_LIBRARIES ${WPEBACKEND_FDO_LIBRARIES})
    97 list(APPEND TestWebKitAPI_LIBRARIES ${WPEBACKEND_FDO_LIBRARIES})
    98 list(APPEND TestWebKitAPIBase_SOURCES
    99     ${TOOLS_DIR}/wpe/backends/ViewBackend.cpp
    100     ${TOOLS_DIR}/wpe/backends/HeadlessViewBackend.cpp
     89    wpe/InjectedBundleControllerWPE.cpp
     90    wpe/PlatformUtilitiesWPE.cpp
     91)
     92target_include_directories(TestWebKitAPIInjectedBundle PRIVATE
     93    ${CMAKE_SOURCE_DIR}/Source
     94    ${FORWARDING_HEADERS_DIR}
    10195)
    10296
    10397# TestJSC
     98set(TestJSC_SOURCES
     99    Tests/JavaScriptCore/glib/TestJSC.cpp
     100)
    104101
    105 add_definitions(-DWEBKIT_SRC_DIR="${CMAKE_SOURCE_DIR}")
    106 add_executable(TestJSC ${TESTWEBKITAPI_DIR}/Tests/JavaScriptCore/glib/TestJSC.cpp)
    107 target_link_libraries(TestJSC
     102set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES
     103    ${CMAKE_BINARY_DIR}
     104    ${TESTWEBKITAPI_DIR}
     105    ${THIRDPARTY_DIR}/gtest/include
     106    ${WTF_FRAMEWORK_HEADERS_DIR}
     107    ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
     108    ${FORWARDING_HEADERS_DIR}
     109    ${FORWARDING_HEADERS_DIR}/JavaScriptCore
     110    ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
     111    ${DERIVED_SOURCES_JAVASCRIPCOREWPE_DIR}
     112)
     113
     114set(TestJSC_LIBRARIES
    108115    ${GLIB_LIBRARIES}
    109116    ${GLIB_GMODULE_LIBRARIES}
    110117    JavaScriptCore
    111118)
    112 add_test(TestJSC ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/JavaScriptCore/TestJSC)
    113 add_dependencies(TestJSC ${TestWebKitAPI_DEPENDENCIES})
    114 set_tests_properties(TestJSC PROPERTIES TIMEOUT 60)
    115 set_target_properties(TestJSC PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/JavaScriptCore)
    116119
    117 if (COMPILER_IS_GCC_OR_CLANG)
    118     WEBKIT_ADD_TARGET_CXX_FLAGS(TestWebCore -Wno-sign-compare
    119                                             -Wno-undef
    120                                             -Wno-unused-parameter)
    121     WEBKIT_ADD_TARGET_CXX_FLAGS(TestWebKit -Wno-sign-compare
    122                                            -Wno-undef
    123                                            -Wno-unused-parameter)
    124     WEBKIT_ADD_TARGET_CXX_FLAGS(TestJSC -Wno-sign-compare
    125                                         -Wno-undef
    126                                         -Wno-unused-parameter)
    127 endif ()
     120set(TestJSC_DEFINITIONS
     121    WEBKIT_SRC_DIR="${CMAKE_SOURCE_DIR}"
     122)
     123
     124WEBKIT_EXECUTABLE_DECLARE(TestJSC)
     125WEBKIT_TEST(TestJSC)
  • trunk/Tools/TestWebKitAPI/PlatformWin.cmake

    r244541 r244857  
    11set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
    2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}")
    3 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
     2
     3set(wrapper_DEFINITIONS USE_CONSOLE_ENTRY_POINT)
    44
    55if (${WTF_PLATFORM_WIN_CAIRO})
    6     add_definitions(-DWIN_CAIRO)
     6    list(APPEND wrapper_DEFINITIONS WIN_CAIRO)
    77endif ()
    88
    9 set(test_main_SOURCES
    10     ${TESTWEBKITAPI_DIR}/win/main.cpp
     9set(webcore_DEFINITIONS
     10    STATICALLY_LINKED_WITH_PAL=1
     11    WEBCORE_EXPORT=
     12    WEBCORE_TESTSUPPORT_EXPORT=
    1113)
    1214
    13 include_directories(
    14     ${DERIVED_SOURCES_DIR}
    15     ${FORWARDING_HEADERS_DIR}
    16     ${FORWARDING_HEADERS_DIR}/JavaScriptCore
    17     ${TESTWEBKITAPI_DIR}/win
    18     ${DERIVED_SOURCES_DIR}/WebKit/Interfaces
    19     ${WTF_FRAMEWORK_HEADERS_DIR}
    20     ${JavaScriptCore_FRAMEWORK_HEADERS_DIR}
    21     ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
    22     ${PAL_FRAMEWORK_HEADERS_DIR}
    23     ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
    24     ${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
    25     ${WebKit_FRAMEWORK_HEADERS_DIR}
    26     ${WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR}
     15set(test_main_SOURCES
     16    win/main.cpp
    2717)
    2818
    29 add_definitions(-DWEBCORE_EXPORT= -DWEBCORE_TESTSUPPORT_EXPORT=)
     19# TestWTF
     20list(REMOVE_ITEM TestWTF_SOURCES Tests/WTF/FileSystem.cpp)
     21list(APPEND TestWTF_SOURCES
     22    ${test_main_SOURCES}
     23    win/UtilitiesWin.cpp
     24)
    3025
    31 set(test_webcore_LIBRARIES
     26WEBKIT_WRAP_EXECUTABLE(TestWTF
     27    SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
     28    LIBRARIES shlwapi
     29)
     30target_compile_definitions(TestWTF PRIVATE ${wrapper_DEFINITIONS})
     31set(TestWTF_OUTPUT_NAME TestWTF${DEBUG_SUFFIX})
     32
     33# TestWebCore
     34list(APPEND TestWebCore_SOURCES
     35    ${test_main_SOURCES}
     36
     37    Tests/WebCore/win/DIBPixelData.cpp
     38    Tests/WebCore/win/LinkedFonts.cpp
     39
     40    win/TestWebCoreStubs.cpp
     41)
     42list(APPEND TestWebCore_DEFINITIONS ${webcore_DEFINITIONS})
     43
     44list(APPEND TestWebCore_LIBRARIES
    3245    Crypt32
    3346    D2d1
     
    3851    Shlwapi
    3952    Usp10
    40     WebCore${DEBUG_SUFFIX}
    4153    WindowsCodecs
    42     gtest
    43 )
    44 
    45 set(TestWebCoreLib_SOURCES
    46     ${test_main_SOURCES}
    47     win/TestWebCoreStubs.cpp
    48     ${TESTWEBKITAPI_DIR}/TestsController.cpp
    49     ${TESTWEBKITAPI_DIR}/Tests/WebCore/AffineTransform.cpp
    50     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CalculationValue.cpp
    51     ${TESTWEBKITAPI_DIR}/Tests/WebCore/ComplexTextController.cpp
    52     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
    53     ${TESTWEBKITAPI_DIR}/Tests/WebCore/FloatRect.cpp
    54     ${TESTWEBKITAPI_DIR}/Tests/WebCore/FloatPoint.cpp
    55     ${TESTWEBKITAPI_DIR}/Tests/WebCore/FloatSize.cpp
    56     ${TESTWEBKITAPI_DIR}/Tests/WebCore/GridPosition.cpp
    57     ${TESTWEBKITAPI_DIR}/Tests/WebCore/HTMLParserIdioms.cpp
    58     ${TESTWEBKITAPI_DIR}/Tests/WebCore/IntRect.cpp
    59     ${TESTWEBKITAPI_DIR}/Tests/WebCore/IntPoint.cpp
    60     ${TESTWEBKITAPI_DIR}/Tests/WebCore/IntSize.cpp
    61     ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
    62     ${TESTWEBKITAPI_DIR}/Tests/WebCore/MIMETypeRegistry.cpp
    63     ${TESTWEBKITAPI_DIR}/Tests/WebCore/ParsedContentRange.cpp
    64     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SecurityOrigin.cpp
    65     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBuffer.cpp
    66     ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBufferTest.cpp
    67     ${TESTWEBKITAPI_DIR}/Tests/WebCore/TimeRanges.cpp
    68     ${TESTWEBKITAPI_DIR}/Tests/WebCore/TransformationMatrix.cpp
    69     ${TESTWEBKITAPI_DIR}/Tests/WebCore/URLParserTextEncoding.cpp
    70     ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/DIBPixelData.cpp
    71     ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/LinkedFonts.cpp
    7254)
    7355
    7456if (${WTF_PLATFORM_WIN_CAIRO})
    75     list(APPEND test_webcore_LIBRARIES
     57    list(APPEND TestWebCore_LIBRARIES
    7658        ${CAIRO_LIBRARIES}
    7759        ${OPENSSL_LIBRARIES}
     
    8163        vcruntime
    8264    )
    83     list(APPEND TestWebCoreLib_SOURCES
    84         ${TESTWEBKITAPI_DIR}/Tests/WebCore/curl/Cookies.cpp
    85         ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/BitmapImage.cpp
    86         ${TESTWEBKITAPI_DIR}/Tests/WebCore/CryptoDigest.cpp
    87         ${TESTWEBKITAPI_DIR}/Tests/WebCore/PublicSuffix.cpp
     65    list(APPEND TestWebCore_SOURCES
     66        Tests/WebCore/CryptoDigest.cpp
     67
     68        Tests/WebCore/curl/Cookies.cpp
     69
     70        Tests/WebCore/win/BitmapImage.cpp
    8871    )
    8972else ()
    90     list(APPEND test_webcore_LIBRARIES
     73    list(APPEND TestWebCore_LIBRARIES
    9174        ASL${DEBUG_SUFFIX}
    9275        CFNetwork${DEBUG_SUFFIX}
     
    10386
    10487if (USE_CF)
    105     list(APPEND test_webcore_LIBRARIES
     88    list(APPEND TestWebCore_LIBRARIES
    10689        ${COREFOUNDATION_LIBRARY}
    10790    )
    10891endif ()
    10992
    110 if (ENABLE_WEBKIT)
    111     list(APPEND TestWebKitAPI_DEPENDENCIES WebKitFrameworkHeaders)
     93WEBKIT_WRAP_EXECUTABLE(TestWebCore
     94    SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
     95    LIBRARIES shlwapi
     96)
     97target_compile_definitions(TestWebCore PRIVATE ${wrapper_DEFINITIONS})
     98set(TestWebCore_OUTPUT_NAME TestWebCore${DEBUG_SUFFIX})
     99
     100# TestWebKitLegacy
     101if (ENABLE_WEBKIT_LEGACY)
     102    list(APPEND TestWebKitLegacy_SOURCES
     103        ${test_main_SOURCES}
     104
     105        Tests/WebKitLegacy/win/ScaleWebView.cpp
     106        Tests/WebKitLegacy/win/WebViewDestruction.cpp
     107
     108        win/HostWindow.cpp
     109    )
     110
     111    list(APPEND TestWebKitLegacy_DEFINITIONS ${webcore_DEFINITIONS})
     112
     113    list(APPEND TestWebKitLegacy_LIBRARIES
     114        WTF
     115    )
     116
     117    list(APPEND TestWebKitLegacy_PRIVATE_INCLUDE_DIRECTORIES
     118        ${TESTWEBKITAPI_DIR}/win
     119    )
     120
     121    WEBKIT_WRAP_EXECUTABLE(TestWebKitLegacy
     122        SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
     123        LIBRARIES shlwapi
     124    )
     125    target_compile_definitions(TestWebKitLegacy PRIVATE ${wrapper_DEFINITIONS})
     126    set(TestWebKitLegacy_OUTPUT_NAME TestWebKitLegacy${DEBUG_SUFFIX})
    112127endif ()
    113128
    114 add_library(TestWTFLib SHARED
    115     ${test_main_SOURCES}
    116     ${TestWTF_SOURCES}
    117     ${TESTWEBKITAPI_DIR}/win/UtilitiesWin.cpp
    118 )
    119 set_target_properties(TestWTFLib PROPERTIES OUTPUT_NAME "TestWTFLib")
    120 target_link_libraries(TestWTFLib ${test_wtf_LIBRARIES})
    121 add_dependencies(TestWTFLib ${TestWebKitAPI_DEPENDENCIES})
     129# TestWebKit
     130if (ENABLE_WEBKIT)
     131    add_dependencies(TestWebKitAPIBase WebKitFrameworkHeaders)
     132    add_dependencies(TestWebKitAPIInjectedBundle WebKitFrameworkHeaders)
    122133
    123 set(test_wtf_LIBRARIES
    124     shlwapi
    125 )
    126 set(TestWTF_SOURCES
    127 )
    128 
    129 add_library(TestWebCoreLib SHARED
    130     ${TestWebCoreLib_SOURCES}
    131 )
    132 
    133 target_link_libraries(TestWebCoreLib ${test_webcore_LIBRARIES})
    134 set_target_properties(TestWebCoreLib PROPERTIES OUTPUT_NAME "TestWebCoreLib")
    135 add_dependencies(TestWebCoreLib ${TestWebKitAPI_DEPENDENCIES})
    136 
    137 if (PAL_LIBRARY_TYPE MATCHES STATIC)
    138     target_compile_definitions(TestWebCoreLib PRIVATE -DSTATICALLY_LINKED_WITH_PAL=1)
    139 endif ()
    140 
    141 add_executable(TestWebCore
    142     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
    143 )
    144 target_link_libraries(TestWebCore shlwapi)
    145 
    146 
    147 add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebCore)
    148 set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60)
    149 
    150 if (${WTF_PLATFORM_WIN_CAIRO})
    151     include_directories(
    152         ${CAIRO_INCLUDE_DIRS}
    153     )
    154 endif ()
    155 
    156 set(test_webkitlegacy_LIBRARIES
    157     WebCoreTestSupport
    158     WebKitLegacy${DEBUG_SUFFIX}
    159     gtest
    160 )
    161 
    162 if (ENABLE_WEBKIT_LEGACY)
    163     add_library(TestWebKitLegacyLib SHARED
    164         ${test_main_SOURCES}
    165         ${TESTWEBKITAPI_DIR}/TestsController.cpp
    166         ${TESTWEBKITAPI_DIR}/Tests/WebKitLegacy/win/ScaleWebView.cpp
    167         ${TESTWEBKITAPI_DIR}/Tests/WebKitLegacy/win/WebViewDestruction.cpp
    168         ${TESTWEBKITAPI_DIR}/win/HostWindow.cpp
     134    target_sources(TestWebKitAPIInjectedBundle PRIVATE
     135        win/InjectedBundleControllerWin.cpp
     136        win/PlatformUtilitiesWin.cpp
     137        win/UtilitiesWin.cpp
    169138    )
    170139
    171     target_link_libraries(TestWebKitLegacyLib ${test_webkitlegacy_LIBRARIES})
    172     add_dependencies(TestWebKitLegacyLib ${TestWebKitAPI_DEPENDENCIES})
     140    list(APPEND TestWebKit_SOURCES
     141        ${test_main_SOURCES}
    173142
    174     add_executable(TestWebKitLegacy
    175         ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
    176     )
    177     target_link_libraries(TestWebKitLegacy shlwapi)
    178 
    179     add_test(TestWebKitLegacy ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitLegacy)
    180     set_tests_properties(TestWebKitLegacy PROPERTIES TIMEOUT 60)
    181 
    182     add_dependencies(TestWebKitLegacy TestWebKitLegacyLib)
    183 endif ()
    184 
    185 if (ENABLE_WEBKIT)
    186     set(bundle_harness_SOURCES
    187         ${TESTWEBKITAPI_DIR}/win/UtilitiesWin.cpp
    188         ${TESTWEBKITAPI_DIR}/win/InjectedBundleControllerWin.cpp
    189         ${TESTWEBKITAPI_DIR}/win/PlatformUtilitiesWin.cpp
    190     )
    191 
    192     set(webkit_api_harness_SOURCES
    193         ${TESTWEBKITAPI_DIR}/win/PlatformUtilitiesWin.cpp
    194         ${TESTWEBKITAPI_DIR}/win/PlatformWebViewWin.cpp
    195         ${TESTWEBKITAPI_DIR}/win/UtilitiesWin.cpp
     143        win/PlatformUtilitiesWin.cpp
     144        win/PlatformWebViewWin.cpp
     145        win/UtilitiesWin.cpp
    196146    )
    197147
    198148    if (${WTF_PLATFORM_WIN_CAIRO})
    199         list(APPEND test_webkit_api_SOURCES
    200             ${TESTWEBKITAPI_DIR}/Tests/WebKit/curl/Certificates.cpp
     149        list(APPEND TestWebKit_SOURCES
     150            Tests/WebKit/curl/Certificates.cpp
    201151        )
    202152    endif ()
    203153
    204     add_library(TestWebKitLib SHARED
    205         ${TESTWEBKITAPI_DIR}/win/main.cpp
    206         ${test_webkit_api_SOURCES}
     154    list(APPEND TestWebKit_DEFINITIONS ${webcore_DEFINITIONS})
     155
     156    list(APPEND TestWebKit_DEPENDENCIES
     157        WebKitFrameworkHeaders
    207158    )
    208159
    209     target_link_libraries(TestWebKitLib ${test_webkit_api_LIBRARIES})
    210 
    211     add_executable(TestWebKit
    212         ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
     160    WEBKIT_WRAP_EXECUTABLE(TestWebKit
     161        SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
     162        LIBRARIES shlwapi
    213163    )
    214     target_link_libraries(TestWebKit shlwapi)
    215 
    216     add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit/TestWebKit)
    217     set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
    218     set_target_properties(TestWebKit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit)
    219 
    220     add_dependencies(TestWebKit TestWebKitAPIBase WebKitFrameworkHeaders)
     164    target_compile_definitions(TestWebKit PRIVATE ${wrapper_DEFINITIONS})
     165    set(TestWebKit_OUTPUT_NAME TestWebKit${DEBUG_SUFFIX})
    221166endif ()
    222 
    223 set(test_main_SOURCES
    224     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
    225 )
    226 
    227 add_dependencies(TestWebCore TestWebCoreLib)
  • trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp

    r231806 r244857  
    2626#include "config.h"
    2727
    28 #if! PLATFORM(WIN)
    29 #include "PlatformUtilities.h"
    30 #endif
    3128#include "RefLogger.h"
     29#include "Utilities.h"
    3230#include <wtf/MainThread.h>
    3331#include <wtf/NeverDestroyed.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp

    r244695 r244857  
    2626#include "config.h"
    2727
    28 #include "PlatformUtilities.h"
     28#include "Utilities.h"
    2929#include <JavaScriptCore/InitializeThreading.h>
    3030#include <WebCore/CombinedURLFilters.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp

    r240437 r244857  
    2626#include "config.h"
    2727
    28 #include "PlatformUtilities.h"
    2928#include "Test.h"
     29#include "Utilities.h"
    3030#include "WTFStringUtilities.h"
    3131#include <WebCore/FileMonitor.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/LineBreaking.mm

    r242339 r244857  
    2626#include "config.h"
    2727
    28 #import "PlatformUtilities.h"
    2928#import "TestNavigationDelegate.h"
     29#import "Utilities.h"
    3030#import <unicode/ubrk.h>
    3131#import <wtf/RetainPtr.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm

    r235835 r244857  
    2626#import "config.h"
    2727
    28 #import "PlatformUtilities.h"
    2928#import "SharedBufferTest.h"
     29#import "Utilities.h"
    3030#import <WebCore/SharedBuffer.h>
    3131
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm

    r237266 r244857  
    2828#if !PLATFORM(IOS_FAMILY)
    2929
    30 #import "PlatformUtilities.h"
     30#import "Utilities.h"
    3131#import <JavaScriptCore/InitializeThreading.h>
    3232#import <WebCore/Frame.h>
  • trunk/Tools/TestWebKitAPI/config.h

    r237266 r244857  
    2828#endif
    2929
    30 #include <JavaScriptCore/JSExportMacros.h>
    31 #ifndef BUILDING_JSCONLY__
    32 #include <WebCore/PlatformExportMacros.h>
    33 #include <pal/ExportMacros.h>
    34 #endif
     30#include <wtf/Platform.h>
    3531
    3632#if defined(__APPLE__) && __APPLE__
     
    4440#endif
    4541
    46 #include <stdint.h>
     42#if defined(BUILDING_WITH_CMAKE)
    4743
    48 #if !PLATFORM(IOS_FAMILY) && !defined(BUILDING_JSCONLY__) && (!PLATFORM(WIN) || PLATFORM(WIN_CAIRO))
     44// CMake path
     45#if defined(BUILDING_TestJSC)
     46#include <JavaScriptCore/JSExportMacros.h>
     47#endif
     48
     49#if defined(BUILDING_TestWebCore)
     50#include <JavaScriptCore/JSExportMacros.h>
     51#include <WebCore/PlatformExportMacros.h>
     52#include <pal/ExportMacros.h>
     53#endif
     54
     55#if defined(BUILDING_TestWebKit)
     56#include <JavaScriptCore/JSExportMacros.h>
     57#include <WebCore/PlatformExportMacros.h>
     58#include <pal/ExportMacros.h>
    4959#include <WebKit/WebKit2_C.h>
    5060#endif
     61
     62#else
     63
     64// XCode path
     65#include <JavaScriptCore/JSExportMacros.h>
     66#include <WebCore/PlatformExportMacros.h>
     67#include <pal/ExportMacros.h>
     68#if !PLATFORM(IOS_FAMILY)
     69#include <WebKit/WebKit2_C.h>
     70#endif
     71#if PLATFORM(COCOA) && defined(__OBJC__)
     72#import <WebKit/WebKit.h>
     73#endif
     74
     75#endif
     76
     77#include <stdint.h>
    5178
    5279#ifdef __clang__
     
    7198#endif
    7299
    73 #if PLATFORM(COCOA) && defined(__OBJC__)
    74 // FIXME: Get Cocoa tests working with CMake on Mac.
    75 #if !defined(BUILDING_WITH_CMAKE)
    76 #import <WebKit/WebKit.h>
    77 #endif
    78 #endif
    79 
    80100#if !PLATFORM(IOS_FAMILY) && !defined(BUILDING_JSCONLY__)
    81101#define WK_HAVE_C_SPI 1
Note: See TracChangeset for help on using the changeset viewer.