Title: [229278] releases/WebKitGTK/webkit-2.20/Source/WebKit
- Revision
- 229278
- Author
- carlo...@webkit.org
- Date
- 2018-03-05 05:18:21 -0800 (Mon, 05 Mar 2018)
Log Message
Merge r229212 - Automation: clicking on a disabled option element shouldn't produce an error
https://bugs.webkit.org/show_bug.cgi?id=183284
Reviewed by Brian Burg.
This was expected by selenium, but the WebDriver spec says we should simply do nothing in those cases.
14.1 Element Click.
https://w3c.github.io/webdriver/webdriver-spec.html#element-click
Fixes: imported/w3c/webdriver/tests/element_click/select.py::test_option_disabled
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::selectOptionElement):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (229277 => 229278)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-03-05 13:18:17 UTC (rev 229277)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-03-05 13:18:21 UTC (rev 229278)
@@ -1,5 +1,22 @@
2018-03-05 Carlos Garcia Campos <cgar...@igalia.com>
+ Automation: clicking on a disabled option element shouldn't produce an error
+ https://bugs.webkit.org/show_bug.cgi?id=183284
+
+ Reviewed by Brian Burg.
+
+ This was expected by selenium, but the WebDriver spec says we should simply do nothing in those cases.
+
+ 14.1 Element Click.
+ https://w3c.github.io/webdriver/webdriver-spec.html#element-click
+
+ Fixes: imported/w3c/webdriver/tests/element_click/select.py::test_option_disabled
+
+ * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+ (WebKit::WebAutomationSessionProxy::selectOptionElement):
+
+2018-03-05 Carlos Garcia Campos <cgar...@igalia.com>
+
Automation: stale elements not detected when removed from the DOM
https://bugs.webkit.org/show_bug.cgi?id=183278
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (229277 => 229278)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2018-03-05 13:18:17 UTC (rev 229277)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2018-03-05 13:18:21 UTC (rev 229278)
@@ -650,15 +650,11 @@
return;
}
- if (selectElement->isDisabledFormControl() || optionElement.isDisabledFormControl()) {
- String elementNotSelectableErrorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::ElementNotSelectable);
- WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidSelectOptionElement(callbackID, elementNotSelectableErrorType), 0);
- return;
+ if (!selectElement->isDisabledFormControl() && !optionElement.isDisabledFormControl()) {
+ // FIXME: According to the spec we should fire mouse over, move and down events, then input and change, and finally mouse up and click.
+ // optionSelectedByUser() will fire input and change events if needed, but all other events should be fired manually here.
+ selectElement->optionSelectedByUser(optionElement.index(), true, selectElement->multiple());
}
-
- // FIXME: According to the spec we should fire mouse over, move and down events, then input and change, and finally mouse up and click.
- // optionSelectedByUser() will fire input and change events if needed, but all other events should be fired manually here.
- selectElement->optionSelectedByUser(optionElement.index(), true, selectElement->multiple());
WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidSelectOptionElement(callbackID, { }), 0);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes