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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/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
(Empty)
1 <!DOCTYPE html>
2 <div id="warning">
3 This test requires window.internals. If you use content_shell,
4 "--expose-internals-for-testing" command flag enables it.
5 </div>
6 <div id="div" contenteditable>You has the right.</div>
7 <script>
8 jsTestIsAsync = true;
9 if (window.testRunner) {
10 testRunner.setBackingScaleFactor(
11 2,
12 () => setTimeout(() => testRunner.notifyDone(), 0));
13 }
14
15 // This tests the appearance of the grammar markers rendered by Blink.
16
17 const div = document.getElementById('div');
18 const text = div.firstChild;
19
20 // Mark 'has' with grammar marker.
21 const range = document.createRange();
22 range.setStart(text, 4);
23 range.setEnd(text, 7);
24 if (window.internals) {
25 document.getElementById('warning').style.display = 'none';
26 internals.setMarker(document, range, 'grammar');
27 }
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698