<!DOCTYPE html>
<script>
if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}
if (window.internals)
    internals.setForceUseGlyphDisplayListForTesting(true);
</script>
<body onload="run()">
<style>
#first, #second { text-shdaow: 5px 5px blue; }
</style>
<div id=container>
    <span id=first>Some text</span>
    <span id=second>Some text</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>
