Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / spelling / spelling-huge-text.html
blob3d0edc557ed7d21782856dc6a40dbd22c102baff
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body onload="test();">
7 <div id="console"></div>
8 <div id="editable" contenteditable></div>
10 <script>
11 description("Text to check is divided into chunks to make sure checking some huge text " +
12 "does not freeze the page/UI. With the asynchronous spell checker the whole text is checked. " +
13 "To test manaully trigger spell checking of the editable (e.g. by copy+paste) with unified " +
14 "and asynchronous checker on. There should be 6 misspellings marked.");
16 jsTestIsAsync = true;
18 var testEditable = null;
20 function test()
22 testEditable = document.getElementById("editable");
23 var loopCount = 150;
24 var longText = "Good good good good good good good good good good good good good. " +
25 "Good good good good good good good good good good good good good. " +
26 "Good good good good good good good good good good good good good. " +
27 "Good good good good good good good good good good good good good.";
29 var testLongText = "";
30 for (var i = 0; i < loopCount; ++i)
31 testLongText += longText;
33 testLongText = "zz zz zz. " + testLongText + " zz zz zz.";
34 testEditable.innerText = testLongText;
36 if (!window.internals) {
37 log("Test manually. See the description for steps");
38 return;
41 internals.settings.setUnifiedTextCheckerEnabled(true);
42 internals.settings.setAsynchronousSpellCheckingEnabled(true);
44 internals.setContinuousSpellCheckingEnabled(false);
45 testEditable.focus();
46 internals.setContinuousSpellCheckingEnabled(true);
47 shouldBecomeEqual('internals.markerCountForNode(testEditable.childNodes[0], "spelling")', '6', function() {
48 testEditable.removeChild(testEditable.childNodes[0]);
49 finishJSTest();
50 }, 5000 /* huge text needs more time to be spell checked */);
52 </script>
53 </body>
54 </html>