Fix DPR in test view configuration (#88609)

This commit is contained in:
Dan Field
2021-08-24 14:26:54 -07:00
committed by GitHub
parent 9a190e5b39
commit 5feee0d8fa
4 changed files with 8 additions and 12 deletions

View File

@@ -24,6 +24,11 @@ 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, () {