[e2e] Fix e2e pixel ratio (#2842)
* Fix e2e device pixel ratio
* Update changelog and version
* Formatting
diff --git a/packages/e2e/CHANGELOG.md b/packages/e2e/CHANGELOG.md
index 725b648..0d34996 100644
--- a/packages/e2e/CHANGELOG.md
+++ b/packages/e2e/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.5.0+1
+
+* Fixed the device pixel ratio problem.
+
## 0.5.0
* **Breaking change** by default, tests will use the device window size.
diff --git a/packages/e2e/lib/e2e.dart b/packages/e2e/lib/e2e.dart
index c2ddb2d..ec1615e 100644
--- a/packages/e2e/lib/e2e.dart
+++ b/packages/e2e/lib/e2e.dart
@@ -52,8 +52,8 @@
bool get registerTestTextInput => false;
@override
- ViewConfiguration createViewConfiguration() =>
- TestViewConfiguration(size: window.physicalSize);
+ ViewConfiguration createViewConfiguration() => TestViewConfiguration(
+ size: window.physicalSize / window.devicePixelRatio);
final Completer<bool> _allTestsPassed = Completer<bool>();
diff --git a/packages/e2e/pubspec.yaml b/packages/e2e/pubspec.yaml
index 82de42b..0d4bc99 100644
--- a/packages/e2e/pubspec.yaml
+++ b/packages/e2e/pubspec.yaml
@@ -1,6 +1,6 @@
name: e2e
description: Runs tests that use the flutter_test API as integration tests.
-version: 0.5.0
+version: 0.5.0+1
homepage: https://github.com/flutter/plugins/tree/master/packages/e2e
environment: