| <!DOCTYPE html> |
| <html> |
| <style> |
| .image-box { |
| width: 200px; |
| height: 200px; |
| will-change: transform; |
| } |
| .box { |
| position: fixed; |
| top: 20px; |
| } |
| .standard { |
| dynamic-range-limit: standard; |
| left: 20px; |
| } |
| .no-limit { |
| dynamic-range-limit: no-limit; |
| left: 240px; |
| } |
| </style> |
| <body> |
| <pre id="layers">Layer tree goes here in DRT</pre> |
| <div class="standard box"> |
| <img class="image-box"> |
| </div> |
| <div class="no-limit box"> |
| <img class="image-box"> |
| </div> |
| <script> |
| if (window.internals && window.testRunner) { |
| internals.clearMemoryCache(); |
| internals.setScreenContentsFormatsForTesting(["RGBA8", "RGBA16F"]); |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var image = new Image; |
| image.onload = (() => { |
| if (window.internals) |
| internals.setHasHDRContentForTesting(image); |
| |
| const elements = document.querySelectorAll("img"); |
| |
| elements.forEach((element) => { |
| element.src = image.src; |
| }); |
| |
| if (window.testRunner) { |
| document.getElementById("layers").textContent = internals.layerTreeAsText(document); |
| testRunner.notifyDone(); |
| } |
| }); |
| image.src = "../../fast/images/resources/green-400x400.png"; |
| </script> |
| </body> |
| </html> |