mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 09:21:44 +08:00
Fix lost callbacks due to time drift between server and emulator
Reviewed By: yungsters Differential Revision: D3434921 fbshipit-source-id: ec82374a8ed322d99beadac78a415f952ceb3ec8
This commit is contained in:
committed by
Facebook Github Bot 0
parent
f236667a17
commit
12a87b6674
@@ -6,6 +6,7 @@ robolectric3_test(
|
||||
name = 'modules',
|
||||
srcs = glob(['**/*.java']),
|
||||
deps = [
|
||||
react_native_dep('java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/devsupport:devsupport'),
|
||||
react_native_dep('libraries/fbcore/src/test/java/com/facebook/powermock:powermock'),
|
||||
react_native_dep('third-party/java/fest:fest'),
|
||||
react_native_dep('third-party/java/junit:junit'),
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.facebook.react.bridge.ExecutorToken;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.CatalystInstance;
|
||||
import com.facebook.react.bridge.JavaOnlyArray;
|
||||
import com.facebook.react.devsupport.DevSupportManager;
|
||||
import com.facebook.react.uimanager.ReactChoreographer;
|
||||
import com.facebook.react.common.SystemClock;
|
||||
import com.facebook.react.modules.core.JSTimersExecution;
|
||||
@@ -92,7 +93,7 @@ public class TimingModuleTest {
|
||||
eq(ReactChoreographer.CallbackType.TIMERS_EVENTS),
|
||||
any(Choreographer.FrameCallback.class));
|
||||
|
||||
mTiming = new Timing(reactContext);
|
||||
mTiming = new Timing(reactContext, mock(DevSupportManager.class));
|
||||
mJSTimersMock = mock(JSTimersExecution.class);
|
||||
mExecutorTokenMock = mock(ExecutorToken.class);
|
||||
when(reactContext.getJSModule(mExecutorTokenMock, JSTimersExecution.class)).thenReturn(mJSTimersMock);
|
||||
|
||||
Reference in New Issue
Block a user