blob: 64805f57ae81c2fb626bf150c583bafc413e6136 [file] [log] [blame]
This test ensures that legacy color attributes are parsed properly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.body.bgColor='';getComputedStyle(document.body).backgroundColor; is 'rgba(0, 0, 0, 0)'
PASS document.body.bgColor='transparent';getComputedStyle(document.body).backgroundColor; is 'rgba(0, 0, 0, 0)'
PASS document.body.bgColor=' transparent ';getComputedStyle(document.body).backgroundColor; is 'rgba(0, 0, 0, 0)'
PASS document.body.bgColor='red';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor=' red ';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor='#f00';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor=' #f00 ';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor='#ff0000';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor=' #ff0000 ';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor='#fzz';getComputedStyle(document.body).backgroundColor; is 'rgb(15, 0, 0)'
PASS document.body.bgColor='#ffzzzz';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor='f00';getComputedStyle(document.body).backgroundColor; is 'rgb(15, 0, 0)'
PASS document.body.bgColor='ff0000';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
PASS document.body.bgColor='#00000000';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 0, 0)'
PASS document.body.bgColor='foo';getComputedStyle(document.body).backgroundColor; is 'rgb(15, 0, 0)'
PASS document.body.bgColor='cheese';getComputedStyle(document.body).backgroundColor; is 'rgb(192, 238, 14)'
PASS document.body.bgColor='ff򀿿ff';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 255)'
PASS document.body.bgColor='f򀿿f';getComputedStyle(document.body).backgroundColor; is 'rgb(240, 15, 0)'
PASS document.body.bgColor='rgb(255, 0, 0)';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 85, 0)'
PASS document.body.bgColor='rgba(255,255,255,50%)';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 80, 85)'
PASS document.body.bgColor='hsl(180,100%,50%)';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 1, 80)'
PASS document.body.bgColor='hsla(180,100%,50%,50%)';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 16, 5)'
PASS document.body.bgColor='currentColor';getComputedStyle(document.body).backgroundColor; is 'rgb(192, 224, 0)'
PASS document.body.bgColor='550000001155000000115500000011';getComputedStyle(document.body).backgroundColor; is 'rgb(17, 17, 17)'
PASS document.body.bgColor='550000000155000000015500000001';getComputedStyle(document.body).backgroundColor; is 'rgb(1, 1, 1)'
PASS document.body.bgColor='550000000055000000005500000000';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 0, 0)'
PASS document.body.bgColor='550020001155000000115500000011';getComputedStyle(document.body).backgroundColor; is 'rgb(32, 0, 0)'
PASS document.body.bgColor='55򀿿20򀿿1155򀿿򀿿00115500򀿿0011';getComputedStyle(document.body).backgroundColor; is 'rgb(32, 0, 0)'
PASS document.body.bgColor='#';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 0, 0)'
PASS document.body.bgColor='#5';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 0, 0)'
PASS document.body.bgColor='#55';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 5, 0)'
PASS document.body.bgColor='#555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
PASS document.body.bgColor='#5555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 0)'
PASS document.body.bgColor='#55555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 80)'
PASS document.body.bgColor='#555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
PASS document.body.bgColor='#5555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 80)'
PASS document.body.bgColor='#55555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
PASS document.body.bgColor='5';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 0, 0)'
PASS document.body.bgColor='55';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 5, 0)'
PASS document.body.bgColor='555';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 5, 5)'
PASS document.body.bgColor='5555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 0)'
PASS document.body.bgColor='55555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 80)'
PASS document.body.bgColor='555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
PASS document.body.bgColor='5555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 80)'
PASS document.body.bgColor='55555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
PASS document.body.bgColor='ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 255, 255)'
PASS document.body.bgColor='򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿򀿿ffffff';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 0, 0)'
PASS document.body.bgColor=' ';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 0, 0)'
PASS document.body.bgColor=' ffffff ';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 255, 255)'
PASS successfullyParsed is true
TEST COMPLETE