Title: [256343] trunk/Tools
Revision
256343
Author
[email protected]
Date
2020-02-11 12:59:13 -0800 (Tue, 11 Feb 2020)

Log Message

KeyboardInputTests.SupportsImagePaste fails on recent versions of UIKit
https://bugs.webkit.org/show_bug.cgi?id=207557

Reviewed by Jonathan Bedard.

The exception occurs because UIKit attempts to create a QoS interval upon setting the initially selected row in
a UITableView when we focus a date picker. This fails because TestWebKitAPI isn't actually an app, so the call
to `work_interval_create` with `WORK_INTERVAL_TYPE_CA_CLIENT` as the option flag fails. For the time being, work
around this by focusing an empty select element instead (for which we won't attempt to create and select any
table view cells).

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (256342 => 256343)


--- trunk/Tools/ChangeLog	2020-02-11 20:49:03 UTC (rev 256342)
+++ trunk/Tools/ChangeLog	2020-02-11 20:59:13 UTC (rev 256343)
@@ -1,3 +1,18 @@
+2020-02-11  Wenson Hsieh  <[email protected]>
+
+        KeyboardInputTests.SupportsImagePaste fails on recent versions of UIKit
+        https://bugs.webkit.org/show_bug.cgi?id=207557
+
+        Reviewed by Jonathan Bedard.
+
+        The exception occurs because UIKit attempts to create a QoS interval upon setting the initially selected row in
+        a UITableView when we focus a date picker. This fails because TestWebKitAPI isn't actually an app, so the call
+        to `work_interval_create` with `WORK_INTERVAL_TYPE_CA_CLIENT` as the option flag fails. For the time being, work
+        around this by focusing an empty select element instead (for which we won't attempt to create and select any
+        table view cells).
+
+        * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
+
 2020-02-11  Alex Christensen  <[email protected]>
 
         Add WKHTTPCookieStore._getCookiesForURL SPI

Modified: trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm (256342 => 256343)


--- trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm	2020-02-11 20:49:03 UTC (rev 256342)
+++ trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm	2020-02-11 20:59:13 UTC (rev 256343)
@@ -607,15 +607,15 @@
 
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 568)]);
     auto contentView = (id <UITextInputPrivate>)[webView textInputContentView];
-    [webView synchronouslyLoadHTMLString:@"<input id='input'></input><div contenteditable id='editor'></div><textarea id='textarea'></textarea>"];
+    [webView synchronouslyLoadHTMLString:@"<input id='input'></input><select id='select'></select><div contenteditable id='editor'></div><textarea id='textarea'></textarea>"];
     [webView _setInputDelegate:inputDelegate.get()];
 
     [webView stringByEvaluatingJavaScript:@"input.focus()"];
     EXPECT_TRUE(contentView.supportsImagePaste);
 
-    [webView stringByEvaluatingJavaScript:@"document.activeElement.blur(); input.type = 'date'"];
+    [webView stringByEvaluatingJavaScript:@"document.activeElement.blur()"];
     [webView waitForNextPresentationUpdate];
-    [webView stringByEvaluatingJavaScript:@"input.focus()"];
+    [webView stringByEvaluatingJavaScript:@"select.focus()"];
     EXPECT_FALSE(contentView.supportsImagePaste);
 
     [webView stringByEvaluatingJavaScript:@"editor.focus()"];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to