| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |