Bug 1257523 - Remove GeckoDriver#deleteFile; r=automatedtester a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 17 Mar 2016 14:26:57 +0000
changeset 325413 bc92792d891b14dce5a206bcf1f4b495a304fab5
parent 325412 10de925450161fcc1352d80579bfc5a6657d4a23
child 325414 5f2599a38e172132413779208686c04b99307f8a
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1257523
milestone47.0a2
Bug 1257523 - Remove GeckoDriver#deleteFile; r=automatedtester a=test-only MozReview-Commit-ID: 7kOZ5hVC5He
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -389,29 +389,16 @@ GeckoDriver.prototype.getVisibleText = f
   } catch (e) {
     if (el.nodeName == "#text") {
       lines.push(el.textContent);
     }
   }
 };
 
 /**
-  * Given a file name, this will delete the file from the temp directory
-  * if it exists.
-  *
-  * @param {string} filename
-  */
-GeckoDriver.prototype.deleteFile = function(filename) {
-  let file = FileUtils.getFile("TmpD", [filename.toString()]);
-  if (file.exists()) {
-    file.remove(true);
-  }
-};
-
-/**
  * Handles registration of new content listener browsers.  Depending on
  * their type they are either accepted or ignored.
  */
 GeckoDriver.prototype.registerBrowser = function(id, be) {
   let nullPrevious = this.curBrowser.curFrameId === null;
   let listenerWindow = Services.wm.getOuterWindowWithId(id);
 
   // go in here if we're already in a remote frame
@@ -2462,18 +2449,16 @@ GeckoDriver.prototype.sessionTearDown = 
 
   // reset frame to the top-most frame
   this.curFrame = null;
   if (this.mainFrame) {
     this.mainFrame.focus();
   }
 
   this.sessionId = null;
-  this.deleteFile("marionetteChromeScripts");
-  this.deleteFile("marionetteContentScripts");
 
   if (this.observing !== null) {
     for (let topic in this.observing) {
       Services.obs.removeObserver(this.observing[topic], topic);
     }
     this.observing = null;
   }
   this.sandboxes = {};