Backed out changeset a9eb5d014736 (missed bug #)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 09 Aug 2013 18:23:22 +0100
changeset 143515 828ab0810ea55f6d87192630f883b5253187481c
parent 143514 a9eb5d014736089cc5bfb28a7f77abcbf1b0021a
child 143516 fb365c5ad68dff263e75e7a7396e934738ae0efe
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone25.0a1
backs outa9eb5d014736089cc5bfb28a7f77abcbf1b0021a
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 a9eb5d014736 (missed bug #)
build/mobile/robocop/Actions.java.in
build/mobile/robocop/FennecNativeActions.java.in
--- a/build/mobile/robocop/Actions.java.in
+++ b/build/mobile/robocop/Actions.java.in
@@ -78,19 +78,12 @@ public interface Actions {
      * @param key The special key to send
      */
     void sendSpecialKey(SpecialKey key);
     void sendKeyCode(int keyCode);
 
     void drag(int startingX, int endingX, int startingY, int endingY);
 
     /**
-     * This is the implementation of clickLongOnScreen from Robotium 4.0 since this sometimes fails for Robotium 3.6
-     * TODO : Remove this when Robotium is updated
-     */
-
-    void clickLongOnScreen(float x, float y);
-
-    /**
      * Run a sql query on the specified database
      */
     public Cursor querySql(String dbPath, String sql);
 }
--- a/build/mobile/robocop/FennecNativeActions.java.in
+++ b/build/mobile/robocop/FennecNativeActions.java.in
@@ -17,19 +17,17 @@ import java.util.ArrayList;
 import android.app.Activity;
 import android.app.Instrumentation;
 import android.content.Context;
 import android.database.Cursor;
 import android.os.SystemClock;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.KeyEvent;
-import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewConfiguration;
 
 import com.jayway.android.robotium.solo.Solo;
 
 import static @ANDROID_PACKAGE_NAME@.FennecNativeDriver.LogLevel;
 
 public class FennecNativeActions implements Actions {
     private Solo mSolo;
     private Instrumentation mInstr;
@@ -455,51 +453,16 @@ public class FennecNativeActions impleme
     public void sendKeys(String input) {
         mInstr.sendStringSync(input);
     }
 
     public void drag(int startingX, int endingX, int startingY, int endingY) {
         mSolo.drag(startingX, endingX, startingY, endingY, 10);
     }
 
-     /**
-     * This is the implementation of clickLongOnScreen from Robotium 4.0 since this sometimes fails for Robotium 3.6
-     * TODO : Remove this when Robotium is updated
-     */
-
-    public void clickLongOnScreen(float x, float y) {
-    	boolean successfull = false;
-        int retry = 0;
-        long downTime = SystemClock.uptimeMillis();
-        long eventTime = SystemClock.uptimeMillis();
-        MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0);
-
-        while(!successfull && retry < 10) {
-            try{
-                mInstr.sendPointerSync(event);
-                successfull = true;
-            }catch(SecurityException e){
-                FennecNativeDriver.log(LogLevel.ERROR, e);
-                retry++;
-            }
-        }
-
-        mAsserter.ok(successfull, "Trying to click on long on screen at (" + x + "," + y + ")", "Was able to click long on screen");
-
-        eventTime = SystemClock.uptimeMillis();
-        event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_MOVE, x + 1.0f, y + 1.0f, 0);
-        mInstr.sendPointerSync(event);
-        mSolo.sleep(((int)(ViewConfiguration.getLongPressTimeout() * 2.5f)));
-
-        eventTime = SystemClock.uptimeMillis();
-        event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0);
-        mInstr.sendPointerSync(event);
-        mSolo.sleep(500);
-    }
-
     public Cursor querySql(String dbPath, String sql) {
         try {
             return (Cursor)mQuerySql.invoke(mRobocopApi, dbPath, sql);
         } catch(InvocationTargetException ex) {
             Log.e(LOGTAG, "Error invoking method", ex);
         } catch(IllegalAccessException ex) {
             Log.e(LOGTAG, "Error using field", ex);
         }