Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java

Issue 213123011: Make DeviceDisplayInfo a Singleton and have ScreenOrientationListener update it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
index a2220236b9de4a80b29055f860cc63eef1383b20..edbee667c84ae7aba90a144c582a5bff5efcad56 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
@@ -268,7 +268,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
enableJavaScriptOnUiThread(testContainerView.getAwContents());
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.getInstance(testContainerView.getContext()).getDIPScale();
final int targetScrollXCss = 233;
final int targetScrollYCss = 322;
final int targetScrollXPix = (int) Math.ceil(targetScrollXCss * deviceDIPScale);
@@ -301,7 +301,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
enableJavaScriptOnUiThread(testContainerView.getAwContents());
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.getInstance(testContainerView.getContext()).getDIPScale();
final int targetScrollXCss = 132;
final int targetScrollYCss = 243;
final int targetScrollXPix = (int) Math.floor(targetScrollXCss * deviceDIPScale);
@@ -329,7 +329,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
enableJavaScriptOnUiThread(testContainerView.getAwContents());
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.getInstance(testContainerView.getContext()).getDIPScale();
final int targetScrollXCss = 132;
final int targetScrollYCss = 243;
final int targetScrollXPix = (int) Math.floor(targetScrollXCss * deviceDIPScale);
@@ -371,7 +371,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
final int targetScrollYPix = dragStepSize * dragSteps;
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.getInstance(testContainerView.getContext()).getDIPScale();
final int maxScrollXPix = 101;
final int maxScrollYPix = 211;
// Make sure we can't hit these values simply as a result of scrolling.
@@ -529,7 +529,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
"text/html", false);
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.getInstance(testContainerView.getContext()).getDIPScale();
final CallbackHelper onScrollToCallbackHelper =
testContainerView.getOnScrollToCallbackHelper();
@@ -655,7 +655,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
enableJavaScriptOnUiThread(testContainerView.getAwContents());
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.getInstance(testContainerView.getContext()).getDIPScale();
final int targetScrollYCss = 243;
final int targetScrollYPix = (int) Math.ceil(targetScrollYCss * deviceDIPScale);

Powered by Google App Engine
This is Rietveld 408576698