| <!DOCTYPE html> |
| <meta charset=utf-8> |
| <script> |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| } |
| if (window.internals) |
| internals.setForceUseGlyphDisplayListForTesting(true); |
| </script> |
| <body onload="run()"> |
| <style> |
| @font-face { |
| font-family: "Ahem COLR"; |
| src: url("../resources/Ahem-COLR.ttf") format("truetype"); |
| } |
| span { font: 48px Ahem COLR; } |
| </style> |
| <div id=container> |
| <span id=first>A</span> |
| <span id=second>A</span> |
| </div> |
| <pre id=log></pre> |
| <script> |
| function run() { |
| requestAnimationFrame(function() { |
| requestAnimationFrame(function() { |
| if (window.internals) { |
| let firstDisplayListWithResourceIDs = internals.cachedGlyphDisplayListsForTextNode(first.firstChild, internals.DISPLAY_LIST_INCLUDE_RESOURCE_IDENTIFIERS); |
| let secondDisplayListWithResourceIDs = internals.cachedGlyphDisplayListsForTextNode(second.firstChild, internals.DISPLAY_LIST_INCLUDE_RESOURCE_IDENTIFIERS); |
| if (firstDisplayListWithResourceIDs == secondDisplayListWithResourceIDs) |
| log.textContent = "FAIL: Display lists match but shouldn't.\n" + internals.cachedGlyphDisplayListsForTextNode(first.firstChild); |
| else |
| log.textContent = "PASS: Display lists do not match."; |
| internals.setForceUseGlyphDisplayListForTesting(false); |
| container.remove(); |
| } |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }); |
| }); |
| } |
| </script> |