mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset a9eb5d014736 (missed bug #)
This commit is contained in:
parent
0159483a5d
commit
b9e8ae6cda
@ -82,13 +82,6 @@ public interface Actions {
|
||||
|
||||
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
|
||||
*/
|
||||
|
@ -22,9 +22,7 @@ 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;
|
||||
|
||||
@ -460,41 +458,6 @@ public class FennecNativeActions implements Actions {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user