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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/css-first-letter-children.html

Issue 2524313002: Fix AXLayoutObject not to add duplicated children for CSS first-letter (Closed)
Patch Set: dmazzoni review Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/accessibility/first-letter-text-transform-causes-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <style>
5 p::first-letter {
6 font-size: 200%;
7 }
8 </style>
9 <h1 id="heading">Test heading</h1>
10 <p id="text">Test text</p>
11 <script>
12 test(function () {
13 if (!window.accessibilityController) {
14 assert_unreached("This test requires accessibilityController.");
15 return;
16 }
17
18 // Test an element that gets its own accessible name.
19 let element = accessibilityController.accessibleElementById("heading");
20 assert_equals(element.name, "Test heading");
21
22 function getAccessibilityChildren(element) {
23 let children = [];
24 let childrenCount = element.childrenCount;
25 for (let i = 0; i < childrenCount; i++) {
26 let child = element.childAtIndex(i);
27 children.push(child);
28 child.children = getAccessibilityChildren(child);
29 }
30 return children;
31 }
32
33 // Test by concatenating names of all children.
34 element = accessibilityController.accessibleElementById("text");
35 let children = getAccessibilityChildren(element);
36 assert_equals(children.length, 1);
37 let name = children.map(e => e.name).join('');
38 assert_equals(name, "Test text");
39 });
40 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/accessibility/first-letter-text-transform-causes-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698