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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-disable-enable.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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body onload="test(document.getElementById('destination'), document.getElementBy Id('frame').contentWindow.document);"> 6 <body onload="test(document.getElementById('destination'), document.getElementBy Id('frame').contentWindow.document);">
7 <div id="container"> 7 <div id="container">
8 <div id="destination" contentEditable></div> 8 <div id="destination" contentEditable></div>
9 <iframe id="frame" src="data:text/html,<body contenteditable></body>"></iframe > 9 <iframe id="frame" src="data:text/html,<body contenteditable></body>"></iframe >
10 </div> 10 </div>
11 11
12 <script> 12 <script>
13 description("Spell check markers should be removed from the whole page when disa bling spell checker " 13 description("Spell check markers should be removed from the whole page when disa bling spell checker "
14 + "but they should be restored in the focused editable if spell checker gets enabled. " 14 + "but they should be restored in the focused editable if spell checker gets enabled. "
15 + "To test manually, turn spell checker off - misspelling markers should dis appear. " 15 + "To test manually, turn spell checker off - misspelling markers should dis appear. "
16 + "Having the editable focused, turn spell checker on. Misspellings in the e ditable should be marked."); 16 + "Having the editable focused, turn spell checker on. Misspellings in the e ditable should be marked.");
17 17
18 jsTestIsAsync = true; 18 jsTestIsAsync = true;
19 if (window.testRunner)
20 testRunner.setMockSpellCheckerEnabled(true);
19 21
20 function hasSpellingMarkerOnSetting(element, enableSpellChecking) 22 function hasSpellingMarkerOnSetting(element, enableSpellChecking)
21 { 23 {
22 internals.setSpellCheckingEnabled(enableSpellChecking); 24 internals.setSpellCheckingEnabled(enableSpellChecking);
23 return !!internals.markerCountForNode(element.firstChild, "spelling"); 25 return !!internals.markerCountForNode(element.firstChild, "spelling");
24 } 26 }
25 27
26 var editableDiv = null; 28 var editableDiv = null;
27 var editableBodyInFrame = null; 29 var editableBodyInFrame = null;
28 30
(...skipping 26 matching lines...) Expand all
55 }); 57 });
56 }); 58 });
57 }); 59 });
58 }); 60 });
59 }); 61 });
60 } 62 }
61 63
62 </script> 64 </script>
63 </body> 65 </body>
64 </html> 66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698