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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/in-page-link-target.html

Issue 2867073003: Name calculation should not include nameFrom:author descendants. (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <div id="main"> 5 <div id="main">
6 <a id="anchor1" href="#emptyAnchor">Empty anchor</a> 6 <a id="anchor1" href="#emptyAnchor">Empty anchor</a>
7 <a id="anchor2" href="#anchorWithContent">Anchor with content</a> 7 <a id="anchor2" href="#anchorWithContent">Anchor with content</a>
8 <a id="anchor3" href="#anchorWithID">Anchor with ID</a> 8 <a id="anchor3" href="#anchorWithID">Anchor with ID</a>
9 <a id="anchor4" href="#emptySpan">Empty span</a> 9 <a id="anchor4" href="#emptySpan">Empty span</a>
10 <a id="anchor5" href="#spanWithContent">Span with content</a> 10 <a id="anchor5" href="#spanWithContent">Span with content</a>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // when it's a target and not a link. 50 // when it's a target and not a link.
51 assert_equals(target.role, 'AXRole: AXAnchor'); 51 assert_equals(target.role, 'AXRole: AXAnchor');
52 assert_equals(target.name, 'Anchor with ID'); 52 assert_equals(target.name, 'Anchor with ID');
53 }, 'Test finding the target when it is an anchor with ID.'); 53 }, 'Test finding the target when it is an anchor with ID.');
54 54
55 test(function() { 55 test(function() {
56 var anchor = accessibilityController.accessibleElementById('anchor4'); 56 var anchor = accessibilityController.accessibleElementById('anchor4');
57 assert_not_equals(anchor, undefined); 57 assert_not_equals(anchor, undefined);
58 var target = anchor.inPageLinkTarget; 58 var target = anchor.inPageLinkTarget;
59 assert_not_equals(target, undefined); 59 assert_not_equals(target, undefined);
60 assert_equals(target.role, 'AXRole: AXGroup'); 60 assert_equals(target.role, 'AXRole: AXGenericContainer');
61 assert_equals(target.name, ''); 61 assert_equals(target.name, '');
62 }, 'Test finding the target when it is an empty span.'); 62 }, 'Test finding the target when it is an empty span.');
63 63
64 test(function() { 64 test(function() {
65 var anchor = accessibilityController.accessibleElementById('anchor5'); 65 var anchor = accessibilityController.accessibleElementById('anchor5');
66 assert_not_equals(anchor, undefined); 66 assert_not_equals(anchor, undefined);
67 var target = anchor.inPageLinkTarget; 67 var target = anchor.inPageLinkTarget;
68 assert_not_equals(target, undefined); 68 assert_not_equals(target, undefined);
69 assert_equals(target.role, 'AXRole: AXGroup'); 69 assert_equals(target.role, 'AXRole: AXGenericContainer');
70 var child = target.childAtIndex(0); 70 var child = target.childAtIndex(0);
71 assert_not_equals(child, undefined); 71 assert_not_equals(child, undefined);
72 assert_equals(child.role, 'AXRole: AXStaticText'); 72 assert_equals(child.role, 'AXRole: AXStaticText');
73 assert_equals(child.name, 'Span with content'); 73 assert_equals(child.name, 'Span with content');
74 }, 'Test finding the target when it is a span with content.'); 74 }, 'Test finding the target when it is a span with content.');
75 75
76 test(function() { 76 test(function() {
77 var anchor = accessibilityController.accessibleElementById('anchor6'); 77 var anchor = accessibilityController.accessibleElementById('anchor6');
78 assert_not_equals(anchor, undefined); 78 assert_not_equals(anchor, undefined);
79 var target = anchor.inPageLinkTarget; 79 var target = anchor.inPageLinkTarget;
80 assert_not_equals(target, undefined); 80 assert_not_equals(target, undefined);
81 assert_equals(target.role, 'AXRole: AXParagraph'); 81 assert_equals(target.role, 'AXRole: AXParagraph');
82 }, 'Test finding the target when it is a paragraph.'); 82 }, 'Test finding the target when it is a paragraph.');
83 </script> 83 </script>
84 84
85 <script> 85 <script>
86 if (window.testRunner) 86 if (window.testRunner)
87 document.getElementById("main").style.display = "none"; 87 document.getElementById("main").style.display = "none";
88 </script> 88 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698