forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WPE] Add a MiniBrowser and use it to run WebDriver tests
https://bugs.webkit.org/show_bug.cgi?id=186345 Reviewed by Žan Doberšek. .: Add an option to enable building the MiniBrowser. * Source/cmake/FindWaylandProtocols.cmake: Added. * Source/cmake/OptionsWPE.cmake: Source/WebDriver: Use MiniBrowser instead of dyz as the default WebDriver browser for WPE. * wpe/WebDriverServiceWPE.cpp: (WebDriver::WebDriverService::platformParseCapabilities const): Tools: Most of the code is based on dyz and gtk MiniBrowser. This patch adds a new internal library WPEToolingBackends, including the headless view backend and a new window backend to be used by the MiniBrowser. MiniBrowser can also run in headless mode, by using the headless backend instead of the window one, which will allow us to run the WebDriver tests in the bots. * CMakeLists.txt: * MiniBrowser/wpe/CMakeLists.txt: Added. * MiniBrowser/wpe/main.cpp: Added. (automationStartedCallback): (createViewBackend): (main): * Scripts/run-minibrowser: Remove WPE specific code. * Scripts/run-webdriver-tests: Add headless display-server option. * Scripts/webkitdirs.pm: (launcherName): Remove WPE specific code. * Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: (WebDriverWPE.browser_name): Return MiniBrowser. (WebDriverWPE.browser_path): Return the path to the MiniBrowser in build dir. (WebDriverWPE.browser_args): Add --headless when running in headless mode. (WebDriverWPE.capabilities): Use the full browser path. * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.collect_tests): Fix early return value. * TestWebKitAPI/PlatformWPE.cmake: Use WPEToolingBackends instead of HeadlessViewBackend. * TestWebKitAPI/PlatformWebView.h: Ditto. * TestWebKitAPI/glib/PlatformWPE.cmake: Ditto * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::createWebViewBackend): Ditto. * TestWebKitAPI/wpe/PlatformWebViewWPE.cpp: (TestWebKitAPI::PlatformWebView::initialize): Ditto. * WebKitTestRunner/PlatformWPE.cmake: Ditto. * WebKitTestRunner/PlatformWebView.h: Ditto. * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: (WTR::PlatformWebView::PlatformWebView): Ditto. * wpe/HeadlessViewBackend/CMakeLists.txt: Removed. * wpe/backends/CMakeLists.txt: Added. * wpe/backends/HeadlessViewBackend.cpp: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp. (WPEToolingBackends::getEGLDisplay): (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::createSnapshot): (WPEToolingBackends::HeadlessViewBackend::performUpdate): (WPEToolingBackends::HeadlessViewBackend::displayBuffer): * wpe/backends/HeadlessViewBackend.h: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.h. * wpe/backends/ViewBackend.cpp: Added. (WPEToolingBackends::ViewBackend::ViewBackend): (WPEToolingBackends::ViewBackend::~ViewBackend): (WPEToolingBackends::ViewBackend::initialize): (WPEToolingBackends::ViewBackend::setInputClient): (WPEToolingBackends::ViewBackend::backend const): (WPEToolingBackends::ViewBackend::dispatchInputPointerEvent): (WPEToolingBackends::ViewBackend::dispatchInputAxisEvent): (WPEToolingBackends::ViewBackend::dispatchInputKeyboardEvent): * wpe/backends/ViewBackend.h: Added. * wpe/backends/WindowViewBackend.cpp: Added. (WPEToolingBackends::WindowViewBackend::WindowViewBackend): (WPEToolingBackends::WindowViewBackend::~WindowViewBackend): (WPEToolingBackends::WindowViewBackend::displayBuffer): (WPEToolingBackends::WindowViewBackend::handleKeyEvent): * wpe/backends/WindowViewBackend.h: Added. * wpe/jhbuild.modules: Remove dyz and add wayland-protocols. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@232670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
c35db67
commit 2c873db
Showing
31 changed files
with
1,479 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
2018-06-10 Carlos Garcia Campos <[email protected]> | ||
|
||
[WPE] Add a MiniBrowser and use it to run WebDriver tests | ||
https://bugs.webkit.org/show_bug.cgi?id=186345 | ||
|
||
Reviewed by Žan Doberšek. | ||
|
||
Add an option to enable building the MiniBrowser. | ||
|
||
* Source/cmake/FindWaylandProtocols.cmake: Added. | ||
* Source/cmake/OptionsWPE.cmake: | ||
|
||
2018-06-06 Dan Bernstein <[email protected]> | ||
|
||
[Xcode] Opt out of the New Build System | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
2018-06-10 Carlos Garcia Campos <[email protected]> | ||
|
||
[WPE] Add a MiniBrowser and use it to run WebDriver tests | ||
https://bugs.webkit.org/show_bug.cgi?id=186345 | ||
|
||
Reviewed by Žan Doberšek. | ||
|
||
Use MiniBrowser instead of dyz as the default WebDriver browser for WPE. | ||
|
||
* wpe/WebDriverServiceWPE.cpp: | ||
(WebDriver::WebDriverService::platformParseCapabilities const): | ||
|
||
2018-06-04 Carlos Garcia Campos <[email protected]> | ||
|
||
[WPE] WebDriver: stop making mandatory to provide a browser path if wpe:browserOptions is present in capabilities | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# - Try to find WaylandProtocols | ||
# Once done, this will define | ||
# | ||
# WAYLAND_PROTOCOLS_FOUND - system has WaylandProtocols. | ||
# WAYLAND_PROTOCOLS_DATADIR - the WaylandProtocols data directory | ||
# WAYLAND_SCANNER - the path to the wayland-scanner command. | ||
# | ||
# Copyright (C) 2018 Igalia S.L. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS | ||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
find_package(PkgConfig) | ||
pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols) | ||
|
||
if (WAYLAND_PROTOCOLS_FOUND) | ||
pkg_get_variable(WAYLAND_PROTOCOLS_DATADIR wayland-protocols pkgdatadir) | ||
find_program(WAYLAND_SCANNER NAMES wayland-scanner) | ||
mark_as_advanced(WAYLAND_PROTOCOLS_DATADIR WAYLAND_SCANNER) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,71 @@ | ||
2018-06-10 Carlos Garcia Campos <[email protected]> | ||
|
||
[WPE] Add a MiniBrowser and use it to run WebDriver tests | ||
https://bugs.webkit.org/show_bug.cgi?id=186345 | ||
|
||
Reviewed by Žan Doberšek. | ||
|
||
Most of the code is based on dyz and gtk MiniBrowser. This patch adds a new internal library WPEToolingBackends, | ||
including the headless view backend and a new window backend to be used by the MiniBrowser. MiniBrowser can also | ||
run in headless mode, by using the headless backend instead of the window one, which will allow us to run the | ||
WebDriver tests in the bots. | ||
|
||
* CMakeLists.txt: | ||
* MiniBrowser/wpe/CMakeLists.txt: Added. | ||
* MiniBrowser/wpe/main.cpp: Added. | ||
(automationStartedCallback): | ||
(createViewBackend): | ||
(main): | ||
* Scripts/run-minibrowser: Remove WPE specific code. | ||
* Scripts/run-webdriver-tests: Add headless display-server option. | ||
* Scripts/webkitdirs.pm: | ||
(launcherName): Remove WPE specific code. | ||
* Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: | ||
(WebDriverWPE.browser_name): Return MiniBrowser. | ||
(WebDriverWPE.browser_path): Return the path to the MiniBrowser in build dir. | ||
(WebDriverWPE.browser_args): Add --headless when running in headless mode. | ||
(WebDriverWPE.capabilities): Use the full browser path. | ||
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: | ||
(WebDriverTestRunnerSelenium.collect_tests): Fix early return value. | ||
* TestWebKitAPI/PlatformWPE.cmake: Use WPEToolingBackends instead of HeadlessViewBackend. | ||
* TestWebKitAPI/PlatformWebView.h: Ditto. | ||
* TestWebKitAPI/glib/PlatformWPE.cmake: Ditto | ||
* TestWebKitAPI/glib/WebKitGLib/TestMain.h: | ||
(Test::createWebViewBackend): Ditto. | ||
* TestWebKitAPI/wpe/PlatformWebViewWPE.cpp: | ||
(TestWebKitAPI::PlatformWebView::initialize): Ditto. | ||
* WebKitTestRunner/PlatformWPE.cmake: Ditto. | ||
* WebKitTestRunner/PlatformWebView.h: Ditto. | ||
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: | ||
(WTR::PlatformWebView::PlatformWebView): Ditto. | ||
* wpe/HeadlessViewBackend/CMakeLists.txt: Removed. | ||
* wpe/backends/CMakeLists.txt: Added. | ||
* wpe/backends/HeadlessViewBackend.cpp: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp. | ||
(WPEToolingBackends::getEGLDisplay): | ||
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): | ||
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend): | ||
(WPEToolingBackends::HeadlessViewBackend::createSnapshot): | ||
(WPEToolingBackends::HeadlessViewBackend::performUpdate): | ||
(WPEToolingBackends::HeadlessViewBackend::displayBuffer): | ||
* wpe/backends/HeadlessViewBackend.h: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.h. | ||
* wpe/backends/ViewBackend.cpp: Added. | ||
(WPEToolingBackends::ViewBackend::ViewBackend): | ||
(WPEToolingBackends::ViewBackend::~ViewBackend): | ||
(WPEToolingBackends::ViewBackend::initialize): | ||
(WPEToolingBackends::ViewBackend::setInputClient): | ||
(WPEToolingBackends::ViewBackend::backend const): | ||
(WPEToolingBackends::ViewBackend::dispatchInputPointerEvent): | ||
(WPEToolingBackends::ViewBackend::dispatchInputAxisEvent): | ||
(WPEToolingBackends::ViewBackend::dispatchInputKeyboardEvent): | ||
* wpe/backends/ViewBackend.h: Added. | ||
* wpe/backends/WindowViewBackend.cpp: Added. | ||
(WPEToolingBackends::WindowViewBackend::WindowViewBackend): | ||
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend): | ||
(WPEToolingBackends::WindowViewBackend::displayBuffer): | ||
(WPEToolingBackends::WindowViewBackend::handleKeyEvent): | ||
* wpe/backends/WindowViewBackend.h: Added. | ||
* wpe/jhbuild.modules: Remove dyz and add wayland-protocols. | ||
|
||
2018-06-10 Fujii Hironori <[email protected]> | ||
|
||
[Win][MiniBrowser] MiniBrowser class should be renamed to WebKitLegacyBrowserWindow | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
set(MINIBROWSER_DIR "${TOOLS_DIR}/MiniBrowser/wpe") | ||
|
||
set(MiniBrowser_SOURCES | ||
${MINIBROWSER_DIR}/main.cpp | ||
) | ||
|
||
set(MiniBrowser_INCLUDE_DIRECTORIES | ||
${TOOLS_DIR}/wpe/backends/ | ||
${DERIVED_SOURCES_WPE_API_DIR} | ||
${FORWARDING_HEADERS_WPE_DIR} | ||
${CMAKE_BINARY_DIR}/DerivedSources/WPEToolingBackends | ||
) | ||
|
||
set(MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES | ||
${WPE_INCLUDE_DIRS} | ||
${WPEBACKEND_FDO_INCLUDE_DIRS} | ||
) | ||
|
||
set(MiniBrowser_LIBRARIES | ||
${JavaScriptCore_LIBRARY_NAME} | ||
WPEToolingBackends | ||
WebKit | ||
${WPE_LIBRARIES} | ||
${WPEBACKEND_FDO_LIBRARIES} | ||
) | ||
|
||
if (DEVELOPER_MODE) | ||
add_definitions(-DWEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") | ||
endif () | ||
|
||
include_directories(${MiniBrowser_INCLUDE_DIRECTORIES}) | ||
include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) | ||
add_executable(MiniBrowser ${MiniBrowser_SOURCES}) | ||
target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES}) | ||
|
||
install(TARGETS MiniBrowser DESTINATION "${LIBEXEC_INSTALL_DIR}") |
Oops, something went wrong.