Revert "[text-fragment] Attempt search for dynamic content"

This reverts commit 6bd222a5ff1b875ac739df526a59799ded6b6676.

Reason for revert: Likely causing recent builder failures.
Example failure: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/131991/overview
Failing: external/wpt/scroll-to-text-fragment/iframes.sub.html

Original change's description:
> [text-fragment] Attempt search for dynamic content
>
> Text fragments currently perform up to two searches, one when document
> parsing completes and a second attempt when document load completes (if
> load wasn't completed at parse complete time). However, pages, often
> load content after document load, when content is "dynamically loaded".
> One popular example is Mobile Wikipedia, which adds `hidden=until-found`
> on collapsed sections in idle tasks after load. This meant
> text-fragments couldn't target pages like these.
>
> This CL attempts to make text fragments work on dynamically loaded pages
> by performing a third attempt, if needed. If all directives haven't
> matched at load time, a delayed task is scheduled for 500ms that will
> request attachment on unmatched directives. TextFragmentAnchor listens
> for relevant changes in the DOM and reschedules this task each time a
> change is made. At 3000ms it gives up and performs the search to avoid
> waiting forever.
>
> At a high level, this CL tries to separate the state tracking of actions
> performed for the first matching directive from the state tracking for
> running multiple searches. This is done by introducing a new iteration_
> enum tracking the latter.
>
> Change-Id: Ie01012935152b12f2d724469010128c7dd34afb8
> Bug: 963045
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4586061
> Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
> Commit-Queue: David Bokan <bokan@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1160040}

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