OLD | NEW |
(Empty) | |
| 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 <style> |
| 4 #t1 { color: 008000 } |
| 5 #t2 { background-color: 008000 } |
| 6 #t3 { border-color: 008000 } |
| 7 #t4 { border-bottom-color: 008000 } |
| 8 #t5 { border-left-color: 008000 } |
| 9 #t6 { border-right-color: 008000 } |
| 10 #t7 { border-top-color: 008000 } |
| 11 |
| 12 #t8 { background: ff0000 } |
| 13 #t9 { text-shadow: 1px 1px ff0000 } |
| 14 #t10 { box-shadow: 1px 1px ff0000 } |
| 15 #t11 { background-image: linear-gradient(ff0000, blue); } |
| 16 |
| 17 #t12 { -webkit-border-start-color: ff0000 } |
| 18 #t13 { -webkit-border-end-color: ff0000 } |
| 19 #t14 { -webkit-border-before-color: ff0000 } |
| 20 #t15 { -webkit-border-after-color: ff0000 } |
| 21 |
| 22 #t16 { -webkit-column-rule-color: ff0000 } |
| 23 |
| 24 #t17 { -webkit-text-emphasis-color: ff0000 } |
| 25 #t18 { -webkit-text-fill-color: ff0000 } |
| 26 #t19 { -webkit-text-stroke-color: ff0000 } |
| 27 |
| 28 #t20 { fill: ff0000 } |
| 29 #t21 { stroke: ff0000 } |
| 30 #t22 { stop-color: ff0000 } |
| 31 #t23 { flood-color: ff0000 } |
| 32 #t24 { lighting-color: ff0000 } |
| 33 |
| 34 </style> |
| 35 <script> |
| 36 var sheet = document.styleSheets[0]; |
| 37 |
| 38 test(function(){ assert_true(!!sheet); }, "StyleSheet present"); |
| 39 test(function(){ assert_equals(sheet.cssRules.length, 24); }, "All rules parsed"
); |
| 40 |
| 41 test(function(){ |
| 42 assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)"); |
| 43 }, "Hashless color quirk for color property"); |
| 44 |
| 45 test(function(){ |
| 46 assert_equals(sheet.cssRules[1].style.backgroundColor, "rgb(0, 128, 0)"); |
| 47 }, "Hashless color quirk for background-color property"); |
| 48 |
| 49 test(function(){ |
| 50 assert_equals(sheet.cssRules[2].style.borderColor, "rgb(0, 128, 0)"); |
| 51 }, "Hashless color quirk for border-color short-hand"); |
| 52 |
| 53 test(function(){ |
| 54 assert_equals(sheet.cssRules[3].style.borderBottomColor, "rgb(0, 128, 0)"); |
| 55 }, "Hashless color quirk for border-bottom-color property"); |
| 56 |
| 57 test(function(){ |
| 58 assert_equals(sheet.cssRules[4].style.borderLeftColor, "rgb(0, 128, 0)"); |
| 59 }, "Hashless color quirk for border-left-color property"); |
| 60 |
| 61 test(function(){ |
| 62 assert_equals(sheet.cssRules[5].style.borderRightColor, "rgb(0, 128, 0)"); |
| 63 }, "Hashless color quirk for border-right-color property"); |
| 64 |
| 65 test(function(){ |
| 66 assert_equals(sheet.cssRules[6].style.borderTopColor, "rgb(0, 128, 0)"); |
| 67 }, "Hashless color quirk for border-top-color property"); |
| 68 |
| 69 test(function(){ |
| 70 assert_equals(sheet.cssRules[7].style.backgroundColor, ""); |
| 71 }, "No hashless color quirk for background short-hand"); |
| 72 |
| 73 test(function(){ |
| 74 assert_equals(sheet.cssRules[8].style.textShadow, ""); |
| 75 }, "No hashless color quirk for text-shadow color"); |
| 76 |
| 77 test(function(){ |
| 78 assert_equals(sheet.cssRules[9].style.boxShadow, ""); |
| 79 }, "No hashless color quirk for box-shadow color"); |
| 80 |
| 81 test(function(){ |
| 82 assert_equals(sheet.cssRules[10].style.backgroundImage, ""); |
| 83 }, "No hashless color quirk for linear-gradient colors"); |
| 84 |
| 85 test(function(){ |
| 86 assert_equals(sheet.cssRules[11].style.WebkitBorderStartColor, ""); |
| 87 }, "No hashless color quirk for -webkit-border-start-color property"); |
| 88 |
| 89 test(function(){ |
| 90 assert_equals(sheet.cssRules[12].style.WebkitBorderEndColor, ""); |
| 91 }, "No hashless color quirk for -webkit-border-end-color property"); |
| 92 |
| 93 test(function(){ |
| 94 assert_equals(sheet.cssRules[13].style.WebkitBorderBeforeColor, ""); |
| 95 }, "No hashless color quirk for -webkit-border-before-property"); |
| 96 |
| 97 test(function(){ |
| 98 assert_equals(sheet.cssRules[14].style.WebkitBorderAfterColor, ""); |
| 99 }, "No hashless color quirk for -webkit-border-after-color property"); |
| 100 |
| 101 test(function(){ |
| 102 assert_equals(sheet.cssRules[15].style.WebkitColumnRuleColor, ""); |
| 103 }, "No hashless color quirk for -webkit-column-rule-color property"); |
| 104 |
| 105 test(function(){ |
| 106 assert_equals(sheet.cssRules[16].style.WebkitTextEmphasisColor, ""); |
| 107 }, "No hashless color quirk for -webkit-text-emphasis-color property"); |
| 108 |
| 109 test(function(){ |
| 110 assert_equals(sheet.cssRules[17].style.WebkitTextFillColor, ""); |
| 111 }, "No hashless color quirk for -webkit-text-fill-color property"); |
| 112 |
| 113 test(function(){ |
| 114 assert_equals(sheet.cssRules[18].style.WebkitTextStrokeColor, ""); |
| 115 }, "No hashless color quirk for -webkit-text-stroke-color property"); |
| 116 |
| 117 test(function(){ |
| 118 assert_equals(sheet.cssRules[19].style.fill, ""); |
| 119 }, "No hashless color quirk for fill property"); |
| 120 |
| 121 test(function(){ |
| 122 assert_equals(sheet.cssRules[20].style.stroke, ""); |
| 123 }, "No hashless color quirk for stroke property"); |
| 124 |
| 125 test(function(){ |
| 126 assert_equals(sheet.cssRules[21].style.stopColor, ""); |
| 127 }, "No hashless color quirk for stop-color property"); |
| 128 |
| 129 test(function(){ |
| 130 assert_equals(sheet.cssRules[22].style.floodColor, ""); |
| 131 }, "No hashless color quirk for flood-color property"); |
| 132 |
| 133 test(function(){ |
| 134 assert_equals(sheet.cssRules[23].style.lightingColor, ""); |
| 135 }, "No hashless color quirk for lighting-color property"); |
| 136 </script> |
OLD | NEW |