<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description("Tests that Range.getClientRects() / getBoundingClientRect() return DOMRect types.");
jsTestIsAsync = true;

onload = function() {
    range = document.createRange();
    range.selectNodeContents(document.body)

    rect = range.getBoundingClientRect();
    shouldBe("rect.__proto__", "DOMRect.prototype");

    rects = range.getClientRects();
    shouldBeTrue("rects.length > 0");
    shouldBe("rects[0]", "rects.item(0)");
    shouldBe("rects[0].__proto__", "DOMRect.prototype");

    finishJSTest();
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
