Bug 190777

Summary: [iOS] [Datalist] fast/forms/datalist/datalist-show-hide.html fails
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: Tools / TestsAssignee: Wenson Hsieh <wenson_hsieh>
Status: NEW ---    
Severity: Normal CC: bdakin, commit-queue, lforschler, pxlcoder, thorton, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Fix DRT build
thorton: review+
Patch for landing none

Description Wenson Hsieh 2018-10-21 00:35:50 PDT
fast/forms/datalist/datalist-show-hide.html fails with a text diff:

@@ -1,8 +1,9 @@
 CLICK
-PASS showingList is "true"
+FAIL showingList should be true. Was false.
 BLUR
 PASS showingList is "false"
 PASS successfullyParsed is true
+Some tests failed.
Comment 1 Wenson Hsieh 2018-10-21 00:39:37 PDT
I think this was intended to test that the datalist suggestions menu can be presented and hidden. This test works on macOS by clicking to focus and then blurring the field; we could also make it test iOS by implementing UIScriptController::isShowingDataListSuggestions and also tweaking the test to switch between datalist suggestions and the regular keyboard by tapping on different parts of the datalist input.
Comment 2 Wenson Hsieh 2018-10-21 01:11:51 PDT
Created attachment 352864 [details]
Patch
Comment 3 Wenson Hsieh 2018-10-21 03:11:11 PDT
Created attachment 352867 [details]
Fix DRT build
Comment 4 Radar WebKit Bug Importer 2018-10-22 10:06:56 PDT
<rdar://problem/45456361>
Comment 5 Tim Horton 2018-10-22 11:53:33 PDT
Comment on attachment 352867 [details]
Fix DRT build

View in context: https://bugs.webkit.org/attachment.cgi?id=352867&action=review

> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:806
> +        if ([NSStringFromClass(window.class) isEqualToString:@"UIRemoteKeyboardWindow"])

Feels weird that this is a string compare instead of a class compare (store NSClassFromString("UIRemoteKeyboardWindow") at the top of the function and compare against that). But it also does not matter at all.
Comment 6 Wenson Hsieh 2018-10-22 12:19:22 PDT
Comment on attachment 352867 [details]
Fix DRT build

View in context: https://bugs.webkit.org/attachment.cgi?id=352867&action=review

>> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:806
>> +        if ([NSStringFromClass(window.class) isEqualToString:@"UIRemoteKeyboardWindow"])
> 
> Feels weird that this is a string compare instead of a class compare (store NSClassFromString("UIRemoteKeyboardWindow") at the top of the function and compare against that). But it also does not matter at all.

Good call — changed to check -isKindOfClass: instead.
Comment 7 Wenson Hsieh 2018-10-22 12:35:22 PDT
Created attachment 352900 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2018-10-22 13:12:15 PDT
Comment on attachment 352900 [details]
Patch for landing

Clearing flags on attachment: 352900

Committed r237328: <https://trac.webkit.org/changeset/237328>