Bug 1253236 - Rename element.checkVisible to isVisible; r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 03 Mar 2016 14:18:52 +0000
changeset 325119 3cf253e3a840dd98b5ba0d0a4f5c6ea45241da9f
parent 325118 fd949bc0794dfbfde903e51f7babce255ee8514b
child 325120 746ba7188bcfcb4f1c4906a83e0a5eb961cbee57
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1253236
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253236 - Rename element.checkVisible to isVisible; r=automatedtester MozReview-Commit-ID: 1fkH93OXjWF
testing/marionette/element.js
testing/marionette/event.js
testing/marionette/interaction.js
testing/marionette/listener.js
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -810,17 +810,17 @@ element.inViewport = function(el, x = un
  *     Window object.
  * @param {number=} x
  *     Horizontal offset relative to target.  Defaults to the centre of
  *     the target's bounding box.
  * @param {number=} y
  *     Vertical offset relative to target.  Defaults to the centre of
  *     the target's bounding box.
  */
-element.checkVisible = function(el, win, x = undefined, y = undefined) {
+element.isVisible = function(el, win, x = undefined, y = undefined) {
   // Bug 1094246: Webdriver's isShown doesn't work with content xul
   let ns = atom.getElementAttribute(el, "namespaceURI", win);
   if (ns.indexOf("there.is.only.xul") < 0 &&
       !atom.isElementDisplayed(el, win)) {
     return false;
   }
 
   if (el.tagName.toLowerCase() == "body") {
--- a/testing/marionette/event.js
+++ b/testing/marionette/event.js
@@ -928,17 +928,17 @@ function focusElement(element) {
  * @param {Array.<string>} keySequence
  * @param {Element} element
  * @param {Object.<string, boolean>=} opts
  * @param {Window=} window
  */
 event.sendKeysToElement = function(
     keySequence, el, opts = {}, window = undefined) {
 
-  if (opts.ignoreVisibility || element.checkVisible(el, window)) {
+  if (opts.ignoreVisibility || element.isVisible(el, window)) {
     focusElement(el);
 
     // make Object.<modifier, false> map
     let modifiers = Object.create(event.Modifiers);
     for (let modifier in event.Modifiers) {
       modifiers[modifier] = false;
     }
 
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -91,17 +91,17 @@ Interactions.prototype = {
    *
    * @param ElementManager elementManager
    *
    * @param String id
    *        The DOM reference ID
    */
   clickElement(container, elementManager, id) {
     let el = elementManager.getKnownElement(id, container);
-    let visible = element.checkVisible(el, container.frame);
+    let visible = element.isVisible(el, container.frame);
     if (!visible) {
       throw new ElementNotVisibleError('Element is not visible');
     }
     return this.accessibility.getAccessibleObject(el, true).then(acc => {
       this.accessibility.checkVisible(acc, el, visible);
       if (atom.isElementEnabled(el)) {
         this.accessibility.checkEnabled(acc, el, true, container);
         this.accessibility.checkActionable(acc, el);
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -869,17 +869,17 @@ function coordinates(target, x, y) {
 }
 
 /**
  * Function that perform a single tap
  */
 function singleTap(id, corx, cory) {
   let el = elementManager.getKnownElement(id, curContainer);
   // after this block, the element will be scrolled into view
-  let visible = element.checkVisible(el, curContainer.frame, corx, cory);
+  let visible = element.isVisible(el, curContainer.frame, corx, cory);
   if (!visible) {
     throw new ElementNotVisibleError("Element is not currently visible and may not be manipulated");
   }
   return interactions.accessibility.getAccessibleObject(el, true).then(acc => {
     interactions.accessibility.checkVisible(acc, el, visible);
     interactions.accessibility.checkActionable(acc, el);
     if (!curContainer.frame.document.createTouch) {
       actions.mouseEventsOnly = true;