| <!DOCTYPE html> |
| <!-- |
| | This test checks if a static webp background image is rendered as expected. |
| --> |
| <html> |
| |
| <head> |
| <style> |
| div { |
| height: 360px; |
| width: 480px; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| window.testRunner.waitUntilDone(); |
| } |
| |
| var image = new Image(); |
| var image_name = 'static-webp-image.webp'; |
| |
| image.onload = function () { |
| var cobalt = document.getElementById('image'); |
| cobalt.style.background = 'url(' + image_name + ')'; |
| |
| if (window.testRunner) { |
| window.testRunner.notifyDone(); |
| } |
| } |
| |
| image.src = image_name; |
| |
| </script> |
| </head> |
| |
| <body> |
| <div id='image'></div> |
| </body> |
| |
| </html> |