OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8"> |
| 5 <script src="../../resources/js-test.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <script> |
| 9 |
| 10 description("Verify that the priority parameter is a case-insensitive match to '
important' or the empty string."); |
| 11 |
| 12 var testContainer = document.createElement("div"); |
| 13 document.body.appendChild(testContainer); |
| 14 |
| 15 testContainer.innerHTML = '<div id="test">hello</div>'; |
| 16 |
| 17 e = document.getElementById('test'); |
| 18 |
| 19 // Test "important" strictness |
| 20 e.style.borderBottomStyle = ""; |
| 21 e.style.setProperty("border-bottom-style", "solid", "!important"); |
| 22 shouldBe("e.style.getPropertyValue('border-bottom-style')", "null"); |
| 23 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''"); |
| 24 |
| 25 e.style.borderBottomStyle = ""; |
| 26 e.style.setProperty("border-bottom-style", "solid", "very important"); |
| 27 shouldBe("e.style.getPropertyValue('border-bottom-style')", "null"); |
| 28 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''"); |
| 29 |
| 30 e.style.borderBottomStyle = ""; |
| 31 e.style.setProperty("border-bottom-style", "solid", "impORTANT"); |
| 32 shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'"); |
| 33 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "'important'"); |
| 34 |
| 35 e.style.borderBottomStyle = ""; |
| 36 e.style.setProperty("border-bottom-style", "solid", "random"); |
| 37 shouldBe("e.style.getPropertyValue('border-bottom-style')", "null"); |
| 38 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''"); |
| 39 |
| 40 document.body.removeChild(testContainer); |
| 41 </script> |
| 42 </body> |
| 43 </html> |
OLD | NEW |