Changeset 269421 in webkit
- Timestamp:
- Nov 5, 2020 12:47:42 AM (21 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (modified) (2 diffs)
-
WebDriverTests/ChangeLog (modified) (1 diff)
-
WebDriverTests/TestExpectations.json (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r269420 r269421 1 2020-11-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: handle surrogate pairs in keyboard actions 4 https://bugs.webkit.org/show_bug.cgi?id=218279 5 6 Reviewed by Brian Burg. 7 8 And fail with invalid argument if the string can be represented as a single code point. 9 10 Fixes: imported/w3c/webdriver/tests/perform_actions/key_special_keys.py::test_codepoint_keys_behave_correctly[\U0001f604] 11 imported/w3c/webdriver/tests/perform_actions/key_special_keys.py::test_codepoint_keys_behave_correctly[\U0001f60d] 12 imported/w3c/webdriver/tests/perform_actions/key_special_keys.py::test_invalid_multiple_codepoint_keys_fail[fa] 13 imported/w3c/webdriver/tests/perform_actions/key_special_keys.py::test_invalid_multiple_codepoint_keys_fail[\u0ba8\u0bbfb] 14 imported/w3c/webdriver/tests/perform_actions/key_special_keys.py::test_invalid_multiple_codepoint_keys_fail[\u0ba8\u0bbf\u0ba8] 15 imported/w3c/webdriver/tests/perform_actions/key_special_keys.py::test_invalid_multiple_codepoint_keys_fail[\u1100\u1161\u11a8c] 16 17 * UIProcess/Automation/WebAutomationSession.cpp: 18 (WebKit::pressedCharKey): 19 (WebKit::WebAutomationSession::performInteractionSequence): 20 1 21 2020-11-05 Jiewen Tan <jiewen_tan@apple.com> 2 22 -
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
r269419 r269421 1945 1945 } 1946 1946 } 1947 1948 static Optional<UChar32> pressedCharKey(const String& pressedCharKeyString) 1949 { 1950 switch (pressedCharKeyString.length()) { 1951 case 1: 1952 return pressedCharKeyString.characterAt(0); 1953 case 2: { 1954 auto lead = pressedCharKeyString.characterAt(0); 1955 auto trail = pressedCharKeyString.characterAt(1); 1956 if (U16_IS_LEAD(lead) && U16_IS_TRAIL(trail)) 1957 return U16_GET_SUPPLEMENTARY(lead, trail); 1958 } 1959 } 1960 1961 return WTF::nullopt; 1962 } 1947 1963 #endif // ENABLE(WEBDRIVER_ACTIONS_API) 1948 1964 … … 2056 2072 2057 2073 auto pressedCharKeyString = stateObject->getString("pressedCharKey"_s); 2058 if (!!pressedCharKeyString) 2059 sourceState.pressedCharKeys.add(pressedCharKeyString.characterAt(0)); 2074 if (!!pressedCharKeyString) { 2075 auto charKey = pressedCharKey(pressedCharKeyString); 2076 if (!charKey) 2077 ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "Invalid 'pressedCharKey'."); 2078 sourceState.pressedCharKeys.add(*charKey); 2079 } 2060 2080 2061 2081 if (auto pressedVirtualKeysArray = stateObject->getArray("pressedVirtualKeys"_s)) { -
trunk/WebDriverTests/ChangeLog
r269304 r269421 1 2020-11-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: handle surrogate pairs in keyboard actions 4 https://bugs.webkit.org/show_bug.cgi?id=218279 5 6 Reviewed by Brian Burg. 7 8 Remove expectations for tests that are now passing. 9 10 * TestExpectations.json: 11 1 12 2020-11-03 Lauro Moura <lmoura@igalia.com> 2 13 -
trunk/WebDriverTests/TestExpectations.json
r269035 r269421 448 448 }, 449 449 "imported/w3c/webdriver/tests/perform_actions/key_special_keys.py": { 450 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184967"}} 450 "subtests": { 451 "test_codepoint_keys_behave_correctly[\\u0ba8\\u0bbf]": { 452 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184967"}} 453 }, 454 "test_codepoint_keys_behave_correctly[\\u1100\\u1161\\u11a8]": { 455 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184967"}} 456 } 457 } 451 458 }, 452 459
Note: See TracChangeset
for help on using the changeset viewer.