Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c5861cfb
Unverified
Commit
c5861cfb
authored
Aug 25, 2021
by
Dan Field
Committed by
GitHub
Aug 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix DPR in test view configuration (#88609)" (#88889)
This reverts commit
5feee0d8
.
parent
33403bd2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
binding.dart
packages/flutter_test/lib/src/binding.dart
+1
-1
bindings_test.dart
packages/flutter_test/test/bindings_test.dart
+0
-5
integration_test.dart
packages/integration_test/lib/integration_test.dart
+8
-0
binding_test.dart
packages/integration_test/test/binding_test.dart
+3
-2
No files found.
packages/flutter_test/lib/src/binding.dart
View file @
c5861cfb
...
...
@@ -1732,7 +1732,7 @@ class TestViewConfiguration extends ViewConfiguration {
TestViewConfiguration
.
_
(
Size
size
,
ui
.
FlutterView
window
)
:
_paintMatrix
=
_getMatrix
(
size
,
window
.
devicePixelRatio
,
window
),
_hitTestMatrix
=
_getMatrix
(
size
,
1.0
,
window
),
super
(
size:
size
,
devicePixelRatio:
window
.
devicePixelRatio
);
super
(
size:
size
);
static
Matrix4
_getMatrix
(
Size
size
,
double
devicePixelRatio
,
ui
.
FlutterView
window
)
{
final
double
inverseRatio
=
devicePixelRatio
/
window
.
devicePixelRatio
;
...
...
packages/flutter_test/test/bindings_test.dart
View file @
c5861cfb
...
...
@@ -24,11 +24,6 @@ void main() {
// The code below will throw without the default.
TestViewConfiguration
(
size:
const
Size
(
1280.0
,
800.0
));
});
test
(
'sets the DPR to match the window'
,
()
{
final
TestViewConfiguration
configuration
=
TestViewConfiguration
(
size:
const
Size
(
1280.0
,
800.0
));
expect
(
configuration
.
devicePixelRatio
,
binding
.
window
.
devicePixelRatio
);
});
});
group
(
AutomatedTestWidgetsFlutterBinding
,
()
{
...
...
packages/integration_test/lib/integration_test.dart
View file @
c5861cfb
...
...
@@ -396,6 +396,14 @@ https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab
set
defaultTestTimeout
(
Timeout
timeout
)
=>
_defaultTestTimeout
=
timeout
;
Timeout
?
_defaultTestTimeout
;
@override
void
attachRootWidget
(
Widget
rootWidget
)
{
// This is a workaround where screenshots of root widgets have incorrect
// bounds.
// TODO(jiahaog): Remove when https://github.com/flutter/flutter/issues/66006 is fixed.
super
.
attachRootWidget
(
RepaintBoundary
(
child:
rootWidget
));
}
@override
void
reportExceptionNoticed
(
FlutterErrorDetails
exception
)
{
// This method is called to log errors as they happen, and they will also
...
...
packages/integration_test/test/binding_test.dart
View file @
c5861cfb
...
...
@@ -126,10 +126,11 @@ Future<void> main() async {
});
});
testWidgets
(
'root view reports correct dimensions'
,
(
WidgetTester
tester
)
async
{
// TODO(jiahaog): Remove when https://github.com/flutter/flutter/issues/66006 is fixed.
testWidgets
(
'root widgets are wrapped with a RepaintBoundary'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Placeholder
());
expect
(
tester
.
binding
.
renderView
.
paintBounds
,
const
Rect
.
fromLTWH
(
0
,
0
,
2400
,
1800
)
);
expect
(
find
.
byType
(
RepaintBoundary
),
findsOneWidget
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment