<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
window.jsTestIsAsync = true;

function runTest() {
    var bounds = video_element.getBoundingClientRect();
    var range = document.caretRangeFromPoint(bounds.left + 10, bounds.bottom - 10); 
    shadow_tree_container = range ? range.commonAncestorContainer : null;
    if (shadow_tree_container)
        shadow_tree_container.prepend("foo");
    video_element.disabled = true;
    testPassed("Passes if we did not debug assert."); 
    finishJSTest();
}
</script>
</head>
<body onload="runTest()">
    <video id="video_element" style="position:absolute; height: 240px; width: 320px;" controls></video>
</body>
</html>
