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

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

Issue 303993003: Handle initial values in background-repeat introduced by the background shorthand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review changes Created 6 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 // Test serializing background-repeat values on CSSOM objects 5 // Test serializing background-repeat values on CSSOM objects
6 6
7 function serialize(css) { 7 function serialize(css) {
8 document.documentElement.style.cssText = css; 8 document.documentElement.style.cssText = css;
9 return document.documentElement.style.backgroundRepeat; 9 return document.documentElement.style.backgroundRepeat;
10 } 10 }
(...skipping 16 matching lines...) Expand all
27 assert_equals(serialize('background-repeat: repeat, no-repeat;'), 'repeat, no- repeat'); 27 assert_equals(serialize('background-repeat: repeat, no-repeat;'), 'repeat, no- repeat');
28 assert_equals(serialize('background-repeat: repeat-x, repeat-y;'), 'repeat-x, repeat-y'); 28 assert_equals(serialize('background-repeat: repeat-x, repeat-y;'), 'repeat-x, repeat-y');
29 assert_equals(serialize('background-repeat: repeat, no-repeat, repeat no-repea t, no-repeat repeat, repeat-x, repeat-y;'), 29 assert_equals(serialize('background-repeat: repeat, no-repeat, repeat no-repea t, no-repeat repeat, repeat-x, repeat-y;'),
30 'repeat, no-repeat, repeat-x, repeat-y, repeat-x, repeat-y'); 30 'repeat, no-repeat, repeat-x, repeat-y, repeat-x, repeat-y');
31 }, 'Multiple values should serialize properly'); 31 }, 'Multiple values should serialize properly');
32 32
33 test(function() { 33 test(function() {
34 // FIXME (crbug.com/376179): Make setting background-repeat-x/y to multiple va lues work on CSSStyleDeclarations. 34 // FIXME (crbug.com/376179): Make setting background-repeat-x/y to multiple va lues work on CSSStyleDeclarations.
35 // assert_equals(serialize('background-repeat-x: repeat, no-repeat; background -repeat-y: no-repeat, repeat, no-repeat'), 35 // assert_equals(serialize('background-repeat-x: repeat, no-repeat; background -repeat-y: no-repeat, repeat, no-repeat'),
36 // 'repeat-x, repeat-y, repeat-x, no-repeat, repeat, no-repeat'); 36 // 'repeat-x, repeat-y, repeat-x, no-repeat, repeat, no-repeat');
37 assert_equals(serialize('background-repeat: repeat, no-repeat, repeat; backgro und-repeat-y: no-repeat'), 'repeat-x, no-repeat, repeat-x'); 37 assert_equals(serialize('background-repeat: repeat, no-repeat, repeat; backgro und-repeat-y: no-repeat;'), 'repeat-x, no-repeat, repeat-x');
38 }, 'Mismatched value lengths should repeat to their lowest common multiple'); 38 }, 'Mismatched value lengths should repeat to their lowest common multiple');
39
40 test(function() {
41 assert_equals(serialize('background: url(#1), url(#2), url(#3);'), 'repeat, re peat, repeat');
42 assert_equals(serialize('background: repeat-x, repeat-y, url(#);'), 'repeat-x, repeat-y, repeat');
43 assert_equals(serialize('background: url(#), no-repeat; background-repeat-x: n o-repeat'), 'repeat-y, no-repeat');
44 assert_equals(serialize('background: url(#), no-repeat; background-repeat-y: n o-repeat'), 'repeat-x, no-repeat');
45 }, 'Initial values introduced by the background shorthand should be handled as r epeat.');
39 </script> 46 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StylePropertySerializer.cpp » ('j') | Source/core/css/StylePropertySerializer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698