OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
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> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 | 10 |
11 description('For bug cr571988: Spell checking for pasted mixed content.'); | 11 description('For bug cr571988: Spell checking for pasted mixed content.'); |
12 | 12 |
13 jsTestIsAsync = true; | 13 jsTestIsAsync = true; |
| 14 if (window.testRunner) |
| 15 testRunner.setMockSpellCheckerEnabled(true); |
14 | 16 |
15 var testRoot = document.createElement("div"); | 17 var testRoot = document.createElement("div"); |
16 document.body.insertBefore(testRoot, document.body.firstChild); | 18 document.body.insertBefore(testRoot, document.body.firstChild); |
17 | 19 |
18 var testEditable = document.createElement("div"); | 20 var testEditable = document.createElement("div"); |
19 testEditable.setAttribute("contentEditable", "true"); | 21 testEditable.setAttribute("contentEditable", "true"); |
20 testRoot.appendChild(testEditable); | 22 testRoot.appendChild(testEditable); |
21 | 23 |
22 var testSourceDecorated = document.createElement("div"); | 24 var testSourceDecorated = document.createElement("div"); |
23 testSourceDecorated.innerHTML = "<img src='../resources/abe.png'> zz zz."; | 25 testSourceDecorated.innerHTML = "<img src='../resources/abe.png'> zz zz."; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 80 } |
79 }; | 81 }; |
80 | 82 |
81 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, testSo
urceDecorated.innerHTML.match(/zz/g).length); }); | 83 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, testSo
urceDecorated.innerHTML.match(/zz/g).length); }); |
82 done(); | 84 done(); |
83 | 85 |
84 var successfullyParsed = true; | 86 var successfullyParsed = true; |
85 </script> | 87 </script> |
86 </body> | 88 </body> |
87 </html> | 89 </html> |
OLD | NEW |