Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / spelling / design-mode-spellcheck-off.html
bloba1bd409ed0623f0a76167a6f569c36931471ff89
1 <!DOCTYPE html>
2 <html>
3 <body spellcheck="false">
4 <script src="../editing.js"></script>
5 <script src="../../resources/js-test.js"></script>
6 <div id="misspelled" onmouseup="checkSpellingMarker()">asd is misspelled.</div>
7 <script>
8 description("This tests whether WebKit does not spell check in 'designMode' "
9 + "when spellcheck='false'. To test manually, click 'asd' and move cursor until '.'. "
10 + "There should be no spelling marker for 'asd'.");
12 jsTestIsAsync = true;
14 if (window.internals) {
15 internals.settings.setUnifiedTextCheckerEnabled(true);
16 internals.settings.setAsynchronousSpellCheckingEnabled(true);
19 document.designMode = "on";
21 function checkSpellingMarker()
23 if (!window.internals)
24 return;
26 // First, verify spelling with spellcheck attribute off.
27 // Move selection to the next word to notify WebKit that "asd" has been typed/changed
28 // to give a chance to spellcheck.
29 moveSelectionForwardByWordCommand();
31 shouldBecomeEqual('internals.hasSpellingMarker(document, 0, 3)', 'false', function() {
32 evalAndLog('document.body.setAttribute("spellcheck", "true")');
33 // Do any selection change to force spellchecking after attribute change.
34 moveSelectionForwardByLineCommand();
35 shouldBecomeDifferent('internals.hasSpellingMarker(document, 0, 3)', 'false', finishJSTest);
36 });
39 if (window.eventSender) {
40 var misspelledDiv = document.getElementById("misspelled");
41 var x = misspelledDiv.offsetLeft;
42 var y = misspelledDiv.offsetTop;
43 eventSender.mouseMoveTo(x, y);
44 eventSender.mouseDown();
45 eventSender.mouseUp();
47 </script>
48 </body>
49 </html>