|
63 | 63 | static BOOL FBShouldIncludeHittableInPageSource = NO; |
64 | 64 | static BOOL FBShouldIncludeNativeFrameInPageSource = NO; |
65 | 65 | static BOOL FBShouldIncludeMinMaxValueInPageSource = NO; |
| 66 | +static BOOL FBShouldEnforceCustomSnapshots = NO; |
66 | 67 |
|
67 | 68 | @implementation FBConfiguration |
68 | 69 |
|
@@ -153,7 +154,7 @@ + (NSInteger)mjpegServerPort |
153 | 154 | if (self.mjpegServerPortFromArguments != NSNotFound) { |
154 | 155 | return self.mjpegServerPortFromArguments; |
155 | 156 | } |
156 | | - |
| 157 | + |
157 | 158 | if (NSProcessInfo.processInfo.environment[@"MJPEG_SERVER_PORT"] && |
158 | 159 | [NSProcessInfo.processInfo.environment[@"MJPEG_SERVER_PORT"] length] > 0) { |
159 | 160 | return [NSProcessInfo.processInfo.environment[@"MJPEG_SERVER_PORT"] integerValue]; |
@@ -235,7 +236,7 @@ + (NSUInteger)maxTypingFrequency |
235 | 236 | if (nil == FBMaxTypingFrequency) { |
236 | 237 | return [self defaultTypingFrequency]; |
237 | 238 | } |
238 | | - return FBMaxTypingFrequency.integerValue <= 0 |
| 239 | + return FBMaxTypingFrequency.integerValue <= 0 |
239 | 240 | ? [self defaultTypingFrequency] |
240 | 241 | : FBMaxTypingFrequency.integerValue; |
241 | 242 | } |
@@ -686,4 +687,14 @@ + (BOOL)includeMinMaxValueInPageSource |
686 | 687 | return FBShouldIncludeMinMaxValueInPageSource; |
687 | 688 | } |
688 | 689 |
|
| 690 | ++ (void)setEnforceCustomSnapshots:(BOOL)enabled |
| 691 | +{ |
| 692 | + FBShouldEnforceCustomSnapshots = enabled; |
| 693 | +} |
| 694 | + |
| 695 | ++ (BOOL)enforceCustomSnapshots |
| 696 | +{ |
| 697 | + return FBShouldEnforceCustomSnapshots; |
| 698 | +} |
| 699 | + |
689 | 700 | @end |
0 commit comments