Bug 222840

Summary: REGRESSION (r272842): security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html is consistently failing
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Peng Liu <peng.liu6>
Status: NEW ---    
Severity: Normal CC: ews-watchlist, mkwst, peng.liu6, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=155196
Attachments:
Description Flags
actual image
none
expected image
none
Test gardening none

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 &quot;media-src *&quot;. 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.