mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Back out b7c1e8289858 (bug 738645) because of robocop failures
This commit is contained in:
parent
9b115e5825
commit
b16cefa286
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user