Diff
Modified: releases/WebKitGTK/webkit-2.18/ChangeLog (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/ChangeLog 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/ChangeLog 2017-12-18 11:27:20 UTC (rev 226025)
@@ -1,3 +1,14 @@
+2017-11-15 Carlos Garcia Campos <[email protected]>
+
+ [WPE] Add initial support for WebDriver
+ https://bugs.webkit.org/show_bug.cgi?id=179727
+
+ Reviewed by Michael Catanzaro.
+
+ Enable WebDriver by default in WPE.
+
+ * Source/cmake/OptionsWPE.cmake:
+
2017-11-10 Carlos Garcia Campos <[email protected]>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.18.3 release.
Modified: releases/WebKitGTK/webkit-2.18/Source/WebDriver/Capabilities.h (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/Capabilities.h 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/Capabilities.h 2017-12-18 11:27:20 UTC (rev 226025)
@@ -58,9 +58,11 @@
std::optional<Timeouts> timeouts;
std::optional<PageLoadStrategy> pageLoadStrategy;
std::optional<UnhandledPromptBehavior> unhandledPromptBehavior;
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(WPE)
std::optional<String> browserBinary;
std::optional<Vector<String>> browserArguments;
+#endif
+#if PLATFORM(GTK)
std::optional<bool> useOverlayScrollbars;
#endif
};
Modified: releases/WebKitGTK/webkit-2.18/Source/WebDriver/ChangeLog (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/ChangeLog 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/ChangeLog 2017-12-18 11:27:20 UTC (rev 226025)
@@ -1,3 +1,26 @@
+2017-11-15 Carlos Garcia Campos <[email protected]>
+
+ [WPE] Add initial support for WebDriver
+ https://bugs.webkit.org/show_bug.cgi?id=179727
+
+ Reviewed by Michael Catanzaro.
+
+ Add WPE implementation for platform-specific methods. Move the version handling to a common file
+ WebDriverServiceGLib.cpp.
+
+ * Capabilities.h:
+ * PlatformGTK.cmake:
+ * PlatformWPE.cmake:
+ * glib/WebDriverServiceGLib.cpp: Added.
+ (WebDriver::parseVersion):
+ (WebDriver::WebDriverService::platformCompareBrowserVersions):
+ * gtk/WebDriverServiceGtk.cpp:
+ * wpe/WebDriverServiceWPE.cpp: Copied from Source/WebDriver/gtk/WebDriverServiceGtk.cpp.
+ (WebDriver::WebDriverService::platformCapabilities):
+ (WebDriver::WebDriverService::platformValidateCapability const):
+ (WebDriver::WebDriverService::platformMatchCapability const):
+ (WebDriver::WebDriverService::platformParseCapabilities const):
+
2017-11-07 Brian Burg <[email protected]>
Web Automation: inViewCenterPoint should not include topContentInset when computed in viewport coordinates
Modified: releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformGTK.cmake (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformGTK.cmake 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformGTK.cmake 2017-12-18 11:27:20 UTC (rev 226025)
@@ -9,6 +9,7 @@
list(APPEND WebDriver_SOURCES
glib/SessionHostGlib.cpp
+ glib/WebDriverServiceGLib.cpp
gtk/WebDriverServiceGtk.cpp
Copied: releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformWPE.cmake (from rev 226024, releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformGTK.cmake) (0 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformWPE.cmake (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/PlatformWPE.cmake 2017-12-18 11:27:20 UTC (rev 226025)
@@ -0,0 +1,19 @@
+set(WebDriver_Process_OUTPUT_NAME WPEWebDriver)
+
+list(APPEND WebDriver_SYSTEM_INCLUDE_DIRECTORIES
+ "${GLIB_INCLUDE_DIRS}"
+ "${LIBSOUP_INCLUDE_DIRS}"
+)
+
+list(APPEND WebDriver_SOURCES
+ glib/SessionHostGlib.cpp
+ glib/WebDriverServiceGLib.cpp
+
+ soup/HTTPServerSoup.cpp
+
+ wpe/WebDriverServiceWPE.cpp
+)
+
+list(APPEND WebDriver_LIBRARIES
+ ${LIBSOUP_LIBRARIES}
+)
Added: releases/WebKitGTK/webkit-2.18/Source/WebDriver/glib/WebDriverServiceGLib.cpp (0 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/glib/WebDriverServiceGLib.cpp (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/glib/WebDriverServiceGLib.cpp 2017-12-18 11:27:20 UTC (rev 226025)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2017 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 APPLE INC. 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 APPLE INC. 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.
+ */
+
+#include "config.h"
+#include "WebDriverService.h"
+
+namespace WebDriver {
+
+static bool parseVersion(const String& version, uint64_t& major, uint64_t& minor, uint64_t& micro)
+{
+ major = minor = micro = 0;
+
+ Vector<String> tokens;
+ version.split(".", false, tokens);
+ bool ok;
+ switch (tokens.size()) {
+ case 3:
+ micro = tokens[2].toInt64(&ok);
+ if (!ok)
+ return false;
+ FALLTHROUGH;
+ case 2:
+ minor = tokens[1].toInt64(&ok);
+ if (!ok)
+ return false;
+ FALLTHROUGH;
+ case 1:
+ major = tokens[0].toInt64(&ok);
+ if (!ok)
+ return false;
+ break;
+ default:
+ return false;
+ }
+
+ return true;
+}
+
+bool WebDriverService::platformCompareBrowserVersions(const String& requiredVersion, const String& proposedVersion)
+{
+ // We require clients to use format major.micro.minor as version string.
+ uint64_t requiredMajor, requiredMinor, requiredMicro;
+ if (!parseVersion(requiredVersion, requiredMajor, requiredMinor, requiredMicro))
+ return false;
+
+ uint64_t proposedMajor, proposedMinor, proposedMicro;
+ if (!parseVersion(proposedVersion, proposedMajor, proposedMinor, proposedMicro))
+ return false;
+
+ return proposedMajor > requiredMajor
+ || (proposedMajor == requiredMajor && proposedMinor > requiredMinor)
+ || (proposedMajor == requiredMajor && proposedMinor == requiredMinor && proposedMicro >= requiredMicro);
+}
+
+} // namespace WebDriver
Modified: releases/WebKitGTK/webkit-2.18/Source/WebDriver/gtk/WebDriverServiceGtk.cpp (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/gtk/WebDriverServiceGtk.cpp 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/gtk/WebDriverServiceGtk.cpp 2017-12-18 11:27:20 UTC (rev 226025)
@@ -85,52 +85,6 @@
return std::nullopt;
}
-static bool parseVersion(const String& version, uint64_t& major, uint64_t& minor, uint64_t& micro)
-{
- major = minor = micro = 0;
-
- Vector<String> tokens;
- version.split(".", false, tokens);
- bool ok;
- switch (tokens.size()) {
- case 3:
- micro = tokens[2].toInt64(&ok);
- if (!ok)
- return false;
- FALLTHROUGH;
- case 2:
- minor = tokens[1].toInt64(&ok);
- if (!ok)
- return false;
- FALLTHROUGH;
- case 1:
- major = tokens[0].toInt64(&ok);
- if (!ok)
- return false;
- break;
- default:
- return false;
- }
-
- return true;
-}
-
-bool WebDriverService::platformCompareBrowserVersions(const String& requiredVersion, const String& proposedVersion)
-{
- // We require clients to use format major.micro.minor as version string.
- uint64_t requiredMajor, requiredMinor, requiredMicro;
- if (!parseVersion(requiredVersion, requiredMajor, requiredMinor, requiredMicro))
- return false;
-
- uint64_t proposedMajor, proposedMinor, proposedMicro;
- if (!parseVersion(proposedVersion, proposedMajor, proposedMinor, proposedMicro))
- return false;
-
- return proposedMajor > requiredMajor
- || (proposedMajor == requiredMajor && proposedMinor > requiredMinor)
- || (proposedMajor == requiredMajor && proposedMinor == requiredMinor && proposedMicro >= requiredMicro);
-}
-
void WebDriverService::platformParseCapabilities(const InspectorObject& matchedCapabilities, Capabilities& capabilities) const
{
RefPtr<InspectorObject> browserOptions;
Copied: releases/WebKitGTK/webkit-2.18/Source/WebDriver/wpe/WebDriverServiceWPE.cpp (from rev 226024, releases/WebKitGTK/webkit-2.18/Source/WebDriver/gtk/WebDriverServiceGtk.cpp) (0 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/WebDriver/wpe/WebDriverServiceWPE.cpp (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Source/WebDriver/wpe/WebDriverServiceWPE.cpp 2017-12-18 11:27:20 UTC (rev 226025)
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2017 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 APPLE INC. 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 APPLE INC. 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.
+ */
+
+#include "config.h"
+#include "WebDriverService.h"
+
+#include "Capabilities.h"
+#include "CommandResult.h"
+#include <inspector/InspectorValues.h>
+
+using namespace Inspector;
+
+namespace WebDriver {
+
+Capabilities WebDriverService::platformCapabilities()
+{
+ Capabilities capabilities;
+ capabilities.platformName = String("linux");
+ capabilities.acceptInsecureCerts = false;
+ return capabilities;
+}
+
+bool WebDriverService::platformValidateCapability(const String& name, const RefPtr<InspectorValue>& value) const
+{
+ if (name != "wpe:browserOptions")
+ return true;
+
+ RefPtr<InspectorObject> browserOptions;
+ if (!value->asObject(browserOptions))
+ return false;
+
+ if (browserOptions->isNull())
+ return true;
+
+ // If browser options are provided, binary is required.
+ String binary;
+ if (!browserOptions->getString(ASCIILiteral("binary"), binary))
+ return false;
+
+ RefPtr<InspectorValue> browserArgumentsValue;
+ RefPtr<InspectorArray> browserArguments;
+ if (browserOptions->getValue(ASCIILiteral("args"), browserArgumentsValue) && !browserArgumentsValue->asArray(browserArguments))
+ return false;
+
+ unsigned browserArgumentsLength = browserArguments->length();
+ for (unsigned i = 0; i < browserArgumentsLength; ++i) {
+ RefPtr<InspectorValue> value = browserArguments->get(i);
+ String argument;
+ if (!value->asString(argument))
+ return false;
+ }
+
+ return true;
+}
+
+std::optional<String> WebDriverService::platformMatchCapability(const String&, const RefPtr<InspectorValue>&) const
+{
+ return std::nullopt;
+}
+
+void WebDriverService::platformParseCapabilities(const InspectorObject& matchedCapabilities, Capabilities& capabilities) const
+{
+ RefPtr<InspectorObject> browserOptions;
+ if (!matchedCapabilities.getObject(ASCIILiteral("wpe:browserOptions"), browserOptions)) {
+ capabilities.browserBinary = String("dyz");
+ capabilities.browserArguments = Vector<String> { ASCIILiteral("--automation") };
+ return;
+ }
+
+ String browserBinary;
+ browserOptions->getString(ASCIILiteral("binary"), browserBinary);
+ ASSERT(!browserBinary.isNull());
+ capabilities.browserBinary = browserBinary;
+
+ capabilities.browserArguments = Vector<String>();
+ RefPtr<InspectorArray> browserArguments;
+ if (browserOptions->getArray(ASCIILiteral("args"), browserArguments)) {
+ unsigned browserArgumentsLength = browserArguments->length();
+ capabilities.browserArguments->reserveInitialCapacity(browserArgumentsLength);
+ for (unsigned i = 0; i < browserArgumentsLength; ++i) {
+ RefPtr<InspectorValue> value = browserArguments->get(i);
+ String argument;
+ value->asString(argument);
+ ASSERT(!argument.isNull());
+ capabilities.browserArguments->uncheckedAppend(WTFMove(argument));
+ }
+ }
+}
+
+} // namespace WebDriver
Modified: releases/WebKitGTK/webkit-2.18/Source/cmake/OptionsWPE.cmake (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Source/cmake/OptionsWPE.cmake 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Source/cmake/OptionsWPE.cmake 2017-12-18 11:27:20 UTC (rev 226025)
@@ -16,6 +16,8 @@
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA PUBLIC OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PUBLIC OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PUBLIC ON)
+
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT PUBLIC ON)
Modified: releases/WebKitGTK/webkit-2.18/Tools/ChangeLog (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/ChangeLog 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Tools/ChangeLog 2017-12-18 11:27:20 UTC (rev 226025)
@@ -1,3 +1,29 @@
+2017-11-15 Carlos Garcia Campos <[email protected]>
+
+ [WPE] Add initial support for WebDriver
+ https://bugs.webkit.org/show_bug.cgi?id=179727
+
+ Reviewed by Michael Catanzaro.
+
+ Make it possible to run WebDriver tests with WPE.
+
+ * Scripts/run-webdriver-tests: Add --wpe alias for --platform=wpe.
+ * Scripts/webkitpy/port/wpe.py:
+ (WPEPort.__init__): Initialize _display_server from options.
+ (WPEPort._driver_class): Use WaylandDriver when wayland is passed as display server option.
+ * Scripts/webkitpy/webdriver_tests/webdriver_driver.py:
+ (WebDriver.browser_env): Add virtual method to get the environment that should be used.
+ * Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: Copied from Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py.
+ (WebDriverWPE):
+ (WebDriverWPE.__init__):
+ (WebDriverWPE.binary_path):
+ (WebDriverWPE.browser_name):
+ (WebDriverWPE.capabilities):
+ (WebDriverWPE.browser_env):
+ * Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
+ (WebDriverW3CExecutor.__init__): Update the environment with the one provided by the driver.
+ * wpe/jhbuild.modules: Upgrade dyz to newer version that supports automation.
+
2017-09-21 Carlos Garcia Campos <[email protected]>
WebDriver: Add support to import and run W3C tests
Modified: releases/WebKitGTK/webkit-2.18/Tools/Scripts/run-webdriver-tests (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/Scripts/run-webdriver-tests 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Tools/Scripts/run-webdriver-tests 2017-12-18 11:27:20 UTC (rev 226025)
@@ -39,6 +39,8 @@
help='Platform to use (e.g., "gtk")')
option_parser.add_option('--gtk', action='', dest='platform', const='gtk',
help='Alias for --platform=gtk')
+option_parser.add_option('--wpe', action='', dest='platform', const='wpe',
+ help='Alias for --platform=wpe')
option_parser.add_option('--release', action='', const='Release', dest="configuration",
help='Set the configuration to Release')
option_parser.add_option('--debug', action='', const='Debug', dest="configuration",
Modified: releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/port/wpe.py (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/port/wpe.py 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/port/wpe.py 2017-12-18 11:27:20 UTC (rev 226025)
@@ -30,6 +30,7 @@
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
from webkitpy.port.base import Port
from webkitpy.port.linux_get_crash_log import GDBCrashLogGenerator
+from webkitpy.port.waylanddriver import WaylandDriver
class WPEPort(Port):
@@ -38,6 +39,7 @@
def __init__(self, *args, **kwargs):
super(WPEPort, self).__init__(*args, **kwargs)
+ self._display_server = self.get_option("display_server")
if self._should_use_jhbuild():
self._jhbuild_wrapper = [self.path_from_webkit_base('Tools', 'jhbuild', 'jhbuild-wrapper'), '--wpe', 'run']
self.set_option_default('wrapper', ' '.join(self._jhbuild_wrapper))
@@ -61,6 +63,12 @@
def _port_flag_for_scripts(self):
return "--wpe"
+ @memoized
+ def _driver_class(self):
+ if self._display_server == "wayland":
+ return WaylandDriver
+ return super(WPEPort, self)._driver_class()
+
def setup_environ_for_server(self, server_name=None):
environment = super(WPEPort, self).setup_environ_for_server(server_name)
environment['GSETTINGS_BACKEND'] = 'memory'
Modified: releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py 2017-12-18 11:27:20 UTC (rev 226025)
@@ -34,7 +34,10 @@
def capabilities(self):
raise NotImplementedError
+ def browser_env(self):
+ return {}
+
_drivers = {}
Copied: releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py (from rev 226024, releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py) (0 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py (rev 0)
+++ releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py 2017-12-18 11:27:20 UTC (rev 226025)
@@ -0,0 +1,56 @@
+# Copyright (C) 2017 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 APPLE INC. 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 APPLE INC. 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.
+
+import os
+from webkitpy.webdriver_tests.webdriver_driver import WebDriver, register_driver
+
+
+class WebDriverWPE(WebDriver):
+
+ def __init__(self, port):
+ super(WebDriverWPE, self).__init__(port)
+
+ def binary_path(self):
+ return self._port._build_path('bin', 'WPEWebDriver')
+
+ def browser_name(self):
+ return 'dyz'
+
+ def capabilities(self):
+ return {'wpe:browserOptions': {
+ 'binary': self.browser_name(),
+ 'args': ['--automation']}}
+
+ def browser_env(self):
+ env = {}
+ env['WEBKIT_EXEC_PATH'] = self._port._build_path('bin')
+ try:
+ ld_library_path = os.environ['LD_LIBRARY_PATH']
+ except KeyError:
+ ld_library_path = None
+ env['LD_LIBRARY_PATH'] = self._port._build_path('lib')
+ if ld_library_path:
+ env['LD_LIBRARY_PATH'] += ':' + ld_library_path
+ return env
+
+
+register_driver('wpe', WebDriverWPE)
Modified: releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py 2017-12-18 11:27:20 UTC (rev 226025)
@@ -124,6 +124,7 @@
def __init__(self, driver, server, display_driver):
WebKitDriverServer.test_env = display_driver._setup_environ_for_test()
+ WebKitDriverServer.test_env.update(driver.browser_env())
server_config = {'host': server.host(), 'ports': {'http': [str(server.port())]}}
WdspecExecutor.__init__(self, driver.browser_name(), server_config, driver.binary_path(), None, capabilities=driver.capabilities())
Modified: releases/WebKitGTK/webkit-2.18/Tools/wpe/jhbuild.modules (226024 => 226025)
--- releases/WebKitGTK/webkit-2.18/Tools/wpe/jhbuild.modules 2017-12-18 11:26:47 UTC (rev 226024)
+++ releases/WebKitGTK/webkit-2.18/Tools/wpe/jhbuild.modules 2017-12-18 11:27:20 UTC (rev 226025)
@@ -275,7 +275,7 @@
</autotools>
<autotools id="dyz" supports-non-srcdir-builds="no">
- <branch repo="github.com" module="Igalia/dyz" tag="0880252bac243add39ea54c0797ceb167d775ce9"/>
+ <branch repo="github.com" module="Igalia/dyz" tag="203a1ebd1481e44aa8105e862c02f317e6653627"/>
</autotools>
</moduleset>