blob: 9e34c191dd120ce054380b01bdaf9d8437dc35cc [file] [log] [blame]
<html>
<script src="../../resources/js-test.js"></script>
<body style="min-height: 5000px">
<span id="elt">text</span>
<script>
description('Checks that two adjacent TextMatch markers are not being merged.');
if (window.testRunner)
testRunner.dumpAsText();
var rangeLeft = document.createRange();
var rangeRight = document.createRange();
var elt = document.getElementById('elt').firstChild;
rangeLeft.setStart(elt, 0);
rangeLeft.setEnd(elt, 2);
rangeRight.setStart(elt, 2);
rangeRight.setEnd(elt, 4);
if (!window.internals) {
alert('This test requires window.interals to run!');
} else {
window.internals.addTextMatchMarker(rangeLeft, 'kActive');
window.internals.addTextMatchMarker(rangeRight, 'kActive');
shouldBe('window.internals.markerCountForNode(elt, "textmatch")', '2');
}
var successfullyParsed = true;
</script>
</body>
</html>