Changeset 236751 in webkit
- Timestamp:
- Oct 2, 2018 10:49:41 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r236750 r236751 1 2018-10-02 Daniel Bates <dabates@apple.com> 2 3 Fix iOS TestWebKitAPI failures following <https://trac.webkit.org/changeset/236619> 4 (https://bugs.webkit.org/show_bug.cgi?id=190017) 5 6 For now swizzle +[UIKeyboard isInHardwareKeyboardMode] to return NO in the following tests: 7 WKWebViewAutofillTests.AutofillRequiresInputSession 8 DragAndDropTests.ExternalSourceJPEGOnly 9 DragAndDropTests.ExternalSourceUTF8PlainTextOnly 10 11 so that the presence of a hardware keyboad does not effect their results. In <https://bugs.webkit.org/show_bug.cgi?id=190211> 12 we will look to swizzle this method for all test by default. 13 14 * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: 15 (TestWebKitAPI::overrideIsInHardwareKeyboardMode): 16 (TestWebKitAPI::TEST): 17 * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: 18 (TestWebKitAPI::overrideIsInHardwareKeyboardMode): 19 (TestWebKitAPI::TEST): 20 * TestWebKitAPI/ios/UIKitSPI.h: 21 1 22 2018-10-01 Dean Jackson <dino@apple.com> 2 23 -
trunk/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
r235835 r236751 28 28 #if ENABLE(DRAG_SUPPORT) && PLATFORM(IOS) && WK_API_ENABLED 29 29 30 #import "ClassMethodSwizzler.h" 30 31 #import "DragAndDropSimulator.h" 31 32 #import "PlatformUtilities.h" … … 908 909 } 909 910 911 static BOOL overrideIsInHardwareKeyboardMode() 912 { 913 return NO; 914 } 915 910 916 TEST(DragAndDropTests, ExternalSourceUTF8PlainTextOnly) 911 917 { 918 ClassMethodSwizzler swizzler([UIKeyboard class], @selector(isInHardwareKeyboardMode), reinterpret_cast<IMP>(overrideIsInHardwareKeyboardMode)); 919 912 920 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]); 913 921 [webView synchronouslyLoadTestPageNamed:@"autofocus-contenteditable"]; … … 929 937 TEST(DragAndDropTests, ExternalSourceJPEGOnly) 930 938 { 939 ClassMethodSwizzler swizzler([UIKeyboard class], @selector(isInHardwareKeyboardMode), reinterpret_cast<IMP>(overrideIsInHardwareKeyboardMode)); 940 931 941 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]); 932 942 [webView synchronouslyLoadTestPageNamed:@"autofocus-contenteditable"]; -
trunk/Tools/TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm
r234504 r236751 28 28 #if WK_API_ENABLED && PLATFORM(IOS) 29 29 30 #import "ClassMethodSwizzler.h" 30 31 #import "PlatformUtilities.h" 31 32 #import "TestInputDelegate.h" … … 165 166 } 166 167 168 static BOOL overrideIsInHardwareKeyboardMode() 169 { 170 return NO; 171 } 172 167 173 TEST(WKWebViewAutofillTests, AutofillRequiresInputSession) 168 174 { 175 ClassMethodSwizzler swizzler([UIKeyboard class], @selector(isInHardwareKeyboardMode), reinterpret_cast<IMP>(overrideIsInHardwareKeyboardMode)); 176 169 177 auto webView = adoptNS([[AutofillTestView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]); 170 178 [(TestInputDelegate *)[webView _inputDelegate] setFocusStartsInputSessionPolicyHandler:[] (WKWebView *, id <_WKFocusedElementInfo>) -> _WKFocusStartsInputSessionPolicy { -
trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h
r235878 r236751 31 31 32 32 #import <UIKit/UIApplication_Private.h> 33 #import <UIKit/UIKeyboard_Private.h> 33 34 #import <UIKit/UIResponder_Private.h> 34 35 #import <UIKit/UITextInputMultiDocument.h> … … 161 162 @end 162 163 164 @interface UIKeyboard () 165 + (BOOL)isInHardwareKeyboardMode; 166 @end 167 163 168 #endif // PLATFORM(IOS)
Note: See TracChangeset
for help on using the changeset viewer.