Bug 1274274 - Rename element store clear function to delete; r?automatedtester
This matches the Map data structure in JavaScript.
MozReview-Commit-ID: 5l2xOb4W2BC
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -64,17 +64,17 @@ element.Strategy = {
* may be queried by their web element reference using |get(element)|.
*/
element.Store = class {
constructor() {
this.els = {};
this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
}
- reset() {
+ clear() {
this.els = {};
}
/**
* Make a collection of elements seen.
*
* The oder of the returned web element references is guaranteed to
* match that of the collection passed in.
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -403,17 +403,17 @@ function deleteSession(msg) {
removeMessageListenerId("Marionette:getScreenshotHash", getScreenshotHashFn);
removeMessageListenerId("Marionette:addCookie", addCookieFn);
removeMessageListenerId("Marionette:getCookies", getCookiesFn);
removeMessageListenerId("Marionette:deleteAllCookies", deleteAllCookiesFn);
removeMessageListenerId("Marionette:deleteCookie", deleteCookieFn);
if (isB2G) {
content.removeEventListener("mozbrowsershowmodalprompt", modalHandler, false);
}
- seenEls.reset();
+ seenEls.clear();
// reset container frame to the top-most frame
curContainer = { frame: content, shadowRoot: null };
curContainer.frame.focus();
actions.touchIds = {};
}
/**
* Send asynchronous reply to chrome.