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

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

Issue 1182783008: Add an option to not prune the Android AX tree, to preserve more style info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@style_info_sgurun
Patch Set: Un-disable tests 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 | content/browser/accessibility/browser_accessibility_android.cc » ('j') | 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 34ea04567e33f6cd5dc0f384cec14c1aac601e50..f1a8543cbf49453538e43b83b183943a80fd699b 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,7 +26,6 @@ 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;
@@ -650,7 +649,6 @@ 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>";
@@ -662,11 +660,12 @@ public class AwContentsTest extends AwTestBase {
assertTrue(child1.hasStyle);
assertFalse(child1.bold);
AccessibilitySnapshotNode child2 = root.children.get(1);
- assertEquals("bar", child2.text);
- assertTrue(child1.textSize < child2.textSize);
+ AccessibilitySnapshotNode child2child = child2.children.get(0);
+ assertEquals("bar", child2child.text);
+ assertEquals(child1.textSize, child2child.textSize);
+ assertTrue(child2child.bold);
}
- @DisabledTest
@Feature({"AndroidWebView"})
public void testRequestAccessibilitySnapshotItalicStyle() throws Throwable {
final String data = "<html><body><i>foo</i></body></html>";
@@ -674,12 +673,12 @@ public class AwContentsTest extends AwTestBase {
assertEquals(1, root.children.size());
assertEquals("", root.text);
AccessibilitySnapshotNode child = root.children.get(0);
- assertEquals("foo", child.text);
- assertTrue(child.hasStyle);
- assertTrue(child.italic);
+ AccessibilitySnapshotNode grandchild = child.children.get(0);
+ assertEquals("foo", grandchild.text);
+ assertTrue(grandchild.hasStyle);
+ assertTrue(grandchild.italic);
}
- @DisabledTest
@Feature({"AndroidWebView"})
public void testRequestAccessibilitySnapshotBoldStyle() throws Throwable {
final String data = "<html><body><b>foo</b></body></html>";
@@ -687,9 +686,10 @@ public class AwContentsTest extends AwTestBase {
assertEquals(1, root.children.size());
assertEquals("", root.text);
AccessibilitySnapshotNode child = root.children.get(0);
- assertEquals("foo", child.text);
- assertTrue(child.hasStyle);
- assertTrue(child.bold);
+ AccessibilitySnapshotNode grandchild = child.children.get(0);
+ assertEquals("foo", grandchild.text);
+ assertTrue(grandchild.hasStyle);
+ assertTrue(grandchild.bold);
}
@Feature({"AndroidWebView"})
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698