Bug 174803 - Web Automation: files selected for upload should be checked against values of the 'accept' attribute
Summary: Web Automation: files selected for upload should be checked against values of...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on: 174797
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-24 16:34 PDT by BJ Burg
Modified: 2017-08-02 11:35 PDT (History)
7 users (show)

See Also:


Attachments
Proposed Fix (6.24 KB, patch)
2017-08-01 16:55 PDT, BJ Burg
no flags Details | Formatted Diff | Diff
Proposed Fix (5.79 KB, patch)
2017-08-01 16:56 PDT, BJ Burg
cgarcia: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-elcapitan (2.08 MB, application/zip)
2017-08-02 09:59 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-07-24 16:34:26 PDT
placeholder text.
Comment 1 Radar WebKit Bug Importer 2017-07-25 09:46:46 PDT
<rdar://problem/33514190>
Comment 2 BJ Burg 2017-08-01 16:55:15 PDT
Created attachment 316913 [details]
Proposed Fix
Comment 3 BJ Burg 2017-08-01 16:56:58 PDT
Created attachment 316914 [details]
Proposed Fix
Comment 4 Carlos Garcia Campos 2017-08-02 08:06:12 PDT
Comment on attachment 316914 [details]
Proposed Fix

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

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:559
> +        if (!allowedMIMETypes.size())
> +            continue;

Nit: I usually prefer isEmpty()

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:579
> +            filesAreValid = false;
> +            break;

I think this would be easier if we moved this loop into a function, then you could just return false instead of filesAreValid = false + break;
Comment 5 Build Bot 2017-08-02 09:58:58 PDT
Comment on attachment 316914 [details]
Proposed Fix

Attachment 316914 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4240379

New failing tests:
fast/dom/StyleSheet/detached-sheet-owner-node-link.html
Comment 6 Build Bot 2017-08-02 09:59:00 PDT
Created attachment 316968 [details]
Archive of layout-test-results from ews117 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 7 BJ Burg 2017-08-02 11:35:29 PDT
Committed r220147: <http://trac.webkit.org/changeset/220147>