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

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: eae 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 <p id="text">Test text</p>
10 <script>
11 test(function () {
12 if (!window.accessibilityController) {
13 assert_unreached("This test requires accessibilityController.");
14 return;
15 }
16
17 function getAccessibilityChildren(element) {
18 let children = [];
19 let childrenCount = element.childrenCount;
20 for (let i = 0; i < childrenCount; i++) {
21 let child = element.childAtIndex(i);
22 children.push(child);
23 child.children = getAccessibilityChildren(child);
24 }
25 return children;
26 }
27
28 let element = accessibilityController.accessibleElementById("text");
29 let children = getAccessibilityChildren(element);
dmazzoni 2016/11/28 07:50:09 This test is reasonable but it's a bit more rounda
30 assert_equals(children.length, 1);
31 let name = children.map(e => e.name).join('');
32 assert_equals(name, "Test text");
33 });
34 </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