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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/spellmarkers/grammar-markers-hidpi.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 jsTestIsAsync = true; 8 jsTestIsAsync = true;
9 if (window.testRunner) { 9 if (window.testRunner) {
10 testRunner.setBackingScaleFactor( 10 testRunner.setBackingScaleFactor(
11 2, 11 2,
12 () => setTimeout(() => testRunner.notifyDone(), 0)); 12 () => setTimeout(() => testRunner.notifyDone(), 0));
13 } 13 }
14 14
15 // This tests the appearance of the grammar markers rendered by Blink. 15 // This tests the appearance of the grammar markers rendered by Blink.
16 16
17 const div = document.getElementById('div'); 17 const div = document.getElementById('div');
18 const text = div.firstChild; 18 const text = div.firstChild;
19 19
20 // Mark 'has' with grammar marker. 20 // Mark 'has' with grammar marker.
21 const range = document.createRange(); 21 const range = document.createRange();
22 range.setStart(text, 4); 22 range.setStart(text, 4);
23 range.setEnd(text, 7); 23 range.setEnd(text, 7);
24 if (window.internals) { 24 if (window.internals) {
25 document.getElementById('warning').style.display = 'none'; 25 document.getElementById('warning').style.display = 'none';
26 internals.setMarker(document, range, 'grammar'); 26 internals.setMarker(document, range, 'grammar');
27 } 27 }
28 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698