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

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

Issue 2737643002: Use internals.setMarker in layout tests in 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-125.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 if (window.testRunner) {
6 testRunner.setMockSpellCheckerEnabled(true);
7 }
8
9 function runTest() { 5 function runTest() {
10 editable = document.getElementById("editable"); 6 const editable = document.getElementById("editable");
11 selection = document.getSelection(); 7 getSelection().selectAllChildren(editable);
12 selection.addRange(new Range); 8 if (window.internals) {
13 range = selection.getRangeAt(0); 9 const range = document.createRange();
14 range.selectNodeContents(editable); 10 range.setStart(editable.firstChild, 0);
11 range.setEnd(editable.firstChild, 8);
12 internals.setMarker(document, range, 'spelling');
13 }
15 } 14 }
16 </script> 15 </script>
17 </head> 16 </head>
18 <body onload="runTest();"> 17 <body onload="runTest();">
19 <div id="editable" contenteditable="true">wellcome should be marked</div> 18 <div id="editable" contenteditable="true">wellcome should be marked</div>
20 </body> 19 </body>
21 </html> 20 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-125.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698