Fix stale find results after global find pasteboard changes (macOS)
See the updated test in FindBarPlatformHelperMacTest for repro steps. As part of the fix, this also cleans up some logic in FindTabHelper and FindBarView. Dealing with a find of an empty string (which causes the search to be cleared) no longer has to be special cased at each call site. Instead, the logic is handled in FindTabHelper::StartFinding where it belongs. That also removes a footgun where you might supply an empty string (from, e.g., a user) and end up unintentionally getting a no-op or a search of the previous string. The only places that relied on that behavior were a few tests, which now use a better way of doing that. Change-Id: Ide3260c3c4ce122d7e0ca9a1de521b84402bce4e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2465205 Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#817563}
Showing
Please register or sign in to comment