Bug 245682 - imported/w3c/web-platform-tests/content-security-policy/inheritance/history(-iframe).sub.html has failing subtests
Summary: imported/w3c/web-platform-tests/content-security-policy/inheritance/history(-...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 246093
Blocks:
  Show dependency treegraph
 
Reported: 2022-09-26 09:43 PDT by Ryan Reno
Modified: 2022-10-10 10:26 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Reno 2022-09-26 09:43:38 PDT
Both tests have failing subtests for local schemes. Some failures may be test harness, web driver, or reporting API issues but Blob URLs currently don't follow the spec for storing PolicyContainer in history.
Comment 1 Radar WebKit Bug Importer 2022-09-26 09:44:06 PDT
<rdar://problem/100415046>
Comment 2 Ryan Reno 2022-10-03 16:02:52 PDT
My mistake - blob URLs do follow the spec for history. That is, we don't store them in history at all. Instead they should be stored in the appropriate BlobRegistry. It appears the PolicyContainer is appropriately stored in the BlobData class.

These tests seem to be quite flaky when hosting them with run-webkit-httpd and navigating to them with Safari and MiniBrowser. They either pass, fail, or timeout.

They consistently fail only the Blob URL cases via WebKitTestRunner and on WPT though.
Comment 3 Ryan Reno 2022-10-04 09:45:57 PDT
This is probably a bug in the inheritance logic in DocumentWriter::begin. It looks like we unconditionally (for blob URLs) inherit from the navigation initiator. We should be inheriting from the PolicyContainer stored in the Blob URL store.
Comment 4 Ryan Reno 2022-10-05 10:52:18 PDT
246093 contains the PR to fix this. Instead of handling blob URL inheritance in WebContent process, we can use the PolicyContainer which already exists in the blob store in the Network process.