| <!-- This test waits until all image data is received before decoding, |
| which allows YUV decoding if the feature is enabled. |
| See virtual/yuv-rasterization/README.md. |
| |
| This test passes if the image is shown correctly and uses YUV decoding.--> |
| <script> |
| const img = new Image(); |
| img.src = "../resources/missing-eoi.jpg"; |
| img.width = "400"; |
| img.decode().then(() => { |
| document.body.appendChild(img); |
| if (window.testRunner) { |
| setTimeout(function() { testRunner.notifyDone() }, 0); |
| } |
| }).catch(() => { |
| var error = document.createElement('p'); |
| error.innerText = 'Error loading image' |
| document.body.appendChild(error); |
| }); |
| |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| </script> |