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

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

Issue 2455653002: Make clear that WindowAndroid::getDisplay must be used when supporting multi-display. (Closed)
Patch Set: Revert change that snuck in from other branch Created 4 years, 2 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/AndroidViewIntegrationTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
index 72c0ebb0242498e0b211d063d41a7e5ba1183594..f4349c21d74086cd0e669e1cab31f55265821014 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
@@ -85,7 +85,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
private AwTestContainerView createCustomTestContainerViewOnMainSync(
final AwContentsClient awContentsClient, final int visibility) throws Exception {
final AtomicReference<AwTestContainerView> testContainerView =
- new AtomicReference<AwTestContainerView>();
+ new AtomicReference<>();
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
@@ -100,7 +100,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
private AwTestContainerView createDetachedTestContainerViewOnMainSync(
final AwContentsClient awContentsClient) {
final AtomicReference<AwTestContainerView> testContainerView =
- new AtomicReference<AwTestContainerView>();
+ new AtomicReference<>();
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
@@ -121,7 +121,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
}
private int getRootLayoutWidthOnMainThread() throws Exception {
- final AtomicReference<Integer> width = new AtomicReference<Integer>();
+ final AtomicReference<Integer> width = new AtomicReference<>();
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
@@ -308,7 +308,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
assertZeroHeight(testContainerView);
final double deviceDIPScale =
- DisplayAndroid.get(testContainerView.getContext()).getDIPScale();
+ DisplayAndroid.getNonMultiDisplay(testContainerView.getContext()).getDIPScale();
final int contentWidthCss = 142;
final int contentHeightCss = 180;
@@ -335,7 +335,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
assertZeroHeight(testContainerView);
final double deviceDIPScale =
- DisplayAndroid.get(testContainerView.getContext()).getDIPScale();
+ DisplayAndroid.getNonMultiDisplay(testContainerView.getContext()).getDIPScale();
final int contentWidthCss = 142;
final int contentHeightCss = 180;
@@ -363,7 +363,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
assertZeroHeight(testContainerView);
final double deviceDIPScale =
- DisplayAndroid.get(testContainerView.getContext()).getDIPScale();
+ DisplayAndroid.getNonMultiDisplay(testContainerView.getContext()).getDIPScale();
final int contentWidthCss = 142;
final int contentHeightCss = 180;
@@ -389,7 +389,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
final AwContents awContents = testContainerView.getAwContents();
final double deviceDIPScale =
- DisplayAndroid.get(testContainerView.getContext()).getDIPScale();
+ DisplayAndroid.getNonMultiDisplay(testContainerView.getContext()).getDIPScale();
final int physicalWidth = 600;
final int spanWidth = 42;
final int expectedWidthCss =

Powered by Google App Engine
This is Rietveld 408576698