[shared storage] add permissions policy for individual output gate: selectURL() and privateAggregation

This allows more fine-grained control of the output gates

PR: https://github.com/WICG/shared-storage/pull/52

This CL only implement the PAA check for shared storage part. For FLEDGE, it will be done in a separate CL.

Also add the new features in
kFencedFrameOpaqueAdsDefaultAllowedFeatures: they are supposed to
be used from within the FF.

The private aggregation permissions policy is tested in a browser test / is not easily testable via web_test: right now, only selectURL()’s result rendered in FF can expose state in the worklet; but if the permissions policy is disallowed in the embedder, the FF navigation will fail (as the permissions is in kFencedFrameOpaqueAdsDefaultAllowedFeatures).

Bug: 1400840
Change-Id: I74a285827126f5cf8a43cb780e37693f4c0c7ddf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4105180
Reviewed-by: Liam Brady <lbrady@google.com>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1088572}
13 files changed
tree: 70f0a96d4bcf6bcb0a03fb1ce1b687feaa50ec58
  1. .github/
  2. .well-known/
  3. accelerometer/
  4. accessibility/
  5. accname/
  6. acid/
  7. ambient-light/
  8. animation-worklet/
  9. annotation-model/
  10. annotation-protocol/
  11. annotation-vocab/
  12. apng/
  13. appmanifest/
  14. attribution-reporting/
  15. audio-output/
  16. autoplay-policy-detection/
  17. avif/
  18. background-fetch/
  19. background-sync/
  20. badging/
  21. battery-status/
  22. beacon/
  23. bluetooth/
  24. clear-site-data/
  25. client-hints/
  26. clipboard-apis/
  27. close-watcher/
  28. common/
  29. compat/
  30. compression/
  31. compute-pressure/
  32. conformance-checkers/
  33. console/
  34. contacts/
  35. content-dpr/
  36. content-index/
  37. content-security-policy/
  38. contenteditable/
  39. cookie-store/
  40. cookies/
  41. core-aam/
  42. cors/
  43. credential-management/
  44. css/
  45. custom-elements/
  46. custom-state-pseudo-class/
  47. delegated-ink/
  48. density-size-correction/
  49. deprecation-reporting/
  50. device-memory/
  51. direct-sockets/
  52. docs/
  53. document-policy/
  54. dom/
  55. domparsing/
  56. domxpath/
  57. dpub-aam/
  58. dpub-aria/
  59. editing/
  60. element-timing/
  61. encoding/
  62. encoding-detection/
  63. encrypted-media/
  64. entries-api/
  65. event-timing/
  66. eventsource/
  67. eyedropper/
  68. feature-policy/
  69. fetch/
  70. file-system-access/
  71. FileAPI/
  72. focus/
  73. font-access/
  74. fonts/
  75. forced-colors-mode/
  76. fs/
  77. fullscreen/
  78. gamepad/
  79. generic-sensor/
  80. geolocation-API/
  81. geolocation-sensor/
  82. graphics-aam/
  83. gyroscope/
  84. hr-time/
  85. html/
  86. html-longdesc/
  87. html-media-capture/
  88. idle-detection/
  89. imagebitmap-renderingcontext/
  90. images/
  91. import-maps/
  92. IndexedDB/
  93. inert/
  94. infrastructure/
  95. input-device-capabilities/
  96. input-events/
  97. installedapp/
  98. interfaces/
  99. intersection-observer/
  100. intervention-reporting/
  101. is-input-pending/
  102. js/
  103. js-self-profiling/
  104. keyboard-lock/
  105. keyboard-map/
  106. largest-contentful-paint/
  107. layout-instability/
  108. lifecycle/
  109. loading/
  110. longtask-timing/
  111. magnetometer/
  112. managed/
  113. mathml/
  114. measure-memory/
  115. media/
  116. media-capabilities/
  117. media-playback-quality/
  118. media-source/
  119. mediacapture-extensions/
  120. mediacapture-fromelement/
  121. mediacapture-handle/
  122. mediacapture-image/
  123. mediacapture-insertable-streams/
  124. mediacapture-record/
  125. mediacapture-region/
  126. mediacapture-streams/
  127. mediasession/
  128. merchant-validation/
  129. mimesniff/
  130. mixed-content/
  131. mst-content-hint/
  132. native-io/
  133. navigation-api/
  134. navigation-timing/
  135. netinfo/
  136. network-error-logging/
  137. notifications/
  138. old-tests/
  139. orientation-event/
  140. orientation-sensor/
  141. page-lifecycle/
  142. page-visibility/
  143. paint-timing/
  144. parakeet/
  145. payment-handler/
  146. payment-method-basic-card/
  147. payment-method-id/
  148. payment-request/
  149. pending-beacon/
  150. performance-timeline/
  151. periodic-background-sync/
  152. permissions/
  153. permissions-policy/
  154. permissions-request/
  155. permissions-revoke/
  156. picture-in-picture/
  157. pointerevents/
  158. pointerlock/
  159. portals/
  160. preload/
  161. presentation-api/
  162. priority-hints/
  163. private-click-measurement/
  164. proximity/
  165. push-api/
  166. quirks/
  167. referrer-policy/
  168. remote-playback/
  169. reporting/
  170. requestidlecallback/
  171. resize-observer/
  172. resource-timing/
  173. resources/
  174. sanitizer-api/
  175. savedata/
  176. scheduler/
  177. screen-capture/
  178. screen-details/
  179. screen-orientation/
  180. screen-wake-lock/
  181. scroll-animations/
  182. scroll-to-text-fragment/
  183. secure-contexts/
  184. secure-payment-confirmation/
  185. selection/
  186. serial/
  187. server-timing/
  188. service-workers/
  189. shadow-dom/
  190. shape-detection/
  191. shared-storage/
  192. signed-exchange/
  193. soft-navigation-heuristics/
  194. speculation-rules/
  195. speech-api/
  196. storage/
  197. storage-access-api/
  198. streams/
  199. subapps/
  200. subresource-integrity/
  201. svg/
  202. svg-aam/
  203. timing-entrytypes-registry/
  204. tools/
  205. touch-events/
  206. trust-tokens/
  207. trusted-types/
  208. ua-client-hints/
  209. uievents/
  210. upgrade-insecure-requests/
  211. url/
  212. urlpattern/
  213. user-timing/
  214. vibration/
  215. video-rvfc/
  216. virtual-keyboard/
  217. visual-viewport/
  218. wai-aria/
  219. wasm/
  220. web-animations/
  221. web-bundle/
  222. web-locks/
  223. web-nfc/
  224. web-otp/
  225. web-share/
  226. webaudio/
  227. webauthn/
  228. webcodecs/
  229. WebCryptoAPI/
  230. webdriver/
  231. webgl/
  232. webgpu/
  233. webhid/
  234. webidl/
  235. webmessaging/
  236. webmidi/
  237. webnn/
  238. webrtc/
  239. webrtc-encoded-transform/
  240. webrtc-extensions/
  241. webrtc-ice/
  242. webrtc-identity/
  243. webrtc-priority/
  244. webrtc-stats/
  245. webrtc-svc/
  246. websockets/
  247. webstorage/
  248. webtransport/
  249. webusb/
  250. webvr/
  251. webvtt/
  252. webxr/
  253. window-placement/
  254. workers/
  255. worklets/
  256. x-frame-options/
  257. xhr/
  258. .azure-pipelines.yml
  259. .gitattributes
  260. .gitignore
  261. .mailmap
  262. .taskcluster.yml
  263. CODE_OF_CONDUCT.md
  264. CODEOWNERS
  265. CONTRIBUTING.md
  266. LICENSE.md
  267. lint.ignore
  268. README.md
  269. wpt
  270. wpt.py
README.md

The web-platform-tests Project

Taskcluster CI Status documentation manifest Python 3

The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.

The most important sources of information and activity are:

  • github.com/web-platform-tests/wpt: the canonical location of the project's source code revision history and the discussion forum for changes to the code
  • web-platform-tests.org: the documentation website; details how to set up the project, how to write tests, how to give and receive peer review, how to serve as an administrator, and more
  • wpt.live: a public deployment of the test suite, allowing anyone to run the tests by visiting from an Internet-enabled browser of their choice
  • wpt.fyi: an archive of test results collected from an array of web browsers on a regular basis
  • Real-time chat room: the wpt:matrix.org matrix channel; includes participants located around the world, but busiest during the European working day.
  • Mailing list: a public and low-traffic discussion list
  • RFCs: a repo for requesting comments on substantial changes that would impact other stakeholders or users; people who work on WPT infra are encouraged to watch the repo.

If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.

Setting Up the Repo

Clone or otherwise get https://github.com/web-platform-tests/wpt.

Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune (or git fetch -p && git merge).

Running the Tests

See the documentation website and in particular the system setup for running tests locally.

Command Line Tools

The wpt command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:

  • wpt serve - For starting the wpt http server
  • wpt run - For running tests in a browser
  • wpt lint - For running the lint against all tests
  • wpt manifest - For updating or generating a MANIFEST.json test manifest
  • wpt install - For installing the latest release of a browser or webdriver server on the local machine.
  • wpt serve-wave - For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.

Windows Notes

On Windows wpt commands must be prefixed with python or the path to the python binary (if python is not in your %PATH%).

python wpt [command]

Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt commands.

Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false in your working tree.

Publication

The master branch is automatically synced to wpt.live and w3c-test.org.

Contributing

Save the Web, Write Some Tests!

Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.

The way to contribute is just as usual:

  • Fork this repository (and make sure you're still relatively in sync with it if you forked a while ago).
  • Create a branch for your changes: git checkout -b topic.
  • Make your changes.
  • Run ./wpt lint as described above.
  • Commit locally and push that to your repo.
  • Create a pull request based on the above.

Issues with web-platform-tests

If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!