Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: LayoutTests/fast/css/parsing-color-quirk.html

Issue 755413002: No quirky colors for border-top/left/right/bottom shorthands. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing test for border shorthand Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script src="../../resources/testharness.js"></script> 1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script> 2 <script src="../../resources/testharnessreport.js"></script>
3 <style> 3 <style>
4 #t1 { color: 008000 } 4 #t1 { color: 008000 }
5 #t2 { background-color: 008000 } 5 #t2 { background-color: 008000 }
6 #t3 { border-color: 008000 } 6 #t3 { border-color: 008000 }
7 #t4 { border-bottom-color: 008000 } 7 #t4 { border-bottom-color: 008000 }
8 #t5 { border-left-color: 008000 } 8 #t5 { border-left-color: 008000 }
9 #t6 { border-right-color: 008000 } 9 #t6 { border-right-color: 008000 }
10 #t7 { border-top-color: 008000 } 10 #t7 { border-top-color: 008000 }
(...skipping 13 matching lines...) Expand all
24 #t17 { -webkit-text-emphasis-color: ff0000 } 24 #t17 { -webkit-text-emphasis-color: ff0000 }
25 #t18 { -webkit-text-fill-color: ff0000 } 25 #t18 { -webkit-text-fill-color: ff0000 }
26 #t19 { -webkit-text-stroke-color: ff0000 } 26 #t19 { -webkit-text-stroke-color: ff0000 }
27 27
28 #t20 { fill: ff0000 } 28 #t20 { fill: ff0000 }
29 #t21 { stroke: ff0000 } 29 #t21 { stroke: ff0000 }
30 #t22 { stop-color: ff0000 } 30 #t22 { stop-color: ff0000 }
31 #t23 { flood-color: ff0000 } 31 #t23 { flood-color: ff0000 }
32 #t24 { lighting-color: ff0000 } 32 #t24 { lighting-color: ff0000 }
33 33
34 #t25 { border-top: ff0000 }
35 #t26 { border-left: ff0000 }
36 #t27 { border-right: ff0000 }
37 #t28 { border-bottom: ff0000 }
38 #t29 { border: ff0000 }
34 </style> 39 </style>
35 <script> 40 <script>
36 var sheet = document.styleSheets[0]; 41 var sheet = document.styleSheets[0];
37 42
38 test(function(){ assert_true(!!sheet); }, "StyleSheet present"); 43 test(function(){ assert_true(!!sheet); }, "StyleSheet present");
39 test(function(){ assert_equals(sheet.cssRules.length, 24); }, "All rules parsed" ); 44 test(function(){ assert_equals(sheet.cssRules.length, 29); }, "All rules parsed" );
40 45
41 test(function(){ 46 test(function(){
42 assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)"); 47 assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)");
43 }, "Hashless color quirk for color property"); 48 }, "Hashless color quirk for color property");
44 49
45 test(function(){ 50 test(function(){
46 assert_equals(sheet.cssRules[1].style.backgroundColor, "rgb(0, 128, 0)"); 51 assert_equals(sheet.cssRules[1].style.backgroundColor, "rgb(0, 128, 0)");
47 }, "Hashless color quirk for background-color property"); 52 }, "Hashless color quirk for background-color property");
48 53
49 test(function(){ 54 test(function(){
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 assert_equals(sheet.cssRules[21].style.stopColor, ""); 131 assert_equals(sheet.cssRules[21].style.stopColor, "");
127 }, "No hashless color quirk for stop-color property"); 132 }, "No hashless color quirk for stop-color property");
128 133
129 test(function(){ 134 test(function(){
130 assert_equals(sheet.cssRules[22].style.floodColor, ""); 135 assert_equals(sheet.cssRules[22].style.floodColor, "");
131 }, "No hashless color quirk for flood-color property"); 136 }, "No hashless color quirk for flood-color property");
132 137
133 test(function(){ 138 test(function(){
134 assert_equals(sheet.cssRules[23].style.lightingColor, ""); 139 assert_equals(sheet.cssRules[23].style.lightingColor, "");
135 }, "No hashless color quirk for lighting-color property"); 140 }, "No hashless color quirk for lighting-color property");
141
142 test(function(){
143 assert_equals(sheet.cssRules[24].style.borderTopColor, "");
144 }, "No hashless color quirk for border-top shorthand");
145
146 test(function(){
147 assert_equals(sheet.cssRules[25].style.borderLeftColor, "");
148 }, "No hashless color quirk for border-left shorthand");
149
150 test(function(){
151 assert_equals(sheet.cssRules[26].style.borderRightColor, "");
152 }, "No hashless color quirk for border-right shorthand");
153
154 test(function(){
155 assert_equals(sheet.cssRules[27].style.borderBottomColor, "");
156 }, "No hashless color quirk for border-bottom shorthand");
157
158 test(function(){
159 assert_equals(sheet.cssRules[28].style.borderTopColor, "");
160 }, "No hashless color quirk for border shorthand");
136 </script> 161 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698