-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Test Automation] Improvements to WaitForStateChange()
Addressing concerns in the attached bug. There are some tests for which navigation can happen at odd times or as the result of asynchronous processes. If only the end state is being tested, allowing a StateChange to not care if the page navigates (or becomes momentarily unavailable) increases the number of tests that can be made reliable and non-flaky. This CL adds a new field to StateChange, continue_across_navigation. When set, WaitForStateChange() will not immediately fail if the page navigates or becomes momentarily unavailable. The CL also addresses an issue where many StateChange structs that were declared had parameters that did not match the default StateChange::Type, but worked accidentally due to implementation details of the system. The type of the change now defaults to a new `kAuto` value which causes auto-inference of the type based on the parameters, since in the vast majority of cases it's obvious from the parameters that are set. This puts less onus on the person writing the test and doesn't force them to set a redundant parameter. It also reflects the old default behavior - in other words, it makes explicit what people were already doing (previously incorrectly, now correct). Bug: b/303402087 Change-Id: Ife3fcd81b6e3dd637a868e33083fa5037983e735 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4924271 Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Dana Fried <dfried@chromium.org> Reviewed-by: Tomek Jurkiewicz <tju@google.com> Cr-Commit-Position: refs/heads/main@{#1209065}
- Loading branch information
Dana Fried
authored and
Chromium LUCI CQ
committed
Oct 12, 2023
1 parent
85f303f
commit 6a4a42e
Showing
6 changed files
with
326 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.