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:
Marc Horowitz
2017-04-19 16:53:44 -07:00
committed by Facebook Github Bot
parent 3122328023
commit 325228d6cf
8 changed files with 31 additions and 69 deletions

View File

@@ -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) {