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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/background-serialize.html

Issue 1988013003: Move generic shorthand serialization checks out of specific routines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shorthand1
Patch Set: actually fix test Created 4 years, 6 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 <pre id='console'></pre> 7 <pre id='console'></pre>
8 </body> 8 </body>
9 <script> 9 <script>
10 var style = document.createElement('style'); 10 var style = document.createElement('style');
11 document.head.appendChild(style); 11 document.head.appendChild(style);
12 12
13 function test(text) { 13 function test(text) {
14 style.textContent = text; 14 style.textContent = text;
15 return style.sheet.cssRules[0].cssText; 15 return style.sheet.cssRules[0].cssText;
16 } 16 }
17 17
18 description("Test background properties obtained by using cssText when the prope rties are set by using style element's textContent."); 18 description("Test background properties obtained by using cssText when the prope rties are set by using style element's textContent.");
19 19
20 shouldBeEqualToString("test('.test { background: none; }')", ".test { background : none; }"); 20 shouldBeEqualToString("test('.test { background: none; }')", ".test { background : none; }");
21 shouldBeEqualToString("test('.test { background: none; background-color: black;} ')", ".test { background: none black; }"); 21 shouldBeEqualToString("test('.test { background: none; background-color: black;} ')", ".test { background: none black; }");
22 shouldBeEqualToString("test('.test { background: none; background-color: initial !important;}')", ".test { background-image: none; background-attachment: initia l; background-color: initial !important; background-size: initial; background-or igin: initial; background-clip: initial; background-position: initial; backgroun d-repeat: initial; }"); 22 shouldBeEqualToString("test('.test { background: none; background-color: initial !important;}')", ".test { background-image: none; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: in itial; background-origin: initial; background-clip: initial; background-color: i nitial !important; }");
23 shouldBeEqualToString("test('.test { background: initial; }')", ".test { backgro und: initial; }"); 23 shouldBeEqualToString("test('.test { background: initial; }')", ".test { backgro und: initial; }");
24 shouldBeEqualToString("test('.test { background: initial; background-color: blac k; }')", ".test { background-image: initial; background-attachment: initial; bac kground-color: black; background-size: initial; background-origin: initial; back ground-clip: initial; background-position: initial; background-repeat: initial; }"); 24 shouldBeEqualToString("test('.test { background: initial; background-color: blac k; }')", ".test { background-image: initial; background-position: initial; backg round-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: black; }");
25 shouldBeEqualToString("test('.test { background: inherit; }')", ".test { backgro und: inherit; }"); 25 shouldBeEqualToString("test('.test { background: inherit; }')", ".test { backgro und: inherit; }");
26 shouldBeEqualToString("test('.test { background: inherit; background-color: blac k; }')", ".test { background-image: inherit; background-attachment: inherit; bac kground-color: black; background-size: inherit; background-origin: inherit; back ground-clip: inherit; background-position: inherit; background-repeat: inherit; }"); 26 shouldBeEqualToString("test('.test { background: inherit; background-color: blac k; }')", ".test { background-image: inherit; background-position: inherit; backg round-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: black; }");
27 shouldBeEqualToString("test('.test { background: none; background-repeat: repeat -x !important;}')", ".test { background-image: none; background-attachment: init ial; background-color: initial; background-size: initial; background-origin: ini tial; background-clip: initial; background-position: initial; background-repeat: repeat-x !important; }"); 27 shouldBeEqualToString("test('.test { background: none; background-repeat: repeat -x !important;}')", ".test { background-image: none; background-position: initia l; background-size: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-repeat: repeat-x !important; }");
28 shouldBeEqualToString("test('.test { background: none; background-repeat: repeat -x;}')", ".test { background: none repeat-x; }"); 28 shouldBeEqualToString("test('.test { background: none; background-repeat: repeat -x;}')", ".test { background: none repeat-x; }");
29 shouldBeEqualToString("test('.test { background: none; background-position-x: 0% ;}')", ".test { background: none 0%; }"); 29 shouldBeEqualToString("test('.test { background: none; background-position-x: 0% ;}')", ".test { background: none 0%; }");
30 shouldBeEqualToString("test('.test { background: none; background-position: 20% 80%;}')", ".test { background: none 20% 80%; }"); 30 shouldBeEqualToString("test('.test { background: none; background-position: 20% 80%;}')", ".test { background: none 20% 80%; }");
31 shouldBeEqualToString("test('.test { background-position-x: 5%; }')", ".test { b ackground-position-x: 5%; }"); 31 shouldBeEqualToString("test('.test { background-position-x: 5%; }')", ".test { b ackground-position-x: 5%; }");
32 shouldBeEqualToString("test('.test { background-position-y: 5%; }')", ".test { b ackground-position-y: 5%; }"); 32 shouldBeEqualToString("test('.test { background-position-y: 5%; }')", ".test { b ackground-position-y: 5%; }");
33 shouldBeEqualToString("test('.test { background-position-x: 5%; background-posit ion-y: 10%; }')", ".test { background-position: 5% 10%; }"); 33 shouldBeEqualToString("test('.test { background-position-x: 5%; background-posit ion-y: 10%; }')", ".test { background-position: 5% 10%; }");
34 shouldBeEqualToString("test('.test { background-position-x: 5%; background-posit ion-y: 10% !important; }')", ".test { background-position-x: 5%; background-posi tion-y: 10% !important; }"); 34 shouldBeEqualToString("test('.test { background-position-x: 5%; background-posit ion-y: 10% !important; }')", ".test { background-position-x: 5%; background-posi tion-y: 10% !important; }");
35 shouldBeEqualToString("test('.test { background: url(dummy://test.png); }')", '. test { background: url("dummy://test.png"); }'); 35 shouldBeEqualToString("test('.test { background: url(dummy://test.png); }')", '. test { background: url("dummy://test.png"); }');
36 shouldBeEqualToString("test('.test { background: url(dummy://test.png); backgrou nd-color: black; }')", '.test { background: url("dummy://test.png") black; }'); 36 shouldBeEqualToString("test('.test { background: url(dummy://test.png); backgrou nd-color: black; }')", '.test { background: url("dummy://test.png") black; }');
37 37
38 </script> 38 </script>
39 <script src="../js/resources/js-test-post.js"></script> 39 <script src="../js/resources/js-test-post.js"></script>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698