Bug 190777 - [iOS] [Datalist] fast/forms/datalist/datalist-show-hide.html fails
Summary: [iOS] [Datalist] fast/forms/datalist/datalist-show-hide.html fails
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-21 00:35 PDT by Wenson Hsieh
Modified: 2018-10-22 13:12 PDT (History)
7 users (show)

See Also:


Attachments
Patch (10.51 KB, patch)
2018-10-21 01:11 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix DRT build (11.02 KB, patch)
2018-10-21 03:11 PDT, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (11.14 KB, patch)
2018-10-22 12:35 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>