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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/remove_spelling_markers.html

Issue 2650183002: Remove spelling markers when element is not editable (Closed)
Patch Set: Add Mac and Windows baselines Created 3 years, 10 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>
yosin_UTC9 2017/01/25 02:31:41 Could you use spellcheckTest[1] to avoid pixel ref
Xiaocheng 2017/01/25 02:56:57 Yeah, please use spellcheck_test. You may follow (
Manuel Rego 2017/01/25 08:03:10 I already tried to use spellcheck_test without suc
Xiaocheng 2017/01/25 08:28:36 Blink's spell checker works asynchronously, so spe
Manuel Rego 2017/01/25 09:10:21 @Xiaocheng: Thank you very much, this indeed fixed
2 <div id="warning" style="color: red;">
3 This test requires window.internals. If you use content_shell,
4 "--expose-internals-for-testing" command flag enables it.
5 </div>
6 <script>
7 if (window.internals)
8 document.getElementById("warning").style.display = "none";
9 </script>
10
11 <p>
12 The test checks that removing "contenteditable" from an element,
13 also removes the spelling markers.
14 It passes if you don't see any spelling marker in the following text.
15 </p>
16 <div id="wrapper" contenteditable=true>
17 <span id="grammar">some</span> <span id="spell">mispelllled</span> text.
18 </div>
19 <script>
20 var rangeGrammar = document.createRange();
21 var grammar = document.getElementById("grammar");
22 rangeGrammar.setStart(grammar, 0);
23 rangeGrammar.setEnd(grammar, 1);
24 var rangeSpell = document.createRange();
25 var spell = document.getElementById("spell");
26 rangeSpell.setStart(spell, 0);
27 rangeSpell.setEnd(spell, 1);
28 if (window.internals) {
29 internals.setMarker(document, rangeGrammar, 'grammar');
30 internals.setMarker(document, rangeSpell, 'spelling');
31 }
32 var wrapper = document.getElementById("wrapper");
33 wrapper.removeAttribute("contenteditable");
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698