Bug 1617406 - Use a real image in image insertion test. r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Sun, 23 Feb 2020 21:56:32 +1300
changeset 37415 7f0bba3048c15e55b7270eb059b99e402af300d7
parent 37414 7953b475f1c1265ea4e456fe093f36cd83c8c6b3
child 37416 947de04af434eda6e08ea381a7a8747fdb762cb8
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1617406
Bug 1617406 - Use a real image in image insertion test. r=mkmelin
mail/test/browser/composition/browser_imageInsertionDialog.js
--- a/mail/test/browser/composition/browser_imageInsertionDialog.js
+++ b/mail/test/browser/composition/browser_imageInsertionDialog.js
@@ -29,17 +29,18 @@ add_task(function test_image_insertion_d
   cwc.e("content-frame").focus();
 
   // Now open the image window
   wh.plan_for_modal_dialog("Mail:image", function insert_image(mwc) {
     // Insert the url of the image.
     let srcloc = mwc.window.document.getElementById("srcInput");
     srcloc.focus();
 
-    input_value(mwc, "whateverItDoesntMatterAnyway.png");
+    let file = new FileUtils.File(getTestFilePath("data/tb-logo.png"));
+    input_value(mwc, Services.io.newFileURI(file).spec);
     mwc.sleep(0);
 
     // Don't add alternate text
     mwc.click(mwc.eid("noAltTextRadio"));
 
     mwc.window.document.documentElement.querySelector("dialog").acceptDialog();
   });
   cwc.click(cwc.eid("insertImage"));