Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / shorthand-setProperty-important.html
blobc0e00ca859eaaa1f61c83e8dfaaf90949ccc8c69
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>
10 description("Verify that the priority parameter is a case-insensitive match to 'important' or the empty string.");
12 var testContainer = document.createElement("div");
13 document.body.appendChild(testContainer);
15 testContainer.innerHTML = '<div id="test">hello</div>';
17 e = document.getElementById('test');
19 // Test "important" strictness
20 e.style.borderBottomStyle = "";
21 e.style.setProperty("border-bottom-style", "solid", "!important");
22 shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
23 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
25 e.style.borderBottomStyle = "";
26 e.style.setProperty("border-bottom-style", "solid", "very important");
27 shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
28 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
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'");
35 e.style.borderBottomStyle = "";
36 e.style.setProperty("border-bottom-style", "solid", "random");
37 shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
38 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
40 e.style.borderBottomStyle = "";
41 e.style.setProperty("border-bottom-style", "solid", "undefined");
42 shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
43 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
45 e.style.borderBottomStyle = "";
46 e.style.setProperty("border-bottom-style", "solid", undefined);
47 shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'");
48 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
50 document.body.removeChild(testContainer);
51 </script>
52 </body>
53 </html>