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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/gradients/unprefixed-gradient-parsing.html

Issue 2799793002: Implement color stop position syntax from CSS Image Values 4 (Closed)
Patch Set: greedy color repeat serializer + more tests Created 3 years, 8 months 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 8
9 function testGradient(css) 9 function testGradient(css)
10 { 10 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 shouldBe('testGradient("background-image: linear-gradient(black 0%, white)")', ' "linear-gradient(black 0%, white)"'); 46 shouldBe('testGradient("background-image: linear-gradient(black 0%, white)")', ' "linear-gradient(black 0%, white)"');
47 shouldBe('testGradient("background-image: linear-gradient(black 10px, white 20px )")', '"linear-gradient(black 10px, white 20px)"'); 47 shouldBe('testGradient("background-image: linear-gradient(black 10px, white 20px )")', '"linear-gradient(black 10px, white 20px)"');
48 shouldBe('testGradient("background-image: linear-gradient(to top left, black 0%, white)")', '"linear-gradient(to left top, black 0%, white)"'); 48 shouldBe('testGradient("background-image: linear-gradient(to top left, black 0%, white)")', '"linear-gradient(to left top, black 0%, white)"');
49 shouldBe('testGradient("background-image: linear-gradient(to top, black 0%, whit e)")', '"linear-gradient(to top, black 0%, white)"'); 49 shouldBe('testGradient("background-image: linear-gradient(to top, black 0%, whit e)")', '"linear-gradient(to top, black 0%, white)"');
50 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, white )")', '"linear-gradient(10deg, black 0%, white)"'); 50 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, white )")', '"linear-gradient(10deg, black 0%, white)"');
51 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 25%, white)")', '"linear-gradient(10deg, black 0%, 25%, white)"'); 51 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 25%, white)")', '"linear-gradient(10deg, black 0%, 25%, white)"');
52 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 0%, w hite)")', '"linear-gradient(10deg, black 0%, 0%, white)"'); 52 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 0%, w hite)")', '"linear-gradient(10deg, black 0%, 0%, white)"');
53 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 100%, white)")', '"linear-gradient(10deg, black 0%, 100%, white)"'); 53 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 100%, white)")', '"linear-gradient(10deg, black 0%, 100%, white)"');
54 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 50%, green 50%, 50%, white)")', '"linear-gradient(10deg, black 0%, 50%, green 50%, 50 %, white)"'); 54 shouldBe('testGradient("background-image: linear-gradient(10deg, black 0%, 50%, green 50%, 50%, white)")', '"linear-gradient(10deg, black 0%, 50%, green 50%, 50 %, white)"');
55 55
56 shouldBe('testGradient("background-image: linear-gradient(black, 10% 20%, white) ")', '"none"');
57 shouldBe('testGradient("background-image: linear-gradient(black 10% 20% 30%, whi te)")', '"none"');
58 shouldBe('testGradient("background-image: linear-gradient(black 10% 20%, white 1 00px 200px 300px)")', '"none"');
59 shouldBe('testGradient("background-image: linear-gradient(black 10% 20%, white)" )', '"linear-gradient(black 10% 20%, white)"');
60 shouldBe('testGradient("background-image: linear-gradient(black, white 100px 200 px)")', '"linear-gradient(black, white 100px 200px)"');
61 shouldBe('testGradient("background-image: linear-gradient(black 10% 20%, white 1 00px 200px)")', '"linear-gradient(black 10% 20%, white 100px 200px)"');
62 shouldBe('testGradient("background-image: linear-gradient(black 10% 20%, 50%, wh ite 100px 200px)")', '"linear-gradient(black 10% 20%, 50%, white 100px 200px)"') ;
63
56 debug('<p>repeating-linear-gradient</p>'); 64 debug('<p>repeating-linear-gradient</p>');
57 shouldBe('testGradient("background-image: repeating-linear-gradient(black, white )")', '"repeating-linear-gradient(black, white)"'); 65 shouldBe('testGradient("background-image: repeating-linear-gradient(black, white )")', '"repeating-linear-gradient(black, white)"');
58 shouldBe('testGradient("background-image: repeating-linear-gradient(black, 35%, white)")', '"repeating-linear-gradient(black, 35%, white)"'); 66 shouldBe('testGradient("background-image: repeating-linear-gradient(black, 35%, white)")', '"repeating-linear-gradient(black, 35%, white)"');
59 67
60 debug('<p>radial-gradient</p>'); 68 debug('<p>radial-gradient</p>');
61 69
62 shouldBe('testGradient("background-image: radial-gradient(white, black)")', '"ra dial-gradient(white, black)"'); 70 shouldBe('testGradient("background-image: radial-gradient(white, black)")', '"ra dial-gradient(white, black)"');
63 shouldBe('testGradient("background-image: radial-gradient(at bottom right, white , black)")', '"radial-gradient(at right bottom, white, black)"'); 71 shouldBe('testGradient("background-image: radial-gradient(at bottom right, white , black)")', '"radial-gradient(at right bottom, white, black)"');
64 shouldBe('testGradient("background-image: radial-gradient(farthest-corner, white , black)")', '"radial-gradient(white, black)"'); 72 shouldBe('testGradient("background-image: radial-gradient(farthest-corner, white , black)")', '"radial-gradient(white, black)"');
65 shouldBe('testGradient("background-image: radial-gradient(farthest-corner, white , 35%, black)")', '"radial-gradient(white, 35%, black)"'); 73 shouldBe('testGradient("background-image: radial-gradient(farthest-corner, white , 35%, black)")', '"radial-gradient(white, 35%, black)"');
(...skipping 20 matching lines...) Expand all
86 shouldBe('testGradient("background-image: radial-gradient(25%, white, black)")', '"none"'); 94 shouldBe('testGradient("background-image: radial-gradient(25%, white, black)")', '"none"');
87 shouldBe('testGradient("background-image: radial-gradient(white,, black)")', '"n one"'); 95 shouldBe('testGradient("background-image: radial-gradient(white,, black)")', '"n one"');
88 shouldBe('testGradient("background-image: radial-gradient(ellipse 10px, white, 2 5%, 75%, black)")', '"none"'); 96 shouldBe('testGradient("background-image: radial-gradient(ellipse 10px, white, 2 5%, 75%, black)")', '"none"');
89 shouldBe('testGradient("background-image: radial-gradient(ellipse 10px 20px, whi te, black)")', '"radial-gradient(10px 20px, white, black)"'); 97 shouldBe('testGradient("background-image: radial-gradient(ellipse 10px 20px, whi te, black)")', '"radial-gradient(10px 20px, white, black)"');
90 shouldBe('testGradient("background-image: radial-gradient(circle 10px, white, bl ack)")', '"radial-gradient(10px, white, black)"'); 98 shouldBe('testGradient("background-image: radial-gradient(circle 10px, white, bl ack)")', '"radial-gradient(10px, white, black)"');
91 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, black)")', '"radial-gradient(10px 10px at center center, white, black)"'); 99 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, black)")', '"radial-gradient(10px 10px at center center, white, black)"');
92 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, 50%, black)")', '"radial-gradient(10px 10px at center center, white, 50%, black)"'); 100 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, 50%, black)")', '"radial-gradient(10px 10px at center center, white, 50%, black)"');
93 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, 0%, black)")', '"radial-gradient(10px 10px at center center, white, 0%, bl ack)"'); 101 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, 0%, black)")', '"radial-gradient(10px 10px at center center, white, 0%, bl ack)"');
94 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, 100%, black)")', '"radial-gradient(10px 10px at center center, white, 100% , black)"'); 102 shouldBe('testGradient("background-image: radial-gradient(10px 10px at center, w hite, 100%, black)")', '"radial-gradient(10px 10px at center center, white, 100% , black)"');
95 103
104 shouldBe('testGradient("background-image: radial-gradient(black, 10% 20%, white) ")', '"none"');
105 shouldBe('testGradient("background-image: radial-gradient(black 10% 20% 30%, whi te)")', '"none"');
106 shouldBe('testGradient("background-image: radial-gradient(black 10% 20%, white 1 00px 200px 300px)")', '"none"');
107 shouldBe('testGradient("background-image: radial-gradient(black 10% 20%, white)" )', '"radial-gradient(black 10% 20%, white)"');
108 shouldBe('testGradient("background-image: radial-gradient(black, white 100px 200 px)")', '"radial-gradient(black, white 100px 200px)"');
109 shouldBe('testGradient("background-image: radial-gradient(black 10% 20%, white 1 00px 200px)")', '"radial-gradient(black 10% 20%, white 100px 200px)"');
110 shouldBe('testGradient("background-image: radial-gradient(black 10% 20%, 50%, wh ite 100px 200px)")', '"radial-gradient(black 10% 20%, 50%, white 100px 200px)"') ;
111
96 debug('<p>repeating-radial-gradient</p>'); 112 debug('<p>repeating-radial-gradient</p>');
97 shouldBe('testGradient("background-image: repeating-radial-gradient(white, black )")', '"repeating-radial-gradient(white, black)"'); 113 shouldBe('testGradient("background-image: repeating-radial-gradient(white, black )")', '"repeating-radial-gradient(white, black)"');
98 shouldBe('testGradient("background-image: repeating-radial-gradient(white, 81%, black)")', '"repeating-radial-gradient(white, 81%, black)"'); 114 shouldBe('testGradient("background-image: repeating-radial-gradient(white, 81%, black)")', '"repeating-radial-gradient(white, 81%, black)"');
99 115
100 </script> 116 </script>
101 117
102 </body> 118 </body>
103 </html> 119 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698