Search the large text again when the WebView counts too early - #685
Merged
Merged
Conversation
aMegabyteOfTextOpensAndIsSearchable fails on API 26 and API 30 in some runs. The DOM holds every line, then findAllAsync reports a finished count of 0 about one second later. WebView 69 and 83 do this, and a search a moment later finds every line. The test now searches again for up to 5 seconds while the count is short, and logs how many tries it needed. If the count never comes right, the failure gives each count and the state of the view, so the next failure says more than "0". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Ph3Q6se1Ah28qfcunYHG7
andiwand
force-pushed
the
search-again-when-the-webview-counts-early
branch
from
September 24, 2026 12:18
f44845d to
f8d9f6e
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LargeTextTests.aMegabyteOfTextOpensAndIsSearchablefails on API 26 (WebView 69) and API 30 (WebView 83) in some runs on main:The assertion before the search passes, so the DOM holds all 6811 lines. Then
findAllAsyncreportsisDoneCounting=truewith 0 matches, about one second after the page loads. The test does not time out.I could not reproduce this locally, because no local AVD runs these WebView builds. Blink ends a search with a count of 0 when it thinks that the frame has no visible content, and this is my best guess for the cause, but I have not confirmed it.
Change
isShown, the size,isAttachedToWindowanddocument.visibilityState.This is independent of #684.
🤖 Generated with Claude Code