Revert two PNA CLs that seem to be causing crashes.

This reverts commit 4f617a2060db8828b6caa16cdd57be12d4ec3af8
("[Private Network Access] Support service worker script update") and
commit ee580dabdb282695447ad86db14c7a0caaecd79d ("Fix success test
cases in service-worker-update.https.window.js").

The former is suspected to be responsible for crashes in https://crbug.com/1362131. The latter was necessary to cleanly revert
the suspected patch.

Original change's description:
> [Private Network Access] Support service worker script update
>
> This CL passes a proper client security state based on the
> ServiceWorkerRegisterJob's policy container polices to GetLoaderFactoryForUpdateCheck which eventually gets to [1] where we
> would use it to create a loader factory just like we did for new script
> fetches.  It also initialises policy container policies for the
> ServiceWorkerRegisterJob constructor used by updates.
>
> Now the PNA check will block the public->private/local fetches in wpt
> tests.
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:content/browser/service_worker/service_worker_context_wrapper.cc;l=1651;drc=13dced01cce80364299ad7663479ad65069db73d
> [2] https://source.chromium.org/chromium/chromium/src/+/main:content/browser/service_worker/service_worker_register_job.h;l=64-65;drc=13dced01cce80364299ad7663479ad65069db73d?q=register_job.h&ss=chromium%2Fchromium%2Fsrc
>
> Bug: 1239551
> Change-Id: I1871153d83ae97e4aba46437e6708d748865052e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3865859
> Auto-Submit: Jonathan Hao <phao@chromium.org>
> Commit-Queue: Camille Lamy <clamy@chromium.org>
> Reviewed-by: Camille Lamy <clamy@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1044019}

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