Bug 196265 - Add basic layout test coverage for File Picker on iOS
Summary: Add basic layout test coverage for File Picker on iOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 196405
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-26 12:19 PDT by Chris Dumez
Modified: 2020-06-17 15:08 PDT (History)
6 users (show)

See Also:


Attachments
Patch (20.68 KB, patch)
2019-03-26 12:21 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.69 KB, patch)
2019-03-26 12:49 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.78 KB, patch)
2019-03-26 14:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-03-26 12:19:43 PDT
Add basic layout test coverage for File Picker on iOS.
Comment 1 Chris Dumez 2019-03-26 12:21:42 PDT
Created attachment 365984 [details]
Patch
Comment 2 Chris Dumez 2019-03-26 12:49:42 PDT
Created attachment 365989 [details]
Patch
Comment 3 Wenson Hsieh 2019-03-26 14:31:33 PDT
Comment on attachment 365989 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:7018
> +        auto* result = @{ userInterfaceItem: [_fileUploadPanel currentAvailableActionTitles] };

Nit - would be cleaner just to return @{ ~ }

> Tools/WebKitTestRunner/ios/TestControllerIOS.mm:53
> +static void overridePresentViewController()

Nit - maybe overridePresentViewControllerOrPopover, since it's used for both purposes?

> LayoutTests/fast/forms/ios/file-upload-panel.html:62
> +        UIHelper.activateElement(testInput).then(() => {
> +            getFileUploadPickerMenuItems().then((_items) => {
> +                items = _items;
> +                shouldBeTrue("areArraysEqual(items, " + expectedMenuItems + ")");
> +                debug("");
> +                dismissFilePicker().then(() => { resolve(); });
> +            });
> +        });

Nit - IMO this function could be made cleaner using async - await, but either way it's fine.
Comment 4 Chris Dumez 2019-03-26 14:40:30 PDT
Created attachment 365999 [details]
Patch
Comment 5 Chris Dumez 2019-03-26 16:24:40 PDT
Comment on attachment 365999 [details]
Patch

Clearing flags on attachment: 365999

Committed r243523: <https://trac.webkit.org/changeset/243523>
Comment 6 Chris Dumez 2019-03-26 16:24:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-03-26 16:25:18 PDT
<rdar://problem/49299305>