<!DOCTYPE html>
<div style="-webkit-writing-mode: horizontal-bt;">
    <div id="scrollable" style="height: 100px; overflow: hidden;">
        <div style="height: 100px; width: 100px; background-color: silver;"></div>
        <div id="target" style="height: 100px; width: 100px; background-color: blue;"></div>
    </div>
</div>
<p id="result">
    FAIL: Test did not run.
</p>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();

    var scrollable = document.getElementById("scrollable");
    scrollable.scrollTop = -60;
    var target = document.getElementById("target");
    var hitContainer = document.caretRangeFromPoint(208, 58).startContainer;
    document.getElementById("result").innerText = hitContainer === target ? "PASS" : "FAIL";
</script>
