Bug 1257523 - Remove GeckoDriver#deleteFile; r?automatedtester
MozReview-Commit-ID: 7kOZ5hVC5He
--- 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 = {};