| Test to make sure background shorthand properties parse and compute correctly |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS e.style.background = "red"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box') is "rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box" |
| PASS e.style.backgroundImage = "url(dummy://test.png)"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") repeat scroll 0% 0% / auto padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") repeat scroll 0% 0% / auto padding-box border-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") repeat scroll 0% 0% / auto padding-box border-box" |
| PASS e.style.backgroundRepeat = "no-repeat"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat scroll 0% 0% / auto padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") no-repeat scroll 0% 0% / auto padding-box border-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat scroll 0% 0% / auto padding-box border-box" |
| PASS e.style.backgroundAttachment = "fixed"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 0% 0% / auto padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") no-repeat fixed 0% 0% / auto padding-box border-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 0% 0% / auto padding-box border-box" |
| PASS e.style.backgroundPosition = "right bottom"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / auto padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") no-repeat fixed 100% 100% / auto padding-box border-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / auto padding-box border-box" |
| PASS e.style.backgroundSize = "cover"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / cover padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") no-repeat fixed 100% 100% / cover padding-box border-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / cover padding-box border-box" |
| PASS e.style.backgroundOrigin = "content-box"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / cover content-box border-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") no-repeat fixed 100% 100% / cover content-box border-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / cover content-box border-box" |
| PASS e.style.backgroundClip = "padding-box"; computedStyle.getPropertyValue('background') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / cover content-box padding-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(255, 0, 0) url("dummy://test.png") no-repeat fixed 100% 100% / cover content-box padding-box') is "rgb(255, 0, 0) url(\"dummy://test.png\") no-repeat fixed 100% 100% / cover content-box padding-box" |
| PASS e.style.background = "border-box padding-box url(dummy://test.png) green 45% / contain repeat fixed"; computedStyle.getPropertyValue('background') is "rgb(0, 128, 0) url(\"dummy://test.png\") repeat fixed 45% 50% / contain border-box padding-box" |
| PASS backgroundComputedStyleRoundTrip('rgb(0, 128, 0) url("dummy://test.png") repeat fixed 45% 50% / contain border-box padding-box') is "rgb(0, 128, 0) url(\"dummy://test.png\") repeat fixed 45% 50% / contain border-box padding-box" |
| PASS e.style.background = "url(dummy://test.png), red"; computedStyle.getPropertyValue('background') is "url(\"dummy://test.png\") repeat scroll 0% 0% / auto padding-box border-box, rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box" |
| PASS backgroundComputedStyleRoundTrip('url("dummy://test.png") repeat scroll 0% 0% / auto padding-box border-box, rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box') is "url(\"dummy://test.png\") repeat scroll 0% 0% / auto padding-box border-box, rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |