github web-platform-tests/wpt merge_pr_46620

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
15 months ago

Use base::span_from_cstring() in HTMLDocumentParserTest

Many of the tests use sizeof() to determine the size of
the input. In some cases the trailing NUL is excluded and in some cases
it isn't. In the latter cases not subtracting seems like an oversight,
and the test themselves doesn't appear to test anything regarding NULs.

Convert all instances to use base::span_from_cstring(), which will
account for (remove) the trailing NUL.

Add a testcase that covers this properly to
html/syntax/parsing/zero.html.

Change-Id: I791a9d452c84f324d178586ca3924a39b938c525
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5594069
Commit-Queue: Fredrik Söderquist fs@opera.com
Reviewed-by: Mason Freed masonf@chromium.org
Cr-Commit-Position: refs/heads/main@{#1310475}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.