Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / css-generated-content.html
blob3a6c2df4b4fbf9cc13bab7e428ef12968a2bbde0
1 <script src="../resources/js-test.js"></script>
3 <style>
4 #paragraph {
5 width: 10em;
7 #paragraph:before {
8 content: ' One two three\A four five ';
10 #paragraph:after {
11 content: ' eleven twelve thirteen ';
13 </style>
15 <p id="paragraph">
16 six seven
17 eight nine ten
18 </p>
20 <script>
22 description('Tests that whitespace is properly collapsed in CSS generate content, and that the concatenation of all of the strings from inline text boxes matches the string value of the text object.');
24 if (window.accessibilityController) {
25 var axParagraph = accessibilityController.accessibleElementById('paragraph');
26 for (var i = 0; i < axParagraph.childrenCount; i++) {
27 var axStaticText = axParagraph.childAtIndex(i);
28 var text = axStaticText.stringValue.substr(9);
30 var concatenatedInlineText = '';
31 for (var j = 0; j < axStaticText.childrenCount; j++) {
32 var axInlineTextBox = axStaticText.childAtIndex(j);
33 var inlineText = axInlineTextBox.stringValue.substr(9);
34 concatenatedInlineText += inlineText;
37 shouldBe('text', 'concatenatedInlineText');
40 </script>