blob: b65f3a1ff542b78f19d626bc1a1deb31df61c544 [file] [log] [blame]
<!DOCTYPE html>
<div id="warning">
This test requires window.internals. If you use content_shell,
"--expose-internals-for-testing" command flag enables it.
</div>
<div id="div" contenteditable>You has the right.</div>
<script>
// This tests the appearance of the grammar markers rendered by Blink.
const div = document.getElementById('div');
const text = div.firstChild;
// Mark 'has' with grammar marker.
const range = document.createRange();
range.setStart(text, 4);
range.setEnd(text, 7);
if (window.internals) {
document.getElementById('warning').style.display = 'none';
internals.setMarker(document, range, 'grammar');
}
</script>