Bug 1274274 - Rename element store clear function to delete; r=automatedtester a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 20 May 2016 16:54:42 +0100
changeset 333263 3f4ba9dccbd7d1f1a28e213985f6408adf92e498
parent 333262 4581f4f403ce437151b36e91044cfb64beeeb69f
child 333264 3d44cc6e4fb9a423472e0722b20a18053f1298c8
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1274274
milestone48.0a2
Bug 1274274 - Rename element store clear function to delete; r=automatedtester a=test-only 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.