Skip to content

Commit

Permalink
fix: properly clear window size overrides after test run (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirpal authored Oct 27, 2022
1 parent 0cc2a37 commit 0dd4719
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/golden_test_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class FlutterGoldenTestRunner extends GoldenTestRunner {

final childKey = FlutterGoldenTestAdapter.childKey;

final originalSize = tester.binding.window.physicalSize;
final mementoDebugDisableShadows = debugDisableShadows;
debugDisableShadows = !renderShadows;

Expand Down Expand Up @@ -115,8 +114,9 @@ class FlutterGoldenTestRunner extends GoldenTestRunner {
} finally {
debugDisableShadows = mementoDebugDisableShadows;

await tester.binding.setSurfaceSize(originalSize);
tester.binding.window.physicalSizeTestValue = originalSize;
await tester.binding.setSurfaceSize(null);
tester.binding.window.clearPhysicalSizeTestValue();
tester.binding.window.clearDevicePixelRatioTestValue();
}
}
}

0 comments on commit 0dd4719

Please sign in to comment.