⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 230744 in webkit


Ignore:
Timestamp:
Apr 17, 2018, 6:01:09 PM (8 years ago)
Author:
Fujii Hironori
Message:

[WinCairo][TestWebKitAPI] Implement PlatformWebView for TestWebKit
https://bugs.webkit.org/show_bug.cgi?id=184524

Reviewed by Alex Christensen.

Resurrect PlatformWebView for Windows port which was removed in Bug 104607.

  • TestWebKitAPI/PlatformWebView.h:
  • TestWebKitAPI/PlatformWin.cmake:
  • TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Added.

(TestWebKitAPI::InjectedBundleController::platformInitialize):

  • TestWebKitAPI/win/PlatformUtilitiesWin.cpp: Added.

(TestWebKitAPI::Util::moduleDirectory):
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::isKeyDown):

  • TestWebKitAPI/win/PlatformWebViewWin.cpp: Added.

(TestWebKitAPI::PlatformWebView::registerWindowClass):
(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::initialize):
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
(TestWebKitAPI::PlatformWebView::page const):
(TestWebKitAPI::PlatformWebView::resizeTo):
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
(TestWebKitAPI::PlatformWebView::wndProc):

  • TestWebKitAPI/win/UtilitiesWin.cpp: Added.

(TestWebKitAPI::Util::run):
(TestWebKitAPI::Util::spinRunLoop):
(TestWebKitAPI::Util::sleep):

Location:
trunk/Tools
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r230742 r230744  
     12018-04-17  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [WinCairo][TestWebKitAPI] Implement PlatformWebView for TestWebKit
     4        https://bugs.webkit.org/show_bug.cgi?id=184524
     5
     6        Reviewed by Alex Christensen.
     7
     8        Resurrect PlatformWebView for Windows port which was removed in Bug 104607.
     9
     10        * TestWebKitAPI/PlatformWebView.h:
     11        * TestWebKitAPI/PlatformWin.cmake:
     12        * TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Added.
     13        (TestWebKitAPI::InjectedBundleController::platformInitialize):
     14        * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: Added.
     15        (TestWebKitAPI::Util::moduleDirectory):
     16        (TestWebKitAPI::Util::createInjectedBundlePath):
     17        (TestWebKitAPI::Util::createURLForResource):
     18        (TestWebKitAPI::Util::URLForNonExistentResource):
     19        (TestWebKitAPI::Util::isKeyDown):
     20        * TestWebKitAPI/win/PlatformWebViewWin.cpp: Added.
     21        (TestWebKitAPI::PlatformWebView::registerWindowClass):
     22        (TestWebKitAPI::PlatformWebView::PlatformWebView):
     23        (TestWebKitAPI::PlatformWebView::initialize):
     24        (TestWebKitAPI::PlatformWebView::~PlatformWebView):
     25        (TestWebKitAPI::PlatformWebView::page const):
     26        (TestWebKitAPI::PlatformWebView::resizeTo):
     27        (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
     28        (TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
     29        (TestWebKitAPI::PlatformWebView::simulateRightClick):
     30        (TestWebKitAPI::PlatformWebView::simulateMouseMove):
     31        (TestWebKitAPI::PlatformWebView::wndProc):
     32        * TestWebKitAPI/win/UtilitiesWin.cpp: Added.
     33        (TestWebKitAPI::Util::run):
     34        (TestWebKitAPI::Util::spinRunLoop):
     35        (TestWebKitAPI::Util::sleep):
     36
    1372018-04-17  Jonathan Bedard  <jbedard@apple.com>
    238
  • trunk/Tools/TestWebKitAPI/PlatformWebView.h

    r230562 r230744  
    5353typedef WKViewRef PlatformWKView;
    5454typedef HeadlessViewBackend *PlatformWindow;
     55#elif PLATFORM(WIN)
     56typedef WKViewRef PlatformWKView;
     57typedef HWND PlatformWindow;
    5558#endif
    5659
     
    8386#if PLATFORM(MAC)
    8487    void initialize(WKPageConfigurationRef, Class wkViewSubclass);
    85 #elif PLATFORM(GTK) || PLATFORM(WPE)
     88#elif PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)
    8689    void initialize(WKPageConfigurationRef);
     90#endif
     91#if PLATFORM(WIN)
     92    static void registerWindowClass();
     93    static LRESULT CALLBACK wndProc(HWND, UINT message, WPARAM, LPARAM);
    8794#endif
    8895
  • trunk/Tools/TestWebKitAPI/PlatformWin.cmake

    r228451 r230744  
    163163endif ()
    164164
     165if (ENABLE_WEBKIT)
     166    set(bundle_harness_SOURCES
     167        ${TESTWEBKITAPI_DIR}/win/UtilitiesWin.cpp
     168        ${TESTWEBKITAPI_DIR}/win/InjectedBundleControllerWin.cpp
     169        ${TESTWEBKITAPI_DIR}/win/PlatformUtilitiesWin.cpp
     170    )
     171
     172    set(webkit_api_harness_SOURCES
     173        ${TESTWEBKITAPI_DIR}/win/PlatformUtilitiesWin.cpp
     174        ${TESTWEBKITAPI_DIR}/win/PlatformWebViewWin.cpp
     175        ${TESTWEBKITAPI_DIR}/win/UtilitiesWin.cpp
     176    )
     177
     178    add_library(TestWebKitLib SHARED
     179        ${TESTWEBKITAPI_DIR}/win/main.cpp
     180        ${test_webkit_api_SOURCES}
     181    )
     182
     183    target_link_libraries(TestWebKitLib ${test_webkit_api_LIBRARIES})
     184
     185    add_executable(TestWebKit
     186        ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
     187    )
     188    target_link_libraries(TestWebKit shlwapi)
     189
     190    add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit/TestWebKit)
     191    set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
     192    set_target_properties(TestWebKit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebKit)
     193
     194    add_dependencies(TestWebKit TestWebKitAPIBase)
     195endif ()
     196
    165197set(test_main_SOURCES
    166198    ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
Note: See TracChangeset for help on using the changeset viewer.