Remove RepaintBoundary
that is no longer needed. (#159232)
Closes https://github.com/flutter/flutter/issues/66006. From what I can tell in the multi-view effort a variation of https://github.com/flutter/flutter/pull/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 commit is contained in:
parent
d1e2c5fba7
commit
c7dd6419d9
@ -30,6 +30,11 @@ void main() {
|
||||
final Matrix4 matrix = TestViewConfiguration(size: Size.zero).toMatrix();
|
||||
expect(matrix.storage.every((double x) => x.isFinite), isTrue);
|
||||
});
|
||||
|
||||
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, () {
|
||||
|
@ -446,14 +446,6 @@ https://docs.flutter.dev/testing/integration-tests
|
||||
@override
|
||||
Timeout defaultTestTimeout = Timeout.none;
|
||||
|
||||
@override
|
||||
Widget wrapWithDefaultView(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.
|
||||
return super.wrapWithDefaultView(RepaintBoundary(child: rootWidget));
|
||||
}
|
||||
|
||||
@override
|
||||
void reportExceptionNoticed(FlutterErrorDetails exception) {
|
||||
// This method is called to log errors as they happen, and they will also
|
||||
|
@ -124,11 +124,11 @@ Future<void> main() 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 {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/66006.
|
||||
testWidgets('root view reports correct dimensions', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const Placeholder());
|
||||
|
||||
expect(find.byType(RepaintBoundary), findsOneWidget);
|
||||
expect(tester.binding.renderView.paintBounds, const Rect.fromLTWH(0, 0, 2400, 1800));
|
||||
});
|
||||
|
||||
testWidgets('integration test has no label', (WidgetTester tester) async {
|
||||
|
Loading…
x
Reference in New Issue
Block a user