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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/webcontents/AccessibilitySnapshotTest.java

Issue 2443353003: The Android ViewStructure font size should be in physical pixels (Closed)
Patch Set: Reword Android pixels to physical pixels 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/webcontents/AccessibilitySnapshotTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/webcontents/AccessibilitySnapshotTest.java b/content/public/android/javatests/src/org/chromium/content/browser/webcontents/AccessibilitySnapshotTest.java
index 271026b88febd640e4884391697ae569e08b1c6e..cc9f23879d6e8fd5a9f1a2e9b4f742d3644b468b 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/webcontents/AccessibilitySnapshotTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/webcontents/AccessibilitySnapshotTest.java
@@ -91,7 +91,7 @@ public class AccessibilitySnapshotTest extends ContentShellTestBase {
@SmallTest
public void testRequestAccessibilitySnapshotFontSize() throws Throwable {
final String data = "<html><head><style> "
- + " body { font-size:11px; }"
+ + " p { font-size:16px; transform: scale(2); }"
+ " </style></head><body><p>foo</p></body></html>";
AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data, null);
assertEquals(1, root.children.size());
@@ -100,7 +100,8 @@ public class AccessibilitySnapshotTest extends ContentShellTestBase {
assertTrue(child.hasStyle);
assertEquals("foo", child.text);
- assertEquals(11.0, child.textSize, 0.01);
+ // The font size should take the scale into account.
+ assertEquals(32.0, child.textSize, 1.0);
}
@SmallTest
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698