1 This test checks that textareas have the right metrics. These numbers match IE7 except for scrollHeight. For two reasons:
2 1. scrollHeight is different for elements without enough content to cause scroll because IE7 then reports the height of the text inside the element as the scrollHeight. IE8 reports has scrollHeight == offsetHeight. Gecko/WebKit have scrollHeight == clientHeight.
3 2. For the elements with scroll in standards-mode, IE wraps the text differently. It seems to leave 2px less space for the text. We don't currently mimic this quirk. It's not clear whether we should given that we agree with IE7's clientWidth numbers in all these cases.
5 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
8 Testing BackCompat document.
10 PASS BackCompatdoc.getElementById('no-styles').clientWidth is 48
11 PASS BackCompatdoc.getElementById('no-styles').clientHeight is 48
12 PASS BackCompatdoc.getElementById('no-styles').offsetWidth is 50
13 PASS BackCompatdoc.getElementById('no-styles').offsetHeight is 50
14 PASS BackCompatdoc.getElementById('no-styles').scrollWidth is 48
15 PASS BackCompatdoc.getElementById('no-styles').scrollHeight is 48
17 Properties = disabled: "true",
18 PASS BackCompatdoc.getElementById('-disabled-true-').clientWidth is 48
19 PASS BackCompatdoc.getElementById('-disabled-true-').clientHeight is 48
20 PASS BackCompatdoc.getElementById('-disabled-true-').offsetWidth is 50
21 PASS BackCompatdoc.getElementById('-disabled-true-').offsetHeight is 50
22 PASS BackCompatdoc.getElementById('-disabled-true-').scrollWidth is 48
23 PASS BackCompatdoc.getElementById('-disabled-true-').scrollHeight is 48
25 Properties = innerHTML: "A",
26 PASS BackCompatdoc.getElementById('-innerHTML-A-').clientWidth is 48
27 PASS BackCompatdoc.getElementById('-innerHTML-A-').clientHeight is 48
28 PASS BackCompatdoc.getElementById('-innerHTML-A-').offsetWidth is 50
29 PASS BackCompatdoc.getElementById('-innerHTML-A-').offsetHeight is 50
30 PASS BackCompatdoc.getElementById('-innerHTML-A-').scrollWidth is 48
31 PASS BackCompatdoc.getElementById('-innerHTML-A-').scrollHeight is 48
33 Properties = innerHTML: "AAAAAAAAA",
34 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-').clientWidth is 31
35 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-').clientHeight is 48
36 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-').offsetWidth is 50
37 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-').offsetHeight is 50
38 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-').scrollWidth is 31
39 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-').scrollHeight is 104
41 Properties = innerHTML: "A", disabled: "true",
42 PASS BackCompatdoc.getElementById('-innerHTML-A-disabled-true-').clientWidth is 48
43 PASS BackCompatdoc.getElementById('-innerHTML-A-disabled-true-').clientHeight is 48
44 PASS BackCompatdoc.getElementById('-innerHTML-A-disabled-true-').offsetWidth is 50
45 PASS BackCompatdoc.getElementById('-innerHTML-A-disabled-true-').offsetHeight is 50
46 PASS BackCompatdoc.getElementById('-innerHTML-A-disabled-true-').scrollWidth is 48
47 PASS BackCompatdoc.getElementById('-innerHTML-A-disabled-true-').scrollHeight is 48
49 Properties = innerHTML: "AAAAAAAAA", disabled: "true",
50 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').clientWidth is 31
51 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').clientHeight is 48
52 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').offsetWidth is 50
53 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').offsetHeight is 50
54 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').scrollWidth is 31
55 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').scrollHeight is 104
57 Properties = innerHTML: "A", style: "padding:8px",
58 PASS BackCompatdoc.getElementById('-innerHTML-A-style-padding-8px-').clientWidth is 48
59 PASS BackCompatdoc.getElementById('-innerHTML-A-style-padding-8px-').clientHeight is 48
60 PASS BackCompatdoc.getElementById('-innerHTML-A-style-padding-8px-').offsetWidth is 50
61 PASS BackCompatdoc.getElementById('-innerHTML-A-style-padding-8px-').offsetHeight is 50
62 PASS BackCompatdoc.getElementById('-innerHTML-A-style-padding-8px-').scrollWidth is 48
63 PASS BackCompatdoc.getElementById('-innerHTML-A-style-padding-8px-').scrollHeight is 48
65 Properties = innerHTML: "AAAAAAAAA", style: "padding:8px",
66 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').clientWidth is 31
67 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').clientHeight is 48
68 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').offsetWidth is 50
69 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').offsetHeight is 50
70 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').scrollWidth is 31
71 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').scrollHeight is 196
73 Properties = innerHTML: "A", rows: "10",
74 PASS BackCompatdoc.getElementById('-innerHTML-A-rows-10-').clientWidth is 48
75 PASS BackCompatdoc.getElementById('-innerHTML-A-rows-10-').clientHeight is 48
76 PASS BackCompatdoc.getElementById('-innerHTML-A-rows-10-').offsetWidth is 50
77 PASS BackCompatdoc.getElementById('-innerHTML-A-rows-10-').offsetHeight is 50
78 PASS BackCompatdoc.getElementById('-innerHTML-A-rows-10-').scrollWidth is 48
79 PASS BackCompatdoc.getElementById('-innerHTML-A-rows-10-').scrollHeight is 48
81 Properties = innerHTML: "AAAAAAAAA", rows: "10",
82 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').clientWidth is 31
83 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').clientHeight is 48
84 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').offsetWidth is 50
85 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').offsetHeight is 50
86 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').scrollWidth is 31
87 PASS BackCompatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').scrollHeight is 104
89 Testing CSS1Compat document.
91 PASS CSS1Compatdoc.getElementById('no-styles').clientWidth is 54
92 PASS CSS1Compatdoc.getElementById('no-styles').clientHeight is 54
93 PASS CSS1Compatdoc.getElementById('no-styles').offsetWidth is 56
94 PASS CSS1Compatdoc.getElementById('no-styles').offsetHeight is 56
95 PASS CSS1Compatdoc.getElementById('no-styles').scrollWidth is 54
96 PASS CSS1Compatdoc.getElementById('no-styles').scrollHeight is 54
98 Properties = disabled: "true",
99 PASS CSS1Compatdoc.getElementById('-disabled-true-').clientWidth is 54
100 PASS CSS1Compatdoc.getElementById('-disabled-true-').clientHeight is 54
101 PASS CSS1Compatdoc.getElementById('-disabled-true-').offsetWidth is 56
102 PASS CSS1Compatdoc.getElementById('-disabled-true-').offsetHeight is 56
103 PASS CSS1Compatdoc.getElementById('-disabled-true-').scrollWidth is 54
104 PASS CSS1Compatdoc.getElementById('-disabled-true-').scrollHeight is 54
106 Properties = innerHTML: "A",
107 PASS CSS1Compatdoc.getElementById('-innerHTML-A-').clientWidth is 54
108 PASS CSS1Compatdoc.getElementById('-innerHTML-A-').clientHeight is 54
109 PASS CSS1Compatdoc.getElementById('-innerHTML-A-').offsetWidth is 56
110 PASS CSS1Compatdoc.getElementById('-innerHTML-A-').offsetHeight is 56
111 PASS CSS1Compatdoc.getElementById('-innerHTML-A-').scrollWidth is 54
112 PASS CSS1Compatdoc.getElementById('-innerHTML-A-').scrollHeight is 54
114 Properties = innerHTML: "AAAAAAAAA",
115 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-').clientWidth is 37
116 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-').clientHeight is 54
117 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-').offsetWidth is 56
118 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-').offsetHeight is 56
119 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-').scrollWidth is 37
120 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-').scrollHeight is 64
122 Properties = innerHTML: "A", disabled: "true",
123 PASS CSS1Compatdoc.getElementById('-innerHTML-A-disabled-true-').clientWidth is 54
124 PASS CSS1Compatdoc.getElementById('-innerHTML-A-disabled-true-').clientHeight is 54
125 PASS CSS1Compatdoc.getElementById('-innerHTML-A-disabled-true-').offsetWidth is 56
126 PASS CSS1Compatdoc.getElementById('-innerHTML-A-disabled-true-').offsetHeight is 56
127 PASS CSS1Compatdoc.getElementById('-innerHTML-A-disabled-true-').scrollWidth is 54
128 PASS CSS1Compatdoc.getElementById('-innerHTML-A-disabled-true-').scrollHeight is 54
130 Properties = innerHTML: "AAAAAAAAA", disabled: "true",
131 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').clientWidth is 37
132 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').clientHeight is 54
133 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').offsetWidth is 56
134 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').offsetHeight is 56
135 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').scrollWidth is 37
136 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-disabled-true-').scrollHeight is 64
138 Properties = innerHTML: "A", style: "padding:8px",
139 PASS CSS1Compatdoc.getElementById('-innerHTML-A-style-padding-8px-').clientWidth is 66
140 PASS CSS1Compatdoc.getElementById('-innerHTML-A-style-padding-8px-').clientHeight is 66
141 PASS CSS1Compatdoc.getElementById('-innerHTML-A-style-padding-8px-').offsetWidth is 68
142 PASS CSS1Compatdoc.getElementById('-innerHTML-A-style-padding-8px-').offsetHeight is 68
143 PASS CSS1Compatdoc.getElementById('-innerHTML-A-style-padding-8px-').scrollWidth is 66
144 PASS CSS1Compatdoc.getElementById('-innerHTML-A-style-padding-8px-').scrollHeight is 66
146 Properties = innerHTML: "AAAAAAAAA", style: "padding:8px",
147 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').clientWidth is 49
148 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').clientHeight is 66
149 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').offsetWidth is 68
150 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').offsetHeight is 68
151 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').scrollWidth is 49
152 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-style-padding-8px-').scrollHeight is 76
154 Properties = innerHTML: "A", rows: "10",
155 PASS CSS1Compatdoc.getElementById('-innerHTML-A-rows-10-').clientWidth is 54
156 PASS CSS1Compatdoc.getElementById('-innerHTML-A-rows-10-').clientHeight is 54
157 PASS CSS1Compatdoc.getElementById('-innerHTML-A-rows-10-').offsetWidth is 56
158 PASS CSS1Compatdoc.getElementById('-innerHTML-A-rows-10-').offsetHeight is 56
159 PASS CSS1Compatdoc.getElementById('-innerHTML-A-rows-10-').scrollWidth is 54
160 PASS CSS1Compatdoc.getElementById('-innerHTML-A-rows-10-').scrollHeight is 54
162 Properties = innerHTML: "AAAAAAAAA", rows: "10",
163 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').clientWidth is 37
164 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').clientHeight is 54
165 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').offsetWidth is 56
166 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').offsetHeight is 56
167 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').scrollWidth is 37
168 PASS CSS1Compatdoc.getElementById('-innerHTML-AAAAAAAAA-rows-10-').scrollHeight is 64
170 PASS successfullyParsed is true