Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 87 lines (72 sloc) 3.014 kB
502e2a3 @fleizach <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
fleizach authored
1 <html>
2 <script>
4fc8d95 @rniwa Use testRunner in accessibility tests instead of layoutTestController
rniwa authored
3 if (window.testRunner)
4 testRunner.dumpAsText();
502e2a3 @fleizach <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
fleizach authored
5 </script>
6 <body>
7
8 <div id="result"></div>
9
10 <!-- Test radio/checkbox without labels -->
11 <input type="radio" name="r1" id="r1">Test<br>
12 <input type="checkbox" name="cb1" id="cb1">Test<br>
13
14 <!-- Test radio/checkbox with labels -->
15 <input type="radio" name="r2" id="r2"><label for="r2">This is a long test label that should be included in the size of this object</label><br>
16 <input type="checkbox" name="cb2" id="cb2"><label for="cb2">This is a long test label that should be included in the size of this object</label><br>
17
18
19 <script>
20 if (window.accessibilityController) {
21 var result = document.getElementById("result");
22
23 // radio button 1
24 var r1 = document.getElementById("r1");
25 r1.focus();
74b1fef WebKitTools:
Sam Weinig authored
26 var focusedElement = accessibilityController.focusedElement;
27 var width = focusedElement.width;
28 var height = focusedElement.height;
502e2a3 @fleizach <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
fleizach authored
29
30 result.innerText += "Radio1: ";
31 if (width <= 0 || height <= 0) {
32 result.innerText += "Fail";
33 } else {
34 result.innerText += "Pass";
35 }
36 result.innerText += "\n";
37
38 // check box 1
39 var cb1 = document.getElementById("cb1");
40 cb1.focus();
74b1fef WebKitTools:
Sam Weinig authored
41 focusedElement = accessibilityController.focusedElement;
42 width = focusedElement.width;
43 height = focusedElement.height;
502e2a3 @fleizach <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
fleizach authored
44
45 result.innerText += "Checkbox1: ";
46 if (width <= 0 || height <= 0) {
47 result.innerText += "Fail";
48 } else {
49 result.innerText += "Pass";
50 }
51 result.innerText += "\n";
52
53 // radio button with label (width should be more than 100 px)
54 var cb1 = document.getElementById("r2");
55 cb1.focus();
74b1fef WebKitTools:
Sam Weinig authored
56 focusedElement = accessibilityController.focusedElement;
57 width = focusedElement.width;
58 height = focusedElement.height;
502e2a3 @fleizach <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
fleizach authored
59
60 result.innerText += "Radio2: ";
61 if (width <= 100 || height <= 0) {
62 result.innerText += "Fail";
63 } else {
64 result.innerText += "Pass";
65 }
66 result.innerText += "\n";
67
68 // checkbox with label (width should be more than 100 px)
69 var cb1 = document.getElementById("cb2");
70 cb1.focus();
74b1fef WebKitTools:
Sam Weinig authored
71 focusedElement = accessibilityController.focusedElement;
72 width = focusedElement.width;
73 height = focusedElement.height;
502e2a3 @fleizach <rdar://problem/6041580> REGRESSION: AX: AXSize of radio buttons is 0,0
fleizach authored
74
75 result.innerText += "Checkbox2: ";
76 if (width <= 100 || height <= 0) {
77 result.innerText += "Fail";
78 } else {
79 result.innerText += "Pass";
80 }
81 result.innerText += "\n";
82
83 }
84 </script>
85 </body>
86 </html>
Something went wrong with that request. Please try again.