| OLD | NEW |
| 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 <script> | 7 <script> |
| 8 description("Test to make sure background-position is parsed correctly.") | 8 description("Test to make sure background-position is parsed correctly.") |
| 9 | 9 |
| 10 var testContainer = document.createElement("div"); | 10 var testContainer = document.createElement("div"); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 style.backgroundPosition = "solid, left bottom 20px"; | 405 style.backgroundPosition = "solid, left bottom 20px"; |
| 406 shouldBe("style.backgroundPosition", "'right top 15px, right 20px bottom'"); | 406 shouldBe("style.backgroundPosition", "'right top 15px, right 20px bottom'"); |
| 407 shouldBe("computedStyle.backgroundPosition", "'100% top 15px, right 20px 100%'")
; | 407 shouldBe("computedStyle.backgroundPosition", "'100% top 15px, right 20px 100%'")
; |
| 408 | 408 |
| 409 debug("background-position inside the background shorthand"); | 409 debug("background-position inside the background shorthand"); |
| 410 style.background = "top 10% left 30% / 10em gray round fixed border-box"; | 410 style.background = "top 10% left 30% / 10em gray round fixed border-box"; |
| 411 shouldBe("style.background", "'left 30% top 10% / 10em round fixed border-box bo
rder-box gray'"); | 411 shouldBe("style.background", "'left 30% top 10% / 10em round fixed border-box bo
rder-box gray'"); |
| 412 shouldBe("computedStyle.background", "'rgb(128, 128, 128) none round fixed left
30% top 10% / 160px border-box border-box'"); | 412 shouldBe("computedStyle.background", "'rgb(128, 128, 128) none round fixed left
30% top 10% / 160px border-box border-box'"); |
| 413 | 413 |
| 414 style.background = "right top 15px / 10em gray round fixed border-box"; | 414 style.background = "right top 15px / 10em gray round fixed border-box"; |
| 415 shouldBe("style.background", "'right 0% top 15px / 10em round fixed border-box b
order-box gray'"); | 415 shouldBe("style.background", "'right top 15px / 10em round fixed border-box bord
er-box gray'"); |
| 416 shouldBe("computedStyle.background", "'rgb(128, 128, 128) none round fixed right
0% top 15px / 160px border-box border-box'"); | 416 shouldBe("computedStyle.background", "'rgb(128, 128, 128) none round fixed 100%
top 15px / 160px border-box border-box'"); |
| 417 | 417 |
| 418 style.background = "left 10px center / 10em gray round fixed border-box"; | 418 style.background = "left 10px center / 10em gray round fixed border-box"; |
| 419 shouldBe("style.background", "'left 10px top 50% / 10em round fixed border-box b
order-box gray'"); | 419 shouldBe("style.background", "'left 10px center / 10em round fixed border-box bo
rder-box gray'"); |
| 420 shouldBe("computedStyle.background", "'rgb(128, 128, 128) none round fixed left
10px top 50% / 160px border-box border-box'"); | 420 shouldBe("computedStyle.background", "'rgb(128, 128, 128) none round fixed left
10px 50% / 160px border-box border-box'"); |
| 421 | 421 |
| 422 style.background = "left 10px center round fixed border-box"; | 422 style.background = "left 10px center round fixed border-box"; |
| 423 shouldBe("style.background", "'left 10px top 50% round fixed border-box border-b
ox'"); | 423 shouldBe("style.background", "'left 10px center round fixed border-box border-bo
x'"); |
| 424 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 10
px top 50% / auto border-box border-box'"); | 424 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 10
px 50% / auto border-box border-box'"); |
| 425 | 425 |
| 426 style.background = "center top 20px round fixed border-box"; | 426 style.background = "center top 20px round fixed border-box"; |
| 427 shouldBe("style.background", "'left 50% top 20px round fixed border-box border-b
ox'"); | 427 shouldBe("style.background", "'center top 20px round fixed border-box border-box
'"); |
| 428 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 50
% top 20px / auto border-box border-box'"); | 428 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50% top
20px / auto border-box border-box'"); |
| 429 | 429 |
| 430 style.background = "top 20px center round fixed border-box"; | 430 style.background = "top 20px center round fixed border-box"; |
| 431 shouldBe("style.background", "'left 50% top 20px round fixed border-box border-b
ox'"); | 431 shouldBe("style.background", "'center top 20px round fixed border-box border-box
'"); |
| 432 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 50
% top 20px / auto border-box border-box'"); | 432 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50% top
20px / auto border-box border-box'"); |
| 433 | 433 |
| 434 style.background = "top center round fixed border-box"; | 434 style.background = "top center round fixed border-box"; |
| 435 shouldBe("style.background", "'50% 0% round fixed border-box border-box'"); | 435 shouldBe("style.background", "'center top round fixed border-box border-box'"); |
| 436 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50% 0%
/ auto border-box border-box'"); | 436 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50% 0%
/ auto border-box border-box'"); |
| 437 | 437 |
| 438 style.background = "50px 60px / 50px round fixed border-box"; | 438 style.background = "50px 60px / 50px round fixed border-box"; |
| 439 shouldBe("style.background", "'50px 60px / 50px round fixed border-box border-bo
x'"); | 439 shouldBe("style.background", "'50px 60px / 50px round fixed border-box border-bo
x'"); |
| 440 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50px 60
px / 50px border-box border-box'"); | 440 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50px 60
px / 50px border-box border-box'"); |
| 441 | 441 |
| 442 style.background = "50px / 50px round fixed border-box"; | 442 style.background = "50px / 50px round fixed border-box"; |
| 443 shouldBe("style.background", "'50px 50% / 50px round fixed border-box border-box
'"); | 443 shouldBe("style.background", "'50px center / 50px round fixed border-box border-
box'"); |
| 444 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50px 50
% / 50px border-box border-box'"); | 444 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 50px 50
% / 50px border-box border-box'"); |
| 445 | 445 |
| 446 style.background = "left top 60px / 50px round fixed border-box"; | 446 style.background = "left top 60px / 50px round fixed border-box"; |
| 447 shouldBe("style.background", "'left 0% top 60px / 50px round fixed border-box bo
rder-box'"); | 447 shouldBe("style.background", "'left top 60px / 50px round fixed border-box borde
r-box'"); |
| 448 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 0%
top 60px / 50px border-box border-box'"); | 448 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed 0% top
60px / 50px border-box border-box'"); |
| 449 | 449 |
| 450 style.background = "left -20px top 60px / 50px round fixed border-box"; | 450 style.background = "left -20px top 60px / 50px round fixed border-box"; |
| 451 shouldBe("style.background", "'left -20px top 60px / 50px round fixed border-box
border-box'"); | 451 shouldBe("style.background", "'left -20px top 60px / 50px round fixed border-box
border-box'"); |
| 452 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left -2
0px top 60px / 50px border-box border-box'"); | 452 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left -2
0px top 60px / 50px border-box border-box'"); |
| 453 | 453 |
| 454 style.background = "border-box left 20px top / 50px round fixed"; | 454 style.background = "border-box left 20px top / 50px round fixed"; |
| 455 shouldBe("style.background", "'left 20px top 0% / 50px round fixed border-box bo
rder-box'"); | 455 shouldBe("style.background", "'left 20px top / 50px round fixed border-box borde
r-box'"); |
| 456 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px top 0% / 50px border-box border-box'"); | 456 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px 0% / 50px border-box border-box'"); |
| 457 | 457 |
| 458 style.background = "border-box round fixed left 20px top / 50px"; | 458 style.background = "border-box round fixed left 20px top / 50px"; |
| 459 shouldBe("style.background", "'left 20px top 0% / 50px round fixed border-box bo
rder-box'"); | 459 shouldBe("style.background", "'left 20px top / 50px round fixed border-box borde
r-box'"); |
| 460 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px top 0% / 50px border-box border-box'"); | 460 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px 0% / 50px border-box border-box'"); |
| 461 | 461 |
| 462 style.background = "border-box round fixed left 20px top 40px / 50px"; | 462 style.background = "border-box round fixed left 20px top 40px / 50px"; |
| 463 shouldBe("style.background", "'left 20px top 40px / 50px round fixed border-box
border-box'"); | 463 shouldBe("style.background", "'left 20px top 40px / 50px round fixed border-box
border-box'"); |
| 464 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px top 40px / 50px border-box border-box'"); | 464 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px top 40px / 50px border-box border-box'"); |
| 465 | 465 |
| 466 style.background = "border-box round fixed left 20px top 40px"; | 466 style.background = "border-box round fixed left 20px top 40px"; |
| 467 shouldBe("style.background", "'left 20px top 40px round fixed border-box border-
box'"); | 467 shouldBe("style.background", "'left 20px top 40px round fixed border-box border-
box'"); |
| 468 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px top 40px / auto border-box border-box'"); | 468 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none round fixed left 20
px top 40px / auto border-box border-box'"); |
| 469 | 469 |
| 470 style.background = "top 10% left 30% gray round fixed border-box"; | 470 style.background = "top 10% left 30% gray round fixed border-box"; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none repeat scroll 0% 0%
/ auto padding-box border-box'"); | 527 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none repeat scroll 0% 0%
/ auto padding-box border-box'"); |
| 528 | 528 |
| 529 style.background = "20px 20px 30px / 40px gray top left round fixed border-box"; | 529 style.background = "20px 20px 30px / 40px gray top left round fixed border-box"; |
| 530 shouldBe("style.background", "''"); | 530 shouldBe("style.background", "''"); |
| 531 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none repeat scroll 0% 0%
/ auto padding-box border-box'"); | 531 shouldBe("computedStyle.background", "'rgba(0, 0, 0, 0) none repeat scroll 0% 0%
/ auto padding-box border-box'"); |
| 532 | 532 |
| 533 document.body.removeChild(testContainer); | 533 document.body.removeChild(testContainer); |
| 534 </script> | 534 </script> |
| 535 </body> | 535 </body> |
| 536 </html> | 536 </html> |
| OLD | NEW |