Unverified Commit fca95838 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Restore the WidgetTester's original surface size after testing setSurfaceSize (#87202)

Fixes https://github.com/flutter/flutter/issues/87194
parent 574dde32
......@@ -82,7 +82,9 @@ No widgets found at Offset(1.0, 1.0).
),
);
final Size originalSize = tester.binding.createViewConfiguration().size;
await tester.binding.setSurfaceSize(const Size(2000, 1800));
try {
await tester.pump();
final Offset widgetCenter = tester.getRect(find.byType(Text)).center;
......@@ -107,6 +109,9 @@ Some possible finders for the widgets at Offset(1000.0, 900.0):
expect(printedMessages, equals('''
No widgets found at Offset(1.0, 1.0).
'''.trim().split('\n')));
} finally {
await tester.binding.setSurfaceSize(originalSize);
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment