mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-07 02:08:34 +08:00
Remove RCTBatchedBridge rule and all uses from the tree
Reviewed By: AaaChiuuu, javache Differential Revision: D4889438 fbshipit-source-id: ba103ace8802f0976e09af6b491442e9aa723f49
This commit is contained in:
committed by
Facebook Github Bot
parent
3122328023
commit
325228d6cf
@@ -14,9 +14,22 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import <React/RCTBridge+JavaScriptCore.h>
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTDevMenu.h>
|
||||
|
||||
#define RUN_RUNLOOP_WHILE(CONDITION) \
|
||||
{ \
|
||||
NSDate *timeout = [NSDate dateWithTimeIntervalSinceNow:5]; \
|
||||
while ((CONDITION)) { \
|
||||
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; \
|
||||
if ([timeout timeIntervalSinceNow] <= 0) { \
|
||||
XCTFail(@"Runloop timed out before condition was met"); \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
typedef void(^RCTDevMenuAlertActionHandler)(UIAlertAction *action);
|
||||
|
||||
@interface RCTDevMenu ()
|
||||
@@ -42,6 +55,8 @@ typedef void(^RCTDevMenuAlertActionHandler)(UIAlertAction *action);
|
||||
_bridge = [[RCTBridge alloc] initWithBundleURL:[bundle URLForResource:@"UIExplorerUnitTestsBundle" withExtension:@"js"]
|
||||
moduleProvider:nil
|
||||
launchOptions:nil];
|
||||
|
||||
RUN_RUNLOOP_WHILE(_bridge.isLoading);
|
||||
}
|
||||
|
||||
- (void)testShowCreatingActionSheet
|
||||
@@ -51,7 +66,6 @@ typedef void(^RCTDevMenuAlertActionHandler)(UIAlertAction *action);
|
||||
XCTAssertTrue([_bridge.devMenu isActionSheetShown]);
|
||||
}
|
||||
|
||||
|
||||
- (void)testClosingActionSheetAfterAction
|
||||
{
|
||||
for (RCTDevMenuItem *item in _bridge.devMenu.presentedItems) {
|
||||
|
||||
Reference in New Issue
Block a user