Bug 1670175 - [marionette] Use webEl as argument in MarionetteFrameParent. r=marionette-reviewers,maja_zf
authorHenrik Skupin <mail@hskupin.info>
Thu, 22 Oct 2020 14:52:27 +0000
changeset 554087 dafa26b89edacc8d9fb9eade704d7124ba5239cf
parent 554086 4262fb4acb1b61bf805a1955cf1e30c879be98c1
child 554088 bfe528d1778b56592dc5174a26b0bcb412dee862
child 554184 7e2acd77c07fc53754dbc685f3323e9055b82060
push id129220
push userhskupin@mozilla.com
push dateThu, 22 Oct 2020 15:28:05 +0000
treeherderautoland@dafa26b89eda [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarionette-reviewers, maja_zf
bugs1670175
milestone84.0a1
first release with
nightly linux32
dafa26b89eda / 84.0a1 / 20201022215159 / files
nightly linux64
dafa26b89eda / 84.0a1 / 20201022215159 / files
nightly mac
dafa26b89eda / 84.0a1 / 20201022215159 / files
nightly win32
dafa26b89eda / 84.0a1 / 20201022215159 / files
nightly win64
dafa26b89eda / 84.0a1 / 20201022215159 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1670175 - [marionette] Use webEl as argument in MarionetteFrameParent. r=marionette-reviewers,maja_zf Element references in the parent process are always WebElements. As such rename element arguments of the parent actor methods, but still pass them as elements to the child actor. Differential Revision: https://phabricator.services.mozilla.com/D94438
testing/marionette/actors/MarionetteFrameParent.jsm
--- a/testing/marionette/actors/MarionetteFrameParent.jsm
+++ b/testing/marionette/actors/MarionetteFrameParent.jsm
@@ -91,23 +91,25 @@ class MarionetteFrameParent extends JSWi
 
   cleanUp() {
     elementIdCache.clear();
   }
 
   // Proxying methods for WebDriver commands
   // TODO: Maybe using a proxy class instead similar to proxy.js
 
-  clearElement(elem) {
-    return this.sendQuery("MarionetteFrameParent:clearElement", { elem });
+  clearElement(webEl) {
+    return this.sendQuery("MarionetteFrameParent:clearElement", {
+      elem: webEl,
+    });
   }
 
-  clickElement(elem, capabilities) {
+  clickElement(webEl, capabilities) {
     return this.sendQuery("MarionetteFrameParent:clickElement", {
-      elem,
+      elem: webEl,
       capabilities,
     });
   }
 
   async executeScript(script, args, opts) {
     return this.sendQuery("MarionetteFrameParent:executeScript", {
       script,
       args,
@@ -134,100 +136,106 @@ class MarionetteFrameParent extends JSWi
   async getActiveElement() {
     return this.sendQuery("MarionetteFrameParent:getActiveElement");
   }
 
   async getCurrentUrl() {
     return this.sendQuery("MarionetteFrameParent:getCurrentUrl");
   }
 
-  async getElementAttribute(elem, name) {
+  async getElementAttribute(webEl, name) {
     return this.sendQuery("MarionetteFrameParent:getElementAttribute", {
-      elem,
+      elem: webEl,
       name,
     });
   }
 
-  async getElementProperty(elem, name) {
+  async getElementProperty(webEl, name) {
     return this.sendQuery("MarionetteFrameParent:getElementProperty", {
-      elem,
+      elem: webEl,
       name,
     });
   }
 
-  async getElementRect(elem) {
-    return this.sendQuery("MarionetteFrameParent:getElementRect", { elem });
+  async getElementRect(webEl) {
+    return this.sendQuery("MarionetteFrameParent:getElementRect", {
+      elem: webEl,
+    });
   }
 
-  async getElementTagName(elem) {
-    return this.sendQuery("MarionetteFrameParent:getElementTagName", { elem });
+  async getElementTagName(webEl) {
+    return this.sendQuery("MarionetteFrameParent:getElementTagName", {
+      elem: webEl,
+    });
   }
 
-  async getElementText(elem) {
-    return this.sendQuery("MarionetteFrameParent:getElementText", { elem });
+  async getElementText(webEl) {
+    return this.sendQuery("MarionetteFrameParent:getElementText", {
+      elem: webEl,
+    });
   }
 
-  async getElementValueOfCssProperty(elem, name) {
+  async getElementValueOfCssProperty(webEl, name) {
     return this.sendQuery(
       "MarionetteFrameParent:getElementValueOfCssProperty",
       {
-        elem,
+        elem: webEl,
         name,
       }
     );
   }
 
   async getPageSource() {
     return this.sendQuery("MarionetteFrameParent:getPageSource");
   }
 
-  async isElementDisplayed(elem, capabilities) {
+  async isElementDisplayed(webEl, capabilities) {
     return this.sendQuery("MarionetteFrameParent:isElementDisplayed", {
       capabilities,
-      elem,
+      elem: webEl,
     });
   }
 
-  async isElementEnabled(elem, capabilities) {
+  async isElementEnabled(webEl, capabilities) {
     return this.sendQuery("MarionetteFrameParent:isElementEnabled", {
       capabilities,
-      elem,
+      elem: webEl,
     });
   }
 
-  async isElementSelected(elem, capabilities) {
+  async isElementSelected(webEl, capabilities) {
     return this.sendQuery("MarionetteFrameParent:isElementSelected", {
       capabilities,
-      elem,
+      elem: webEl,
     });
   }
 
-  async sendKeysToElement(elem, text, capabilities) {
+  async sendKeysToElement(webEl, text, capabilities) {
     return this.sendQuery("MarionetteFrameParent:sendKeysToElement", {
       capabilities,
-      elem,
+      elem: webEl,
       text,
     });
   }
 
   async performActions(actions, capabilities) {
     return this.sendQuery("MarionetteFrameParent:performActions", {
       actions,
       capabilities,
     });
   }
 
   async releaseActions() {
     return this.sendQuery("MarionetteFrameParent:releaseActions");
   }
 
-  async singleTap(elem, x, y, capabilities) {
+  async singleTap(webEl, x, y, capabilities) {
     return this.sendQuery("MarionetteFrameParent:singleTap", {
       capabilities,
-      elem,
+      elem: webEl,
       x,
       y,
     });
   }
 
   async switchToFrame(id) {
     const {
       browsingContextId,
@@ -243,29 +251,29 @@ class MarionetteFrameParent extends JSWi
       "MarionetteFrameParent:switchToParentFrame"
     );
 
     return {
       browsingContext: BrowsingContext.get(browsingContextId),
     };
   }
 
-  async takeScreenshot(elem, format, full, scroll) {
+  async takeScreenshot(webEl, format, full, scroll) {
     const rect = await this.sendQuery(
       "MarionetteFrameParent:getScreenshotRect",
       {
-        elem,
+        elem: webEl,
         full,
         scroll,
       }
     );
 
     // If no element has been specified use the top-level browsing context.
     // Otherwise use the browsing context from the currently selected frame.
-    const browsingContext = elem
+    const browsingContext = webEl
       ? this.browsingContext
       : this.browsingContext.top;
 
     let canvas = await capture.canvas(
       browsingContext.topChromeWindow,
       browsingContext,
       rect.x,
       rect.y,