<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div id="test" style="width: 100px">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
<div id="console"></div>
<script>

if (!window.internals)
    testFailed("This test requires internals object");

debug("");

let container = document.getElementById("test");

function test(description, rangeToSelect) {
    let selection = window.getSelection();
    selection.removeAllRanges();
    selection.addRange(rangeToSelect);

    debug(description);

    [
        [ ],
        [ "IgnoresWhiteSpaceAtEndOfRun" ],
    ].forEach((behaviors) => {
        debug("  " + (behaviors.join("|") || "Default behavior"));
        for (let {text, range} of internals.statesOfTextIterator(rangeToSelect, behaviors))
            debug(`    '${text}' (location ${internals.locationFromRange(container, range, behaviors)} length ${internals.lengthFromRange(container, range, behaviors)})`);
    });

    debug("");
}

let rangeOfFirstLine = document.createRange();
rangeOfFirstLine.setStart(container.firstChild, 0);
rangeOfFirstLine.setEnd(container.firstChild, 12);
test("Testing first line...", rangeOfFirstLine);

let rangeOfSecondLine = document.createRange();
rangeOfSecondLine.setStart(container.firstChild, 12);
rangeOfSecondLine.setEnd(container.firstChild, 28);
test("Testing second line...", rangeOfSecondLine);

let rangeOfThirdLine = document.createRange();
rangeOfThirdLine.setStart(container.firstChild, 28);
rangeOfThirdLine.setEnd(container.firstChild, 40);
test("Testing third line...", rangeOfThirdLine);

let rangeOfFourthLine = document.createRange();
rangeOfFourthLine.setStart(container.firstChild, 40);
rangeOfFourthLine.setEnd(container.firstChild, 56);
test("Testing fourth line...", rangeOfFourthLine);

</script>
</body>
</html>
