diff --git a/build/mobile/robocop/FennecNativeActions.java.in b/build/mobile/robocop/FennecNativeActions.java.in index bf3b20cfc467..d96b723b92dc 100644 --- a/build/mobile/robocop/FennecNativeActions.java.in +++ b/build/mobile/robocop/FennecNativeActions.java.in @@ -147,13 +147,11 @@ public class FennecNativeActions implements Actions { class GeckoEventExpecter implements EventExpecter { private final String mGeckoEvent; private final Object[] mRegistrationParams; - private final int mDelayInNotifying; private boolean mEventReceived; - GeckoEventExpecter(String geckoEvent, Object[] registrationParams, int delayInNotifying) { + GeckoEventExpecter(String geckoEvent, Object[] registrationParams) { mGeckoEvent = geckoEvent; mRegistrationParams = registrationParams; - mDelayInNotifying = delayInNotifying; } public synchronized void blockForEvent() { @@ -165,15 +163,6 @@ public class FennecNativeActions implements Actions { break; } } - - // Delay notification to reduce the chance of random test failures - // caused by delayed processing in Fennec. - try { - Thread.sleep(mDelayInNotifying); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - FennecNativeDriver.log(FennecNativeDriver.LogLevel.LOG_LEVEL_DEBUG, "unblocked on expecter for " + mGeckoEvent); } @@ -198,13 +187,8 @@ public class FennecNativeActions implements Actions { } } } - - public EventExpecter expectGeckoEvent(String geckoEvent) { - // Default time to wait before notifying the expecters, in milliseconds. - return expectGeckoEvent(geckoEvent, 1000); - } - public EventExpecter expectGeckoEvent(String geckoEvent, int delayInNotifying) { + public EventExpecter expectGeckoEvent(String geckoEvent) { FennecNativeDriver.log(FennecNativeDriver.LogLevel.LOG_LEVEL_DEBUG, "waiting for "+geckoEvent); try { @@ -213,7 +197,7 @@ public class FennecNativeActions implements Actions { Object[] finalParams = new Object[2]; finalParams[0] = geckoEvent; - GeckoEventExpecter expecter = new GeckoEventExpecter(geckoEvent, finalParams, delayInNotifying); + GeckoEventExpecter expecter = new GeckoEventExpecter(geckoEvent, finalParams); wakeInvocationHandler wIH = new wakeInvocationHandler(expecter); Object proxy = Proxy.newProxyInstance(mClassLoader, interfaces, wIH); finalParams[1] = proxy;