Chromium Code Reviews| Index: base/test/test_support_ios.mm |
| diff --git a/base/test/test_support_ios.mm b/base/test/test_support_ios.mm |
| index 0d9b0379b9b84ae7871c29d674ce53aa5833861c..0b6d068745caa710056a5112163ba561b4303cf1 100644 |
| --- a/base/test/test_support_ios.mm |
| +++ b/base/test/test_support_ios.mm |
| @@ -34,6 +34,17 @@ static char** g_argv; |
| - (void) _terminateWithStatus:(int)status; |
| @end |
| +#ifdef TARGET_IPHONE_SIMULATOR |
| +// Xcode 6 introduced behavior in the iOS Simulator where the software |
| +// keyboard does not appear if a hardware keyboard is connected. The following |
| +// declaration allows this behavior to be overriden when the app starts up. |
| +@interface UIKeyboardImpl |
| ++ (instancetype)sharedInstance; |
| +- (void)setAutomaticMinimizationEnabled:(BOOL)enabled; |
| +- (void)setSoftwareKeyboardShownByTouch:(BOOL)enabled; |
| +@end |
| +#endif |
|
Paweł Hajdan Jr.
2014/08/29 09:48:29
nit: // ifdef TARGET_IPHONE_SIMULATOR
lliabraa
2014/09/02 12:46:22
Done.
|
| + |
| @interface ChromeUnitTestDelegate : NSObject { |
| @private |
| base::scoped_nsobject<UIWindow> window_; |
| @@ -46,6 +57,15 @@ static char** g_argv; |
| - (BOOL)application:(UIApplication *)application |
| didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
| +#ifdef TARGET_IPHONE_SIMULATOR |
| + // Xcode 6 introduced behavior in the iOS Simulator where the software |
| + // keyboard does not appear if a hardware keyboard is connected. The following |
| + // calls override this behavior by ensuring that the software keyboard is |
| + // always shown. |
| + [[UIKeyboardImpl sharedInstance] setAutomaticMinimizationEnabled:NO]; |
| + [[UIKeyboardImpl sharedInstance] setSoftwareKeyboardShownByTouch:YES]; |
| +#endif |
|
Paweł Hajdan Jr.
2014/08/29 09:48:29
nit: // ifdef TARGET_IPHONE_SIMULATOR
lliabraa
2014/09/02 12:46:22
Done.
|
| + |
| CGRect bounds = [[UIScreen mainScreen] bounds]; |
| // Yes, this is leaked, it's just to make what's running visible. |