4 <script src=
"../../resources/js-test.js"></script>
8 <div id=
"src" contenteditable=
"true" spellcheck=
"true"></div>
10 <script language=
"javascript">
11 description('Test if WebKit does not spellcheck text when pasting text and continuous spellcheck is turned off. ' +
12 'To test manually, disable continuous spellcheck, copy the text "zz apple" and paste it to the textarea. ' +
13 'When "zz" is not marked as misspelled, this test succeeds.');
17 internals
.settings
.setAsynchronousSpellCheckingEnabled(true);
19 // Insert a misspelled word to initialize a spellchecker.
20 var srcNode
= document
.getElementById('src');
22 document
.execCommand("InsertText", false, 'z');
23 document
.execCommand("InsertText", false, 'z');
24 document
.execCommand("InsertText", false, ' ');
25 document
.execCommand("InsertText", false, 'a');
26 document
.execCommand("InsertText", false, 'p');
27 document
.execCommand("InsertText", false, 'p');
28 document
.execCommand("InsertText", false, 'l');
29 document
.execCommand("InsertText", false, 'e');
30 shouldBecomeEqual('internals.hasSpellingMarker(document, 0, 2)', 'true', function() {});
31 window
.getSelection().selectAllChildren(srcNode
);
32 document
.execCommand('Copy');
34 internals
.setContinuousSpellCheckingEnabled(false);
36 document
.execCommand('Paste');
37 shouldBecomeDifferent('internals.hasSpellingMarker(document, 0, 2)', 'true', finishJSTest
);