Bug 1317386 - Check pointer interactability upon interaction. r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 14 Nov 2016 21:07:42 +0000
changeset 352567 6393e7ca57ddd882d0571db28670feec4c7ceef6
parent 352566 154f73dc04075a8c7e9aed62ac39670669b448a9
child 352568 aa77464b82d3243ce526dcaf3af7101aefbe1d9c
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1317386
milestone52.0a2
Bug 1317386 - Check pointer interactability upon interaction. r=automatedtester, a=test-only Checking for general interactability will also consider keyboard interactability, which has not yet been implemented. On interacting with an element by clicking, we should only test for pointer interactability. MozReview-Commit-ID: BUCs7zHppRm
testing/marionette/interaction.js
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -117,20 +117,20 @@ interaction.clickElement = function*(el,
 
   let visibilityCheckEl  = el;
   if (el.localName == "option") {
     visibilityCheckEl = interaction.getSelectForOptionElement(el);
   }
 
   let interactable = false;
   if (specCompat) {
-    if (!element.isInteractable(visibilityCheckEl)) {
-      el.scrollIntoView(false);
+    if (!element.isPointerInteractable(visibilityCheckEl)) {
+      element.scrollIntoView(el);
     }
-    interactable = element.isInteractable(visibilityCheckEl);
+    interactable = element.isPointerInteractable(visibilityCheckEl);
   } else {
     interactable = element.isVisible(visibilityCheckEl);
   }
   if (!interactable) {
     throw new ElementNotVisibleError();
   }
 
   if (!atom.isElementEnabled(el)) {