Changeset 227414 in webkit
- Timestamp:
- Jan 23, 2018 8:22:55 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebDriver/ChangeLog
r227413 r227414 1 2018-01-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: several tests in imported/w3c/webdriver/tests/sessions/new_session/merge.py are failing 4 https://bugs.webkit.org/show_bug.cgi?id=180407 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 This is actually a bug in the spec, see https://github.com/w3c/webdriver/issues/1203. It seems the idea in any 9 case is that we should check all the firstMatch capabilities before matching them, and return if there's any 10 error. 11 12 * WebDriverService.cpp: 13 (WebDriver::WebDriverService::mergeCapabilities const): 14 (WebDriver::WebDriverService::processCapabilities const): 15 1 16 2018-01-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 17 -
trunk/Source/WebDriver/WebDriverService.cpp
r227413 r227414 443 443 444 444 auto firstMatchEnd = firstMatchCapabilities.end(); 445 for (auto it = firstMatchCapabilities.begin(); it != firstMatchEnd; ++it) { 446 if (requiredCapabilities.find(it->key) != requiredEnd) 447 return nullptr; 448 445 for (auto it = firstMatchCapabilities.begin(); it != firstMatchEnd; ++it) 449 446 result->setValue(it->key, RefPtr<JSON::Value>(it->value)); 450 }451 447 452 448 return result; … … 576 572 return nullptr; 577 573 } 574 575 // Validate here that firstMatchCapabilities don't shadow alwaysMatchCapabilities. 576 auto requiredEnd = requiredCapabilities->end(); 577 auto firstMatchEnd = firstMatchCapabilities->end(); 578 for (auto it = firstMatchCapabilities->begin(); it != firstMatchEnd; ++it) { 579 if (requiredCapabilities->find(it->key) != requiredEnd) { 580 completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument, 581 makeString("Invalid firstMatch capabilities: key ", it->key, " is present in alwaysMatch"))); 582 return nullptr; 583 } 584 } 585 578 586 // 5.2. Append validated capabilities to validated first match capabilities. 579 587 validatedFirstMatchCapabilitiesList.uncheckedAppend(WTFMove(firstMatchCapabilities)); -
trunk/WebDriverTests/ChangeLog
r227413 r227414 1 2018-01-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 WebDriver: several tests in imported/w3c/webdriver/tests/sessions/new_session/merge.py are failing 4 https://bugs.webkit.org/show_bug.cgi?id=180407 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 Remove expectations for tests that are passing now and update the bug number of the other ones referencing 9 #180407. 10 11 * TestExpectations.json: 12 1 13 2018-01-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/WebDriverTests/TestExpectations.json
r227413 r227414 194 194 "imported/w3c/webdriver/tests/sessions/new_session/merge.py": { 195 195 "subtests": { 196 "test_merge_invalid[unhandledPromptBehavior-value1]": {197 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180407"}}198 },199 "test_merge_invalid[unhandledPromptBehavior-value2]": {200 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180407"}}201 },202 196 "test_merge_platformName": { 203 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/18 0407"}}197 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/181984"}} 204 198 }, 205 199 "test_merge_browserName": { 206 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/18 0407"}}200 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/181985"}} 207 201 } 208 202 }
Note: See TracChangeset
for help on using the changeset viewer.