OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 |
| 5 <style> |
| 6 .editing { |
| 7 border: 2px solid red; |
| 8 padding: 12px; |
| 9 font-size: 24px; |
| 10 } |
| 11 </style> |
| 12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> |
| 13 |
| 14 <script> |
| 15 function editingTest() { |
| 16 if (window.testRunner) |
| 17 testRunner.dumpAsText(); |
| 18 |
| 19 document.getElementById("root").focus(); |
| 20 document.execCommand("InsertText", false, "I have a issue."); |
| 21 |
| 22 if (window.internals) { |
| 23 shouldBecomeEqual('internals.hasGrammarMarker(document, 7, 1)', 'true',
function() { |
| 24 document.getElementById("root").style.display = "none"; |
| 25 finishJSTest(); |
| 26 }); |
| 27 } |
| 28 } |
| 29 |
| 30 </script> |
| 31 |
| 32 <title>Editing Test</title> |
| 33 </head> |
| 34 <body> |
| 35 <div contenteditable id="root" class="editing"></div> |
| 36 <script> |
| 37 description("This tests whether the grammatically-incorrect phrase " |
| 38 + "'I have a issue' has grammar marker on 'a'."); |
| 39 |
| 40 jsTestIsAsync = true; |
| 41 |
| 42 if (window.internals) |
| 43 internals.settings.setUnifiedTextCheckerEnabled(true); |
| 44 |
| 45 editingTest(); |
| 46 </script> |
| 47 </body> |
| 48 </html> |
OLD | NEW |