blob: ade96e57fda84b9a43219d07b923766609dabfa7 [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>
jsTestIsAsync = true;
if (window.testRunner) {
testRunner.setBackingScaleFactor(
2,
() => setTimeout(() => testRunner.notifyDone(), 0));
}
// 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>