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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-marker.html

Issue 2493873002: Introduce Internals#replaceMisspelled() and Internals#setMarker() (Closed)
Patch Set: for yosin's nit Created 4 years, 1 month 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/Source/core/testing/Internals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <script src='../../resources/testharness.js'></script>
4 <script src='../../resources/testharnessreport.js'></script>
5 <script src='../../editing/assert_selection.js'></script>
6 <script>
7 test(function () {
8 assert_not_equals(window.internals, undefined,
9 'This test requires internals.');
10 assert_selection(
11 '<div contenteditable>^appla| </div>',
12 selection => {
13 const document = selection.document;
14 const start = selection.anchorOffset;
15 const end = selection.focusOffset;
16 assert_false(internals.hasSpellingMarker(document, start, end));
17 internals.setMarker(document, selection.getRangeAt(0), 'Spelling');
18 assert_true(internals.hasSpellingMarker(document, start, end));
19 internals.replaceMisspelled(document, 'apple');
20 },
21 '<div contenteditable>apple| </div>'
22 );
23 }, 'test setMarker and replaceMisspelled in internals');
24 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698