Bug 222840 - REGRESSION (r272842): security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html is consistently failing
Summary: REGRESSION (r272842): security/contentSecurityPolicy/video-with-data-url-allo...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-05 16:29 PST by Ryan Haddad
Modified: 2021-04-12 20:47 PDT (History)
5 users (show)

See Also:


Attachments
actual image (69.87 KB, image/png)
2021-03-05 16:29 PST, Ryan Haddad
no flags Details
expected image (68.63 KB, image/png)
2021-03-05 16:30 PST, Ryan Haddad
no flags Details
Test gardening (1.45 KB, patch)
2021-03-22 17:12 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2021-03-05 16:29:42 PST
After Media In GPUProcess was enabled for tests in r272842, security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html is consistently failing on iOS

https://results.webkit.org/?suite=layout-tests&test=security%2FcontentSecurityPolicy%2Fvideo-with-data-url-allowed-by-media-src-star.html

https://build.webkit.org/results/Apple-iOS-14-Simulator-Release-WK2-Tests/r273999%20(371)/security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star-diffs.html

The test says "This tests that loading a video with a data URL is allowed when the page has Content Security Policy "media-src *". This test PASSED if you see a square with a green-to-gray horizontal gradient. Otherwise, it FAILED."

The "expected" image doesn't show the green-to-gray gradient, but the "actual" image does.
Comment 1 Ryan Haddad 2021-03-05 16:29:55 PST
Created attachment 422451 [details]
actual image
Comment 2 Ryan Haddad 2021-03-05 16:30:07 PST
Created attachment 422452 [details]
expected image
Comment 3 Radar WebKit Bug Importer 2021-03-05 16:30:30 PST
<rdar://problem/75118202>
Comment 4 Peng Liu 2021-03-22 11:07:01 PDT
This test has been flaky on both macOS and iOS-device for quite a while (bug 155196).

WKTR loads video-with-data-url-allowed-by-media-src-star.html and video-with-data-url-allowed-by-media-src-star-expected.html, and compares the rendering results. This test expects the rendering results be the same, but looks like WebKit loads video-with-data-url-allowed-by-media-src-star.html faster, so the rendering results are not the same for a while and WKTR reports the failure. However, the rendering results will become the same eventually.
Comment 5 Peng Liu 2021-03-22 12:15:51 PDT
Based on Jer's suggestion, we may need to delay changing the readyState of a video element to “HAVE_FUTURE_DATA” until we can guarantee that we won’t return an empty image if asked to paint.
Comment 6 Peng Liu 2021-03-22 17:12:59 PDT
Created attachment 423966 [details]
Test gardening
Comment 7 Peng Liu 2021-03-22 21:15:45 PDT
Comment on attachment 423966 [details]
Test gardening

Clearing flags on attachment: 423966

Committed r274840 (235630@main): <https://commits.webkit.org/235630@main>
Comment 8 Daniel Bates 2021-03-22 21:17:51 PDT
Good that these test no longer fail. Consider removing the tests and the setting altogether. These tests were for a setting added in bug #157005. That setting was for bin compat and guarded by linked-on-or-after. It's been 5 years since then and I don't think we need to support such an old iOS.
Comment 9 Peng Liu 2021-03-22 21:23:13 PDT
Thanks for sharing the important information! It would be great if we can remove the settings and tests.
Comment 10 Peng Liu 2021-04-12 20:47:32 PDT
https://ews-build.s3-us-west-2.amazonaws.com/macOS-AppleSilicon-Big-Sur-Debug-WK2-Tests-EWS/r425796-1952/results.html

Some tests in security/contentSecurityPolicy are flaky crash on AS-debug bots.