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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-mixed-editable-crash.html

Issue 2270293003: Add a switch to TestRunner to enable/disable mock spell checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use in-class initialization Created 4 years, 3 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 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <p>Make sure spell checker attempts to spell check uneditable text "Bob".</p> 4 <p>Make sure spell checker attempts to spell check uneditable text "Bob".</p>
5 <div id="edit" contenteditable="true"><span contenteditable="false">Bob</span> ; <span contenteditable="false"></span></div> 5 <div id="edit" contenteditable="true"><span contenteditable="false">Bob</span> ; <span contenteditable="false"></span></div>
6 <div id="log"></div> 6 <div id="log"></div>
7 <script> 7 <script>
8 if (window.testRunner)
9 testRunner.setMockSpellCheckerEnabled(true);
10
8 test(function() { 11 test(function() {
9 var text = edit.childNodes[1]; 12 var text = edit.childNodes[1];
10 var selection = window.getSelection(); 13 var selection = window.getSelection();
11 selection.collapse(text, text.length); 14 selection.collapse(text, text.length);
12 // Trigger spell checking 15 // Trigger spell checking
13 selection.modify('move', 'right', 'character'); 16 selection.modify('move', 'right', 'character');
14 }); 17 });
15 </script> 18 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698