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

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

Issue 22493011: [android_webivew] Update testTargetDensityDpi expectations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/AwTargetDensityDpiTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTargetDensityDpiTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTargetDensityDpiTest.java
index 71b46b49b117f8810f45c957617cc9069321fa82..1a10196141498b1e9cd41756a3939007b46c3eb1 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTargetDensityDpiTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTargetDensityDpiTest.java
@@ -7,22 +7,14 @@ package org.chromium.android_webview.test;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.AwSettings;
-import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.util.CallbackHelper;
import org.chromium.ui.gfx.DeviceDisplayInfo;
-
public class AwTargetDensityDpiTest extends AwTestBase {
- /**
- * @MediumTest
- * @Feature({"AndroidWebView"})
- *
- * TODO(mkosiba): This is disabled only temporarily to enable the WebKit roll that contains
- * http://crrev.com/22574004
- */
- @DisabledTest
+ @MediumTest
+ @Feature({"AndroidWebView"})
public void testTargetDensityDpi() throws Throwable {
final TestAwContentsClient contentClient = new TestAwContentsClient();
final AwTestContainerView testContainerView =
@@ -46,8 +38,9 @@ public class AwTargetDensityDpiTest extends AwTestBase {
int actualWidth = Integer.parseInt(getTitleOnUiThread(awContents));
assertEquals((float)deviceInfo.getDisplayWidth(), (float)actualWidth, 10f);
- float displayWidth = (float)(deviceInfo.getDisplayWidth() / deviceInfo.getDIPScale());
- float deviceDpi = (float)(120f * deviceInfo.getDIPScale());
+ float displayWidth = (float)(deviceInfo.getDisplayWidth());
+ float deviceDpi = (float)(160f * deviceInfo.getDIPScale());
+
loadDataSync(awContents, onPageFinishedHelper, pageHighDpi, "text/html", false);
actualWidth = Integer.parseInt(getTitleOnUiThread(awContents));
assertEquals(displayWidth * (240f / deviceDpi), (float)actualWidth, 10f);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698