The adjusted_start must be computed based on the part_start

In order to create a new ShapeResultView, we use segments of a previous
instance, analyzing its runs based on a new index range for the new
instance. Since the start/end of the RunInfo structure may be different
than the start index of the ShapeResultView, we use an adjusted_start
to adapt the logic to the different data structures.

We assume that if the passed start_index for the new range is greater
than the current run's part start being processed, we should define the
new run's start as the difference of these two values. However, we must
also ensure that start_index is at least equal to the the part_start
value for such run.

The problem described in the issue 1130153 comes from the fact that
we use the start_index on cases where it's smaller than the run's
part_start. This leads to an incorrect (longer than expected) run.

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

Pull requests are automatically mirrored except those that modify sensitive resources (such as .py). The latter require someone with merge access to comment with “LGTM” or “w3c-test:mirror” to indicate the pull request has been checked.

Branches

In the vast majority of cases the only upstream branch that you should need to care about is master. If you see other branches in the repository, you can generally safely ignore them.

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!