Reviewed by me
[WebKit-https.git] / LayoutTests / editing / editing.js
index 17e0864597411d10b261038a9456a5d22163e94c..51b98253cfc7a051a21313535b3deb39f58af714 100644 (file)
@@ -130,16 +130,18 @@ function insertNewlineCommand() {
 
 //-------------------------------------------------------------------------------------------------------
 
 
 //-------------------------------------------------------------------------------------------------------
 
-function execTypeCharacterCommand() {
-    document.execCommand("InsertText", false, "x");
+function execTypeCharacterCommand(c) {
+    if (arguments.length == 0 || c == undefined || c.length == 0 || c.length > 1)
+        c = 'x';
+    document.execCommand("InsertText", false, c);
 }
 }
-function typeCharacterCommand() {
+function typeCharacterCommand(c) {
     if (commandDelay > 0) {
         window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay);
         commandCount++;
     }
     else {
     if (commandDelay > 0) {
         window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay);
         commandCount++;
     }
     else {
-        execTypeCharacterCommand();
+        execTypeCharacterCommand(c);
     }
 }
 
     }
 }