Backed out changeset b5a88815b3a6 (bug 1396951)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 22 Sep 2017 11:48:25 +0200
changeset 433150 ee9bdc65d7720dedf6e284ab36d76817c6c88211
parent 433149 d464f77195576407e0e77b9fe48981af154abbd7
child 433151 866ee4c0900f538827535cf97070530e499878c8
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1396951
milestone58.0a1
backs outb5a88815b3a6316615c424a8fbb3e292e159e6a0
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
Backed out changeset b5a88815b3a6 (bug 1396951) MozReview-Commit-ID: H7q7JLdOCQS
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java
@@ -351,17 +351,17 @@ public class FennecNativeActions impleme
         private boolean mPaintDone;
         private boolean mListening;
 
         private final LayerView mLayerView;
         private final DrawListener mDrawListener;
 
         PaintExpecter() {
             final PaintExpecter expecter = this;
-            mLayerView = (LayerView) mSolo.getView(R.id.layer_view);
+            mLayerView = GeckoAppShell.getLayerView();
             mDrawListener = new DrawListener() {
                 @Override
                 public void drawFinished() {
                     FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG,
                             "Received drawFinished notification");
                     expecter.notifyOfEvent();
                 }
             };
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java
@@ -351,18 +351,17 @@ abstract class BaseTest extends BaseRobo
         if (!foundText) {
             if ((mScreenMidWidth == 0) || (mScreenMidHeight == 0)) {
                 mScreenMidWidth = mDriver.getGeckoWidth()/2;
                 mScreenMidHeight = mDriver.getGeckoHeight()/2;
             }
 
             // If we don't see the item, scroll down once in case it's off-screen.
             // Hacky way to scroll down.  solo.scroll* does not work in dialogs.
-            MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo,
-                                                          mDriver.getGeckoLeft(), mDriver.getGeckoTop());
+            MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
             meh.dragSync(mScreenMidWidth, mScreenMidHeight+100, mScreenMidWidth, mScreenMidHeight-100);
 
             foundText = mSolo.waitForText(txt);
         }
         return foundText;
     }
 
     /**
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java
@@ -1,20 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.tests;
 
 import org.mozilla.gecko.GeckoAppShell;
+import org.mozilla.gecko.gfx.LayerView;
 import org.mozilla.gecko.PrefsHelper;
-import org.mozilla.gecko.R;
-import org.mozilla.gecko.gfx.LayerView;
-
-import com.robotium.solo.Solo;
 
 import android.app.Instrumentation;
 import android.os.SystemClock;
 import android.util.Log;
 import android.view.MotionEvent;
 
 class MotionEventHelper {
     private static final String LOGTAG = "RobocopMotionEventHelper";
@@ -24,22 +21,21 @@ class MotionEventHelper {
     private final Instrumentation mInstrumentation;
     private final int mSurfaceOffsetX;
     private final int mSurfaceOffsetY;
     private final LayerView layerView;
     private boolean mApzEnabled;
     private float mTouchStartTolerance;
     private final int mDpi;
 
-    public MotionEventHelper(Instrumentation inst, Solo solo,
-                             int surfaceOffsetX, int surfaceOffsetY) {
+    public MotionEventHelper(Instrumentation inst, int surfaceOffsetX, int surfaceOffsetY) {
         mInstrumentation = inst;
         mSurfaceOffsetX = surfaceOffsetX;
         mSurfaceOffsetY = surfaceOffsetY;
-        layerView = (LayerView) solo.getView(R.id.layer_view);
+        layerView = GeckoAppShell.getLayerView();
         mApzEnabled = false;
         mTouchStartTolerance = 0.0f;
         mDpi = GeckoAppShell.getDpi();
         Log.i(LOGTAG, "Initialized using offset (" + mSurfaceOffsetX + "," + mSurfaceOffsetY + ")");
         PrefsHelper.getPref("layers.async-pan-zoom.enabled", new PrefsHelper.PrefHandlerBase() {
             @Override public void prefValue(String pref, boolean value) {
                 mApzEnabled = value;
             }
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java
@@ -14,18 +14,17 @@ import org.mozilla.gecko.PaintedSurface;
  * - Verify that the 5-degree angle was thrown out and it dragged vertically
  * - Drag page upwards at a 45-degree angle
  * - Verify that the 45-degree angle was not thrown out and it dragged diagonally
  */
 public class testAxisLocking extends PixelTest {
     public void testAxisLocking() {
         String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL);
 
-        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo,
-                                                      mDriver.getGeckoLeft(), mDriver.getGeckoTop());
+        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
         blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page upwards by 100 pixels with a slight angle. verify that
         // axis locking prevents any horizontal scrolling
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java
@@ -12,18 +12,17 @@ import org.mozilla.gecko.PaintedSurface;
  * - Loads a page and verifies it draws
  * - Drags page upwards by 200 pixels to get ready for a fling
  * - Fling the page downwards so we get back to the top and verify.
  */
 public class testFlingCorrectness extends PixelTest {
     public void testFlingCorrectness() {
         String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL);
 
-        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo,
-                                                      mDriver.getGeckoLeft(), mDriver.getGeckoTop());
+        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
         blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page upwards by 200 pixels (use two drags instead of one in case
         // the screen size is small)
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java
@@ -12,18 +12,17 @@ import org.mozilla.gecko.PaintedSurface;
  * - Loads a page and verifies it draws
  * - drags page upwards by 100 pixels and verifies it draws
  * - drags page leftwards by 100 pixels and verifies it draws
  */
 public class testPanCorrectness extends PixelTest {
     public void testPanCorrectness() {
         String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL);
 
-        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo,
-                                                      mDriver.getGeckoLeft(), mDriver.getGeckoTop());
+        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
 
         blockForGeckoReady();
 
         // load page and check we're at 0,0
         loadAndVerifyBoxes(url);
 
         // drag page upwards by 100 pixels
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java
@@ -24,18 +24,17 @@ public class testVkbOverlap extends Pixe
         testSetup("", "phone".equals(mDevice.type));
     }
 
     private void testSetup(String viewport, boolean shouldZoom) {
         loadAndPaint(getAbsoluteUrl("/robocop/test_viewport.sjs?metadata=" + Uri.encode(viewport)));
 
         // scroll to the bottom of the page and let it settle
         Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
-        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo,
-                                                      mDriver.getGeckoLeft(), mDriver.getGeckoTop());
+        MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
         meh.dragSync(10, 150, 10, 50);
 
         // the input field has a green background, so let's count the number of green pixels
         int greenPixelCount = 0;
 
         PaintedSurface painted = waitForPaint(paintExpecter);
         paintExpecter.unregisterListener();
         try {