WebContent: Wait for WebDriver history traversal completion
Keep WebDriver Back and Forward waiting after accepted history traversals, even when the traversal does not change the top-level entry. UI-owned session history can still complete same-document traversals asynchronously, so returning immediately let later commands race with a pending traversal and observe stale history state. The WebDriver session history test covers this path. Give that test a larger CTest timeout so sanitizer CI has enough room for the full script.
This commit is contained in:
parent
69f1c0e432
commit
b26ee62819
2 changed files with 3 additions and 3 deletions
|
|
@ -463,7 +463,7 @@ Messages::WebDriverClient::BackResponse WebDriverConnection::back()
|
|||
}
|
||||
|
||||
metadata->will_replace_web_content_process = traversal_result.will_replace_web_content_process;
|
||||
metadata->wait_for_navigation_completion = traversal_result.will_change_top_level_entry;
|
||||
metadata->wait_for_navigation_completion = true;
|
||||
if (metadata->will_replace_web_content_process)
|
||||
async_did_start_window_replacement(current_top_level_browsing_context()->page().top_level_traversable()->window_handle());
|
||||
if (metadata->sync_response_returned)
|
||||
|
|
@ -495,7 +495,7 @@ Messages::WebDriverClient::ForwardResponse WebDriverConnection::forward()
|
|||
}
|
||||
|
||||
metadata->will_replace_web_content_process = traversal_result.will_replace_web_content_process;
|
||||
metadata->wait_for_navigation_completion = traversal_result.will_change_top_level_entry;
|
||||
metadata->wait_for_navigation_completion = true;
|
||||
if (metadata->will_replace_web_content_process)
|
||||
async_did_start_window_replacement(current_top_level_browsing_context()->page().top_level_traversable()->window_handle());
|
||||
if (metadata->sync_response_returned)
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ if (BUILD_TESTING AND NOT WIN32)
|
|||
NAME TestWebDriverSessionHistory
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-session-history.py $<TARGET_FILE:WebDriver>
|
||||
)
|
||||
set_tests_properties(TestWebDriverSessionHistory PROPERTIES TIMEOUT 60)
|
||||
set_tests_properties(TestWebDriverSessionHistory PROPERTIES TIMEOUT 120)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue