Bug 1433648 - type \n instead of sending VK_RETURN. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Sun, 28 Jan 2018 22:43:31 +0100
changeset 30989 8e9463f5d78ab718cead4ef4d023e635dda7bfaa
parent 30988 cb1a7edd2c666af08036c83ee0b54409f12e6d7d
child 30990 c5f308f257ebd17b38f1ebd4c1fa1015f200377d
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersbustage-fix
bugs1433648
Bug 1433648 - type \n instead of sending VK_RETURN. rs=bustage-fix
mail/test/mozmill/shared-modules/test-compose-helpers.js
--- a/mail/test/mozmill/shared-modules/test-compose-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-compose-helpers.js
@@ -404,17 +404,17 @@ function get_compose_body(aController) {
  * @param aText an array of strings to type.
  */
 function type_in_composer(aController, aText) {
   // If we have any typing to do, let's do it.
   let frame = aController.eid("content-frame");
   for (let [i, aLine] of aText.entries()) {
     aController.type(frame, aLine);
     if (i < aText.length - 1)
-      aController.keypress(frame, "VK_RETURN", {});
+      aController.type(frame, "\n");
   }
 }
 
 /**
  * Given some starting node aStart, ensure that aStart is a text node which
  * has a value matching the last value of the aText string array, and has
  * a br node immediately preceding it. Repeated for each subsequent string
  * of the aText array (working from end to start).