4 <script src=
"../resources/js-test.js"></script>
8 <!-- Cases with no whitespace -->
10 <button id=
"n1"><span>Hello
</span>World
</button>
11 <button id=
"n2">Hello
<span>World
</span></button>
12 <button id=
"n3"><span>Hello
</span><span>World
</span></button>
13 <button id=
"n4"><b>Hello
</b><b>World
</b></button>
14 <button id=
"n5"><div style=
"display:inline">Hello
</div><div style=
"display:inline">World
</div></button>
15 <div role=
"button" id=
"n6"><span>Hello
</span>World
</div>
17 <!-- Cases where whitespace should be added -->
20 <div>Hello
</div><div>World
</div>
23 <span style=
"float:left">Hello
</span>World
26 <span style=
"float:left">Hello
</span><span style=
"float:right">World
</span>
28 <div role=
"button" id=
"y4">
29 <div>Hello
</div><div>World
</div>
31 <div role=
"button" id=
"y5">
32 <span style=
"float:left">Hello
</span>World
34 <div role=
"button" id=
"y6">
35 <span style=
"float:left">Hello
</span><span style=
"float:right">World
</span>
38 <div id=
"console"></div>
40 if (window
.testRunner
&& window
.accessibilityController
) {
41 testRunner
.dumpAsText();
43 function accessibleTitle(id
) {
44 var axObject
= accessibilityController
.accessibleElementById(id
);
45 return axObject
.deprecatedTitle
.replace('AXTitle: ', '');
48 shouldBe('accessibleTitle("n1")', '"HelloWorld"');
49 shouldBe('accessibleTitle("n2")', '"HelloWorld"');
50 shouldBe('accessibleTitle("n3")', '"HelloWorld"');
51 shouldBe('accessibleTitle("n4")', '"HelloWorld"');
52 shouldBe('accessibleTitle("n5")', '"HelloWorld"');
53 shouldBe('accessibleTitle("n6")', '"HelloWorld"');
55 shouldBe('accessibleTitle("y1")', '"Hello World"');
56 shouldBe('accessibleTitle("y2")', '"Hello World"');
57 shouldBe('accessibleTitle("y3")', '"Hello World"');
58 shouldBe('accessibleTitle("y4")', '"Hello World"');
59 shouldBe('accessibleTitle("y5")', '"Hello World"');
60 shouldBe('accessibleTitle("y6")', '"Hello World"');