Bug 1508435 - Delete downloaded screenshots in inspector screenshot tests. r=pbro, a=test-only
authorJulian Descottes <jdescottes@mozilla.com>
Tue, 11 Dec 2018 08:05:29 +0000
changeset 506582 05fec0e0ad5785d9275251c9b336419088cf9a7c
parent 506581 75bce0efaecc3ba7f76d13e364932ace671df8ac
child 506583 3b5f78d0f03e234565a4febb1cfafc23e8f40443
push id10472
push userryanvm@gmail.com
push dateWed, 09 Jan 2019 00:40:52 +0000
treeherdermozilla-beta@8d881ce4d5d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro, test-only
bugs1508435
milestone65.0
Bug 1508435 - Delete downloaded screenshots in inspector screenshot tests. r=pbro, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D14105
devtools/client/inspector/markup/test/helper_screenshot_node.js
--- a/devtools/client/inspector/markup/test/helper_screenshot_node.js
+++ b/devtools/client/inspector/markup/test/helper_screenshot_node.js
@@ -58,16 +58,19 @@ async function takeNodeScreenshot(inspec
   inspector.screenshotNode();
   const filePath = await whenScreenshotSucceeded;
 
   info("Create an image using the downloaded fileas source");
   const image = new Image();
   image.src = OS.Path.toFileURI(filePath);
   await once(image, "load");
 
+  info("Remove the downloaded screenshot file");
+  await OS.File.remove(filePath);
+
   return image;
 }
 /* exported takeNodeScreenshot */
 
 /**
  * Check that the provided image has the expected width, height, and color.
  * NOTE: This test assumes that the image is only made of a single color and will only
  * check one pixel.