OLD | NEW |
(Empty) | |
| 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 <style> |
| 4 #t1 { border-top-width: 1 } |
| 5 #t2 { border-right-width: 1 } |
| 6 #t3 { border-bottom-width: 1 } |
| 7 #t4 { border-left-width: 1 } |
| 8 #t5 { border-width: 1 } |
| 9 #t6 { bottom: 1 } |
| 10 #t7 { clip: rect(1 1 1 1) } |
| 11 #t8 { font-size: 1 } |
| 12 #t9 { height: 1 } |
| 13 #t10 { left: 1 } |
| 14 #t11 { letter-spacing: 1 } |
| 15 #t12 { margin-right: 1 } |
| 16 #t13 { margin-left: 1 } |
| 17 #t14 { margin-top: 1 } |
| 18 #t15 { margin-bottom: 1 } |
| 19 #t16 { margin: 1 } |
| 20 #t17 { padding-right: 1 } |
| 21 #t18 { padding-left: 1 } |
| 22 #t19 { padding-top: 1 } |
| 23 #t20 { padding-bottom: 1 } |
| 24 #t21 { padding: 1 } |
| 25 #t22 { right: 1 } |
| 26 #t23 { top: 1 } |
| 27 #t24 { width: 1 } |
| 28 #t25 { word-spacing: 1 } |
| 29 #t26 { border-top: 1 } |
| 30 #t27 { border-right: 1 } |
| 31 #t28 { border-bottom: 1 } |
| 32 #t29 { border-left: 1 } |
| 33 #t30 { border-spacing: 10 } |
| 34 #t31 { border-spacing: 10 20 } |
| 35 #t32 { border-top: 10 double #ff0000 } |
| 36 #t33 { border-top: 10px double ff0000 } |
| 37 #t34 { border-top: 10px double #ff0000 } |
| 38 #t35 { border-top: 10 double ff0000 } |
| 39 #t36 { border: 10 solid #ff0000 } |
| 40 #t37 { border: 10px solid ff0000 } |
| 41 #t38 { border: 10px solid #ff0000 } |
| 42 #t39 { border: 10 solid ff0000 } |
| 43 #t40 { font: 10 } |
| 44 #t41 { font: 10 / 20 } |
| 45 #t42 { background-position: 10 } |
| 46 #t43 { background-position: 10 20 } |
| 47 #t44 { background: #ff0000 10 } |
| 48 #t45 { background: ff0000 10px } |
| 49 #t46 { background: #ff0000 10px } |
| 50 #t47 { background: ff0000 10 } |
| 51 #t48 { text-indent: 10 } |
| 52 #t49 { outline-width: 10 } |
| 53 #t50 { min-width: 10 } |
| 54 #t51 { min-height: 10 } |
| 55 #t52 { max-width: 10 } |
| 56 #t53 { max-height: 10 } |
| 57 </style> |
| 58 <script> |
| 59 var sheet = document.styleSheets[0]; |
| 60 test(function(){ assert_true(!!sheet); }, "StyleSheet present"); |
| 61 test(function(){ assert_equals(sheet.cssRules.length, 53); }, "All rules parsed"
); |
| 62 test(function(){ |
| 63 assert_equals(sheet.cssRules[0].style.borderTopWidth, "1px"); |
| 64 }, "Unitless length quirk for border-top-width property"); |
| 65 test(function(){ |
| 66 assert_equals(sheet.cssRules[1].style.borderRightWidth, "1px"); |
| 67 }, "Unitless length quirk for border-right-width property"); |
| 68 test(function(){ |
| 69 assert_equals(sheet.cssRules[2].style.borderBottomWidth, "1px"); |
| 70 }, "Unitless length quirk for border-bottom-width property"); |
| 71 test(function(){ |
| 72 assert_equals(sheet.cssRules[3].style.borderLeftWidth, "1px"); |
| 73 }, "Unitless length quirk for border-left-width property"); |
| 74 test(function(){ |
| 75 assert_equals(sheet.cssRules[4].style.borderWidth, "1px"); |
| 76 }, "Unitless length quirk for border-width property"); |
| 77 test(function(){ |
| 78 assert_equals(sheet.cssRules[5].style.bottom, "1px"); |
| 79 }, "Unitless length quirk for bottom property"); |
| 80 test(function(){ |
| 81 assert_equals(sheet.cssRules[6].style.clip, "rect(1px 1px 1px 1px)"); |
| 82 }, "Unitless length quirk for clip property"); |
| 83 test(function(){ |
| 84 assert_equals(sheet.cssRules[7].style.fontSize, "1px"); |
| 85 }, "Unitless length quirk for font-size property"); |
| 86 test(function(){ |
| 87 assert_equals(sheet.cssRules[8].style.height, "1px"); |
| 88 }, "Unitless length quirk for height property"); |
| 89 test(function(){ |
| 90 assert_equals(sheet.cssRules[9].style.left, "1px"); |
| 91 }, "Unitless length quirk for left property"); |
| 92 test(function(){ |
| 93 assert_equals(sheet.cssRules[10].style.letterSpacing, "1px"); |
| 94 }, "Unitless length quirk for letter-spacing property"); |
| 95 test(function(){ |
| 96 assert_equals(sheet.cssRules[11].style.marginRight, "1px"); |
| 97 }, "Unitless length quirk for margin-right property"); |
| 98 test(function(){ |
| 99 assert_equals(sheet.cssRules[12].style.marginLeft, "1px"); |
| 100 }, "Unitless length quirk for margin-left property"); |
| 101 test(function(){ |
| 102 assert_equals(sheet.cssRules[13].style.marginTop, "1px"); |
| 103 }, "Unitless length quirk for margin-top property"); |
| 104 test(function(){ |
| 105 assert_equals(sheet.cssRules[14].style.marginBottom, "1px"); |
| 106 }, "Unitless length quirk for margin-bottom property"); |
| 107 test(function(){ |
| 108 assert_equals(sheet.cssRules[15].style.margin, "1px"); |
| 109 }, "Unitless length quirk for margin property"); |
| 110 test(function(){ |
| 111 assert_equals(sheet.cssRules[16].style.paddingRight, "1px"); |
| 112 }, "Unitless length quirk for padding-right property"); |
| 113 test(function(){ |
| 114 assert_equals(sheet.cssRules[17].style.paddingLeft, "1px"); |
| 115 }, "Unitless length quirk for padding-left property"); |
| 116 test(function(){ |
| 117 assert_equals(sheet.cssRules[18].style.paddingTop, "1px"); |
| 118 }, "Unitless length quirk for padding-top property"); |
| 119 test(function(){ |
| 120 assert_equals(sheet.cssRules[19].style.paddingBottom, "1px"); |
| 121 }, "Unitless length quirk for padding-bottom property"); |
| 122 test(function(){ |
| 123 assert_equals(sheet.cssRules[20].style.padding, "1px"); |
| 124 }, "Unitless length quirk for padding property"); |
| 125 test(function(){ |
| 126 assert_equals(sheet.cssRules[21].style.right, "1px"); |
| 127 }, "Unitless length quirk for right property"); |
| 128 test(function(){ |
| 129 assert_equals(sheet.cssRules[22].style.top, "1px"); |
| 130 }, "Unitless length quirk for top property"); |
| 131 test(function(){ |
| 132 assert_equals(sheet.cssRules[23].style.width, "1px"); |
| 133 }, "Unitless length quirk for width property"); |
| 134 test(function(){ |
| 135 assert_equals(sheet.cssRules[24].style.wordSpacing, "1px"); |
| 136 }, "Unitless length quirk for word-spacing property"); |
| 137 test(function(){ |
| 138 assert_equals(sheet.cssRules[25].style.borderTop, ""); |
| 139 }, "No unitless length quirk for border-top property"); |
| 140 test(function(){ |
| 141 assert_equals(sheet.cssRules[26].style.borderRight, ""); |
| 142 }, "No unitless length quirk for border-right property"); |
| 143 test(function(){ |
| 144 assert_equals(sheet.cssRules[27].style.borderBottom, ""); |
| 145 }, "No unitless length quirk for border-bottom property"); |
| 146 test(function(){ |
| 147 assert_equals(sheet.cssRules[28].style.borderLeft, ""); |
| 148 }, "No unitless length quirk for border-left property"); |
| 149 test(function(){ |
| 150 assert_equals(sheet.cssRules[29].style.borderSpacing, "10px"); |
| 151 }, "Unitless length quirk for border-spacing property"); |
| 152 test(function(){ |
| 153 assert_equals(sheet.cssRules[30].style.borderSpacing, "10px 20px"); |
| 154 }, "Unitless length quirk for border-spacing property"); |
| 155 test(function(){ |
| 156 assert_equals(sheet.cssRules[31].style.borderTop, ""); |
| 157 }, "No unitless length quirk for border-top property"); |
| 158 test(function(){ |
| 159 assert_equals(sheet.cssRules[32].style.borderTop, ""); |
| 160 }, "No unitless length quirk for border-top property"); |
| 161 test(function(){ |
| 162 assert_equals(sheet.cssRules[33].style.borderTop, "10px double rgb(255, 0, 0
)"); |
| 163 }, "Unitless length quirk for border-top property"); |
| 164 test(function(){ |
| 165 assert_equals(sheet.cssRules[34].style.borderTop, ""); |
| 166 }, "No unitless length quirk for border-top property"); |
| 167 test(function(){ |
| 168 assert_equals(sheet.cssRules[35].style.border, ""); |
| 169 }, "No unitless length quirk for border property"); |
| 170 test(function(){ |
| 171 assert_equals(sheet.cssRules[36].style.border, ""); |
| 172 }, "No unitless length quirk for border property"); |
| 173 test(function(){ |
| 174 assert_equals(sheet.cssRules[37].style.border, "10px solid rgb(255, 0, 0)"); |
| 175 }, "Unitless length quirk for border property"); |
| 176 test(function(){ |
| 177 assert_equals(sheet.cssRules[38].style.border, ""); |
| 178 }, "No unitless length quirk for border property"); |
| 179 test(function(){ |
| 180 assert_equals(sheet.cssRules[39].style.font, ""); |
| 181 }, "No unitless length quirk for font property"); |
| 182 test(function(){ |
| 183 assert_equals(sheet.cssRules[40].style.font, ""); |
| 184 }, "No unitless length quirk for font property"); |
| 185 test(function(){ |
| 186 assert_equals(sheet.cssRules[41].style.backgroundPosition, "10px 50%"); |
| 187 }, "Unitless length quirk for background-position property"); |
| 188 test(function(){ |
| 189 assert_equals(sheet.cssRules[42].style.backgroundPosition, "10px 20px"); |
| 190 }, "Unitless length quirk for background-position property"); |
| 191 test(function(){ |
| 192 assert_equals(sheet.cssRules[43].style.background, ""); |
| 193 }, "No unitless length quirk for background property"); |
| 194 test(function(){ |
| 195 assert_equals(sheet.cssRules[44].style.background, ""); |
| 196 }, "No unitless length quirk for background property"); |
| 197 test(function(){ |
| 198 assert_equals(sheet.cssRules[45].style.background, "10px 50% rgb(255, 0, 0)"
); |
| 199 }, "No unitless length quirk for background property"); |
| 200 test(function(){ |
| 201 assert_equals(sheet.cssRules[46].style.background, ""); |
| 202 }, "No unitless length quirk for background property"); |
| 203 test(function(){ |
| 204 assert_equals(sheet.cssRules[47].style.textIndent, "10px"); |
| 205 }, "Unitless length quirk for text-indent property"); |
| 206 test(function(){ |
| 207 assert_equals(sheet.cssRules[48].style.outlineWidth, ""); |
| 208 }, "No unitless length quirk for outline-width property"); |
| 209 test(function(){ |
| 210 assert_equals(sheet.cssRules[49].style.minWidth, "10px"); |
| 211 }, "Unitless length quirk for min-width property"); |
| 212 test(function(){ |
| 213 assert_equals(sheet.cssRules[50].style.minHeight, "10px"); |
| 214 }, "Unitless length quirk for min-height property"); |
| 215 test(function(){ |
| 216 assert_equals(sheet.cssRules[51].style.maxWidth, "10px"); |
| 217 }, "Unitless length quirk for max-width property"); |
| 218 test(function(){ |
| 219 assert_equals(sheet.cssRules[52].style.maxHeight, "10px"); |
| 220 }, "Unitless length quirk for max-height property"); |
| 221 </script> |
OLD | NEW |