Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: third_party/WebKit/LayoutTests/paint/spellmarkers/grammar-markers.html

Issue 2736823002: Move tests in editing/spelling for marker appearance to paint/spellmarkers (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <div id="warning"> 2 <div id="warning">
3 This test requires window.internals. If you use content_shell, 3 This test requires window.internals. If you use content_shell,
4 "--expose-internals-for-testing" command flag enables it. 4 "--expose-internals-for-testing" command flag enables it.
5 </div> 5 </div>
6 <div id="div" contenteditable>You has the right.</div> 6 <div id="div" contenteditable>You has the right.</div>
7 <script> 7 <script>
8 // This tests the appearance of the grammar markers rendered by Blink. 8 // This tests the appearance of the grammar markers rendered by Blink.
9 9
10 const div = document.getElementById('div'); 10 const div = document.getElementById('div');
11 const text = div.firstChild; 11 const text = div.firstChild;
12 12
13 // Mark 'has' with grammar marker. 13 // Mark 'has' with grammar marker.
14 const range = document.createRange(); 14 const range = document.createRange();
15 range.setStart(text, 4); 15 range.setStart(text, 4);
16 range.setEnd(text, 7); 16 range.setEnd(text, 7);
17 if (window.internals) { 17 if (window.internals) {
18 document.getElementById('warning').style.display = 'none'; 18 document.getElementById('warning').style.display = 'none';
19 internals.setMarker(document, range, 'grammar'); 19 internals.setMarker(document, range, 'grammar');
20 } 20 }
21 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698