Bug 1274274 - Rename element store clear function to delete; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 20 May 2016 16:54:42 +0100
changeset 370724 2bce063962801f3a7ccb3d6ffcfc45f0ee0ecdca
parent 370723 6bb733848672c52b84fac55aa06cc7c6ec2d31bc
child 521819 b13421ed7df27a5cb6081255bf3d2c9c71eab484
push id19137
push userbmo:ato@mozilla.com
push dateWed, 25 May 2016 09:03:54 +0000
reviewersautomatedtester
bugs1274274
milestone49.0a1
Bug 1274274 - Rename element store clear function to delete; r?automatedtester This matches the Map data structure in JavaScript. MozReview-Commit-ID: 5l2xOb4W2BC
testing/marionette/element.js
testing/marionette/listener.js
--- 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.