| <!DOCTYPE html> | |
| <!-- | |
| | Test case for the background shorthand property with multiple images. | |
| --> | |
| <html> | |
| <head> | |
| <style> | |
| div { | |
| width: 500px; | |
| height: 400px; | |
| } | |
| </style> | |
| <script> | |
| if (window.testRunner) { | |
| window.testRunner.waitUntilDone(); | |
| } | |
| var image1 = new Image(); | |
| var image2 = new Image(); | |
| var image1_name = 'cobalt.png'; | |
| var image2_name = 'test.png'; | |
| image1.onload = onload; | |
| image2.onload = onload; | |
| image1.src = image1_name; | |
| image2.src = image2_name; | |
| var counter = 0; | |
| function onload() { | |
| counter++; | |
| if (counter == 2) { | |
| var cobalt = document.getElementById('image'); | |
| cobalt.style.backgroundImage = 'url(' + image1_name + '), none, url(' + image2_name + ')'; | |
| if (window.testRunner) { | |
| window.testRunner.notifyDone(); | |
| } | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body> | |
| <div id='image'></div> | |
| </body> | |
| </html> |