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

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

Issue 1181883003: WIP Verify style information is provided correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled tests and changed test expectations for test 1 Created 5 years, 6 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/AwContentsTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
index 0f20d87b00e9ea3685749362d82ee19f98022fcc..34ea04567e33f6cd5dc0f384cec14c1aac601e50 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
@@ -26,6 +26,7 @@ import org.chromium.android_webview.AwSettings;
import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHelper;
import org.chromium.android_webview.test.util.CommonResources;
import org.chromium.base.annotations.SuppressFBWarnings;
+import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.content.browser.test.util.CallbackHelper;
@@ -649,6 +650,48 @@ public class AwContentsTest extends AwTestBase {
assertFalse(child.underline);
}
+ @DisabledTest
+ @Feature({"AndroidWebView"})
+ public void testRequestAccessibilitySnapshotStrongStyle() throws Throwable {
+ final String data = "<html><body><p>foo</p><p><strong>bar</strong></p></body></html>";
+ AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data);
+ assertEquals(2, root.children.size());
+ assertEquals("", root.text);
+ AccessibilitySnapshotNode child1 = root.children.get(0);
+ assertEquals("foo", child1.text);
+ assertTrue(child1.hasStyle);
+ assertFalse(child1.bold);
+ AccessibilitySnapshotNode child2 = root.children.get(1);
+ assertEquals("bar", child2.text);
+ assertTrue(child1.textSize < child2.textSize);
+ }
+
+ @DisabledTest
+ @Feature({"AndroidWebView"})
+ public void testRequestAccessibilitySnapshotItalicStyle() throws Throwable {
+ final String data = "<html><body><i>foo</i></body></html>";
+ AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data);
+ assertEquals(1, root.children.size());
+ assertEquals("", root.text);
+ AccessibilitySnapshotNode child = root.children.get(0);
+ assertEquals("foo", child.text);
+ assertTrue(child.hasStyle);
+ assertTrue(child.italic);
+ }
+
+ @DisabledTest
+ @Feature({"AndroidWebView"})
+ public void testRequestAccessibilitySnapshotBoldStyle() throws Throwable {
+ final String data = "<html><body><b>foo</b></body></html>";
+ AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data);
+ assertEquals(1, root.children.size());
+ assertEquals("", root.text);
+ AccessibilitySnapshotNode child = root.children.get(0);
+ assertEquals("foo", child.text);
+ assertTrue(child.hasStyle);
+ assertTrue(child.bold);
+ }
+
@Feature({"AndroidWebView"})
@SmallTest
public void testRequestAccessibilitySnapshotNoStyle() throws Throwable {
« 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