Bug 206517 - [WebKitTestRunner] setOpenPanelFiles support in non-local tests
Summary: [WebKitTestRunner] setOpenPanelFiles support in non-local tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lauro Moura
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-20 20:30 PST by Lauro Moura
Modified: 2020-02-03 13:55 PST (History)
5 users (show)

See Also:


Attachments
Tentative patch (1.82 KB, patch)
2020-01-20 20:42 PST, Lauro Moura
no flags Details | Formatted Diff | Diff
Patch (3.88 KB, patch)
2020-01-30 14:02 PST, Lauro Moura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-01-20 20:30:16 PST
`TestRunner::setOpenPanelFiles` always uses `m_testURL' as base URL for the files it will provide to the given form.

While this this works nice for tests using `file://`, this breaks tests using remote URLs, as a resulting URL like `http://127.0.0.1:8000/misc/foo.txt` would fail to be converted to a local file with the default implementation of `WTF::URL::fileSystemPath`. The mac port seems to work around this with CF's implementation of this method.

Example of test failing in webkitgtk due to this:
  * http/tests/misc/form-submit-file-cross-site-redirect.html
Comment 1 Lauro Moura 2020-01-20 20:42:57 PST
Created attachment 388276 [details]
Tentative patch

Tentative patch by treating paths passed to setOpenPanelFiles with leading slash as absolute file:// paths.
Comment 2 Lauro Moura 2020-01-21 06:01:29 PST
EWS failures:

* win: fast/xmlhttprequest/xmlhttprequest-multiple-sync-xhr-during-unload.html
  * Flaky, failing from time to time with unrelated patches
  * https://ews-build.webkit.org/#/builders/10
* mac-wk2: inspector/heap/getRemoteObject.html
  * Ditto
  * https://ews-build.webkit.org/#/builders/31
* api-ios: KeyboardInputTests.SupportsImagePaste
  * Ditto
  * https://ews-build.webkit.org/#/builders/9
* api-mac: WebAuthenticationPanel.PanelHidCtapNoCredentialsFound
  * Ditto
  * https://ews-build.webkit.org/#/builders/3
Comment 3 Lauro Moura 2020-01-21 06:10:46 PST
cc'ing Andy and Tim (original author and reviewer) for review.
Comment 4 Carlos Alberto Lopez Perez 2020-01-30 04:28:21 PST
Comment on attachment 388276 [details]
Tentative patch

Does this patch fixes any test? Then I think this patch should also unlist the failures it fixes from the TestExpectation
Comment 5 Lauro Moura 2020-01-30 14:02:35 PST
Created attachment 389284 [details]
Patch
Comment 6 Lauro Moura 2020-01-30 14:04:28 PST
(In reply to Carlos Alberto Lopez Perez from comment #4)
> Comment on attachment 388276 [details]
> Tentative patch
> 
> Does this patch fixes any test? Then I think this patch should also unlist
> the failures it fixes from the TestExpectation

Right, updated with the new expectations. The redirect test is still failing despite loading the correct data, so I opened a bug for it in bug207016.
Comment 7 WebKit Commit Bot 2020-02-03 13:29:53 PST
The commit-queue encountered the following flaky tests while processing attachment 389284 [details]:

editing/spelling/spellcheck-attribute.html bug 206178 (authors: g.czajkowski@samsung.com, mark.lam@apple.com, and rniwa@webkit.org)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2020-02-03 13:30:18 PST
The commit-queue encountered the following flaky tests while processing attachment 389284 [details]:

editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org)
The commit-queue is continuing to process your patch.
Comment 9 WebKit Commit Bot 2020-02-03 13:54:58 PST
Comment on attachment 389284 [details]
Patch

Clearing flags on attachment: 389284

Committed r255590: <https://trac.webkit.org/changeset/255590>
Comment 10 WebKit Commit Bot 2020-02-03 13:55:00 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2020-02-03 13:55:15 PST
<rdar://problem/59124286>