Revert^2 "Reland "[A11y] Do not allow asymmetrical parent-child relations in tree""

This reverts commit 7d71be73ff6ae1e26559634149c729b41de71836.

Reason for revert: Reverting this cl makes the failure stable. reland this.

Original change's description:
> Revert "Reland "[A11y] Do not allow asymmetrical parent-child relations in tree""
>
> This reverts commit 8fda0f8317a6f861c97c413d1deecb8c4f998481.
>
> Reason for revert: Test failure on Linux MSan Tests: https://ci.chromium.org/ui/b/8764197885202278033
>
> Original change's description:
> > Reland "[A11y] Do not allow asymmetrical parent-child relations in tree"
> >
> > This is a reland of commit 0953e5a0ef7748af2c932568ec9d9bbdbc480f11
> >
> > Two new tests have been added since the original CL:
> > 1. content/test/data/regression/aria-owns-from-textarea.html, which
> > induces the same crash as google.com, which caused the revert via bug 1501535. The fix for this one is to not assume the owned child had
> > previously been unignored.
> > 2. web_tests/accessibility/aria-owns-dynamic-changes-2.html, to show that the consequences of the error Chris found in the original landing as discussed in this review thread: https://chromium-review.googlesource.com/c/chromium/src/+/4873421/72..77/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc#b1418
> > The fix for this one was already in the original landing.
> >
> > Original change's description:
> > > [A11y] Do not allow asymmetrical parent-child relations in tree
> > >
> > > Design doc:
> > > https://docs.google.com/document/d/1PnjhlWqTtivmsUVTF0kqMAUIsO9a_eTp32pRY4KJh_U/edit#heading=h.wlgzk7gh4m76
> > >
> > > Fix failures brought to light by the Eager AX Tree Updates project and related checks, so that serialization operates on a truly frozen, complete AX Tree, and does not lead to changes to the underlying data at unsafe times. After landing this CL and any follow-ups, the goal is to have a vastly more stable, predictable Blink accessibility engine.
> > >
> > > The current implementation can lead to processing the tree when there
> > > are "holes" in the data structure, such as missing parents or children,
> > > which can lead to crashes, checks and unpredictability.
> > >
> > > 1. Avoid holes in the first place: do not call AXObject::ClearChildren() immediately when calling AXObject::SetNeedsToUpdateChildren(), so that missing parent and missing child holes are not created for unchanged siblings. These holes tended to sit around and cause problems when downstream operations did not expect them. Only call ClearChildren() right before rebuilding the children, in UpdateChildrenIfNecessary().
> > > 2. More complete repairs: Instead of only repairing missing parents, when a parentless ensure a complete subtree structure around the child, starting with the included parent. The new method to accomplish this is called AXObjectCacheImpl::RepairIncludedParentsChildren(). It makes sure that every parent up to the included parent has a complete set of children.
> > > 3. More timely repairs: instead of waiting for a hole to be discovered while tree walking, eagerly ensure that objects up to their included parent have repairs, whenever an object is being retrieved for deferred event processing, or when an object is being created in the middle of a tree. If the necessary parents do not exist, and thus the AXObject itself is not viable, make sure any stale AXObjects in that subtree are eagerly removed, because they are also not viable.
> > > 4. More complete tree structure checks in AXObjectCacheImpl::CheckTreeIsUpdated(), which ensure symmetrical included parent-child relationships are complete. This helps guarantee that no lazy computations try to alter the tree while it’s being serialized (in a frozen state). The new checks do not pass without the other code changes, which are in service of the new checks.
> > >
> > > Future work: attempt to avoid any tree repairs and guarantee completeness in more places, providing even more predictability, for example, by handling CSS display changes similarly to role changes.
> > >
> > > Fixed: 1422755,1483877,1482591,1481940,1480442,1488246,1486249,1484029,1353205,1480627,1494849,1493953,1484394,1489027,1491163,1501723
> > > Change-Id: Ied4258680ffe4099caaf4c5e614c59c70c61a013
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4873421
> > > Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> > > Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#1223164}
> >
> > Change-Id: I96fcc71601842ea7b38de70ee24f77df1f011f24
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5019353
> > Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
> > Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
> > Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1225907}
>
> Change-Id: I77f6149192a7afa697098e125900705ab43ed0f0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1503056
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5040555
> Reviewed-by: Yifan Luo <lyf@chromium.org>
> Owners-Override: Yifan Luo <lyf@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1225985}

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