WebKit Bugzilla
Attachment 341899 Details for
Bug 186264
: [WPE] WebDriver: stop making mandatory to provide a browser path if wpe:browserOptions is present in capabilities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wpe-wd-capabilities.diff (text/plain), 2.76 KB, created by
Carlos Garcia Campos
on 2018-06-04 03:40:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2018-06-04 03:40:18 PDT
Size:
2.76 KB
patch
obsolete
>diff --git a/Source/WebDriver/ChangeLog b/Source/WebDriver/ChangeLog >index 2f295339fbf..2be5d5f3431 100644 >--- a/Source/WebDriver/ChangeLog >+++ b/Source/WebDriver/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-04 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [WPE] WebDriver: stop making mandatory to provide a browser path if webkitgtk:browserOptions is present in capabilities >+ https://bugs.webkit.org/show_bug.cgi?id=186264 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Everything should be optional. Do not consider invalid to not provide a browser binary when wpe:browserOptions >+ is present. >+ >+ * wpe/WebDriverServiceWPE.cpp: >+ (WebDriver::WebDriverService::platformParseCapabilities const): >+ > 2018-05-24 Carlos Garcia Campos <cgarcia@igalia.com> > > WebDriver: implement maximize, minimize and fullscreen window commands >diff --git a/Source/WebDriver/wpe/WebDriverServiceWPE.cpp b/Source/WebDriver/wpe/WebDriverServiceWPE.cpp >index 523e8e7726a..0aaac3dffa0 100644 >--- a/Source/WebDriver/wpe/WebDriverServiceWPE.cpp >+++ b/Source/WebDriver/wpe/WebDriverServiceWPE.cpp >@@ -81,22 +81,21 @@ bool WebDriverService::platformMatchCapability(const String&, const RefPtr<JSON: > > void WebDriverService::platformParseCapabilities(const JSON::Object& matchedCapabilities, Capabilities& capabilities) const > { >+ capabilities.browserBinary = String("dyz"); >+ capabilities.browserArguments = Vector<String> { ASCIILiteral("--automation") }; >+ > RefPtr<JSON::Object> browserOptions; >- if (!matchedCapabilities.getObject(ASCIILiteral("wpe:browserOptions"), browserOptions)) { >- capabilities.browserBinary = String("dyz"); >- capabilities.browserArguments = Vector<String> { ASCIILiteral("--automation") }; >+ if (!matchedCapabilities.getObject(ASCIILiteral("wpe:browserOptions"), browserOptions)) > return; >- } > > String browserBinary; >- browserOptions->getString(ASCIILiteral("binary"), browserBinary); >- ASSERT(!browserBinary.isNull()); >- capabilities.browserBinary = browserBinary; >+ if (browserOptions->getString(ASCIILiteral("binary"), browserBinary)) >+ capabilities.browserBinary = browserBinary; > >- capabilities.browserArguments = Vector<String>(); > RefPtr<JSON::Array> browserArguments; >- if (browserOptions->getArray(ASCIILiteral("args"), browserArguments)) { >+ if (browserOptions->getArray(ASCIILiteral("args"), browserArguments) && browserArguments->length()) { > unsigned browserArgumentsLength = browserArguments->length(); >+ capabilities.browserArguments = Vector<String>(); > capabilities.browserArguments->reserveInitialCapacity(browserArgumentsLength); > for (unsigned i = 0; i < browserArgumentsLength; ++i) { > RefPtr<JSON::Value> value = browserArguments->get(i);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
zan
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186264
: 341899