Bug 1496704 - add value to altTextRadioGroup radio widgets, to make the radiogroup selection work properly. r=jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Mon, 01 Jul 2019 14:23:44 +0300
changeset 36002 924dc82526122c8275327cc14cbbf34256562339
parent 36001 73ce6f5f060aa2bc387bf5d27ecec55deee71c12
child 36003 4cd00a290f7a4172c4409c1cadc1ab3a1d260bdb
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1496704
Bug 1496704 - add value to altTextRadioGroup radio widgets, to make the radiogroup selection work properly. r=jorgk Was causing TEST-UNEXPECTED-FAIL | [snip]/mozmill/composition/test-image-insertion-dialog.js
editor/ui/dialogs/content/edImage.inc.xul
mail/test/mozmill/composition/test-image-insertion-dialog.js
--- a/editor/ui/dialogs/content/edImage.inc.xul
+++ b/editor/ui/dialogs/content/edImage.inc.xul
@@ -49,38 +49,38 @@
                   for     = "titleInput"/>
                 <textbox flex="1"
                   id      = "titleInput"
                   class   = "MinWidth20em"
                   tooltiptext="&title.tooltip;"
                   tabindex="4"/>
               </row>
               <row align="center">
-                <radio id = "altTextRadio"
-                  label   = "&altText.label;"
-                  accesskey = "&altText.accessKey;"
-                  tooltiptext="&altTextEditField.tooltip;"
+                <radio id="altTextRadio" value="usealt-yes"
+                       label="&altText.label;"
+                       accesskey="&altText.accessKey;"
+                       tooltiptext="&altTextEditField.tooltip;"
 #ifndef MOZ_SUITE
             persist="selected"
 #endif
                   oncommand = "SetAltTextDisabled(false);"
                   tabindex="5"/>
                 <textbox flex="1"
                   id      = "altTextInput"
                   class   = "MinWidth20em"
                   tooltiptext="&altTextEditField.tooltip;"
                   oninput = "SetAltTextDisabled(false);"
                   tabindex="6"/>
               </row>
             </rows>
           </grid>
 
-          <radio id = "noAltTextRadio"
-            label   = "&noAltText.label;"
-            accesskey = "&noAltText.accessKey;"
+          <radio id="noAltTextRadio" value="usealt-no"
+                 label="&noAltText.label;"
+                 accesskey = "&noAltText.accessKey;"
 #ifndef MOZ_SUITE
             persist="selected"
 #endif
             oncommand = "SetAltTextDisabled(true);"/>
         </radiogroup>
       </vbox>
 
       <vbox id="imageDimensions" align="start">
--- a/mail/test/mozmill/composition/test-image-insertion-dialog.js
+++ b/mail/test/mozmill/composition/test-image-insertion-dialog.js
@@ -58,21 +58,18 @@ function test_image_insertion_dialog_per
     mwc.window.document.documentElement.acceptDialog();
   });
   cwc.click(cwc.eid("insertImage"));
   wh.wait_for_modal_dialog();
   wait_for_window_close();
 
   // Check that the radio option persists
   wh.plan_for_modal_dialog("imageDlg", function insert_image(mwc) {
-    // This first assert fails for some unknown reason, see bug 1496704.
-    /*
     assert_true(mwc.window.document.getElementById("noAltTextRadio").selected,
       "We should persist the previously selected value");
-     */
     // We change to "use alt text"
     mwc.click(mwc.eid("altTextRadio"));
     mwc.window.document.documentElement.cancelDialog();
   });
   cwc.click(cwc.eid("insertImage"));
   wh.wait_for_modal_dialog();
   wait_for_window_close();