OLD | NEW |
1 description( | 1 description( |
2 "This test checks the behavior of table styles when changing certain table attri
butes." | 2 "This test checks the behavior of table styles when changing certain table attri
butes." |
3 ); | 3 ); |
4 | 4 |
5 var yellow = "rgb(255, 255, 0)"; | 5 var yellow = "rgb(255, 255, 0)"; |
6 var orange = "rgb(255, 165, 0)"; | 6 var orange = "rgb(255, 165, 0)"; |
7 var red = "rgb(255, 0, 0)"; | 7 var red = "rgb(255, 0, 0)"; |
8 | 8 |
9 var table = document.createElement("table"); | 9 var table = document.createElement("table"); |
10 table.setAttribute("style", "border-color: yellow"); | 10 table.setAttribute("style", "border-color: yellow"); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 shouldBe("getComputedStyle(cell, '').borderBottomWidth", "'1px'"); | 146 shouldBe("getComputedStyle(cell, '').borderBottomWidth", "'1px'"); |
147 shouldBe("getComputedStyle(cell, '').borderLeftStyle", "'none'"); | 147 shouldBe("getComputedStyle(cell, '').borderLeftStyle", "'none'"); |
148 shouldBe("getComputedStyle(cell, '').borderRightStyle", "'none'"); | 148 shouldBe("getComputedStyle(cell, '').borderRightStyle", "'none'"); |
149 shouldBe("getComputedStyle(cell, '').borderTopStyle", "'solid'"); | 149 shouldBe("getComputedStyle(cell, '').borderTopStyle", "'solid'"); |
150 shouldBe("getComputedStyle(cell, '').borderBottomStyle", "'solid'"); | 150 shouldBe("getComputedStyle(cell, '').borderBottomStyle", "'solid'"); |
151 shouldBe("getComputedStyle(cell, '').borderLeftColor", "red"); | 151 shouldBe("getComputedStyle(cell, '').borderLeftColor", "red"); |
152 shouldBe("getComputedStyle(cell, '').borderRightColor", "red"); | 152 shouldBe("getComputedStyle(cell, '').borderRightColor", "red"); |
153 shouldBe("getComputedStyle(cell, '').borderTopColor", "red"); | 153 shouldBe("getComputedStyle(cell, '').borderTopColor", "red"); |
154 shouldBe("getComputedStyle(cell, '').borderBottomColor", "red"); | 154 shouldBe("getComputedStyle(cell, '').borderBottomColor", "red"); |
155 | 155 |
| 156 // resets to default border width of 3px |
| 157 table.removeAttribute("border"); |
| 158 |
| 159 shouldBe("getComputedStyle(table, '').borderLeftWidth", "'3px'"); |
| 160 shouldBe("getComputedStyle(table, '').borderRightWidth", "'3px'"); |
| 161 shouldBe("getComputedStyle(table, '').borderTopWidth", "'3px'"); |
| 162 shouldBe("getComputedStyle(table, '').borderBottomWidth", "'3px'"); |
| 163 shouldBe("getComputedStyle(table, '').borderLeftStyle", "'solid'"); |
| 164 shouldBe("getComputedStyle(table, '').borderRightStyle", "'solid'"); |
| 165 shouldBe("getComputedStyle(table, '').borderTopStyle", "'solid'"); |
| 166 shouldBe("getComputedStyle(table, '').borderBottomStyle", "'solid'"); |
| 167 shouldBe("getComputedStyle(table, '').borderLeftColor", "yellow"); |
| 168 shouldBe("getComputedStyle(table, '').borderRightColor", "yellow"); |
| 169 shouldBe("getComputedStyle(table, '').borderTopColor", "yellow"); |
| 170 shouldBe("getComputedStyle(table, '').borderBottomColor", "yellow"); |
| 171 |
156 document.body.removeChild(table); | 172 document.body.removeChild(table); |
OLD | NEW |