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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html

Issue 1941463002: Removes the restriction placed on the role of the accessibility object when calling the next/previo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment and discovered that images don't work. Created 4 years, 8 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: third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html b/third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html
index 307d6ccdbc0b27acb7810f86dbe39f2a50784373..b16feffc0749a4dd9c593731693c38da875c4478 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html
@@ -17,6 +17,10 @@ jumps over the lazy <b id="dog">dog</b>.
</div>
</div>
+<p id="paragraphWithLink">
+ Paragraph with <a href="#">link</a>
+</p>
+
<script>
test(function(t)
{
@@ -89,8 +93,28 @@ test(function(t)
}
}, 'Test |nextOnLine| and |previousOnLine| for |AXLayoutObject|.');
+test(function(t)
+{
+ var axObj = accessibilityController.accessibleElementById('paragraphWithLink');
+ // There should be one static text child and a link in this paragraph.
+ assert_equals(axObj.childrenCount, 2);
+ axObj = axObj.childAtIndex(0);
+ assert_equals(axObj.role, 'AXRole: AXStaticText');
+
+ var lineText = [];
+ lineText.push(axObj.name);
+ axObj = axObj.nextOnLine();
+ assert_equals(axObj.role, 'AXRole: AXInlineTextBox');
+ lineText.push(axObj.name);
+ axObj = axObj.previousOnLine();
+ assert_equals(axObj.role, 'AXRole: AXInlineTextBox');
+ lineText.push(axObj.name);
+ assert_array_equals(lineText, ['Paragraph with ', 'link', 'Paragraph with ']);
+}, 'Test |nextOnLine| and |previousOnLine| for paragraphs with links.');
+
if (window.testRunner) {
document.getElementById('paragraph').style.display = 'none';
document.getElementById('contentEditable').style.display = 'none';
+ document.getElementById('paragraphWithLink').style.display = 'none';
}
</script>

Powered by Google App Engine
This is Rietveld 408576698