blob: 9ac740b138dc6a6b612487f2d3668a6855823ea6 [file] [log] [blame]
<!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 SVG";
src: url("../resources/Ahem-SVG.ttf") format("truetype");
}
span { font: 48px Ahem SVG; }
</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>