Fix DPR in test view configuration#88609
Merged
dnfield merged 2 commits intoflutter:masterfrom Aug 24, 2021
Merged
Conversation
dnfield
commented
Aug 20, 2021
| await tester.pumpWidget(const Placeholder()); | ||
|
|
||
| expect(find.byType(RepaintBoundary), findsOneWidget); | ||
| expect(tester.binding.renderView.paintBounds, const Rect.fromLTWH(0, 0, 2400, 1800)); |
Contributor
Author
There was a problem hiding this comment.
Before, without the repaint boundary, this was returning 800x600.
Contributor
|
This pull request is not suitable for automatic merging in its current state.
|
Contributor
Author
|
I'm going to land this and apply a g3fix if needed internally. |
dnfield
added a commit
that referenced
this pull request
Aug 25, 2021
This was referenced Jul 4, 2022
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 21, 2024
Closes #66006. From what I can tell in the multi-view effort a variation of #88609 already landed, meaning that the current device-pixel-ratio is being used (as the tests in #88609 are now passing), and I believe that means we can remove the override/hack. Will rely on "Google Testing" to run a TGP internally, or do so myself if necessary.
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.
Fixes #66006
The problem is that the view configuration was always getting a DPR of 1.0, which did not match the actual DPR of the window - so the
paintBoundsforRenderViewreturned an unadjusted size which made the screenshot truncated.