Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update html5 tests #2281

Merged
merged 3 commits into from Jun 29, 2021
Merged

Update html5 tests #2281

merged 3 commits into from Jun 29, 2021

Conversation

stevecheckoway
Copy link
Contributor

What problem is this PR intended to solve?

html5lib-tests has updated since I forked it to fix a bunch of errors. Some of the updates include new tests to test functionality that changed in the spec. This updates the code to parse the new tests, updates the submodule to include my fixes to the latest version of html5lib-tests, and updates the gumbo parser to accommodate the spec changes.

The new tests were mentioned in #2204 (comment).

Have you included adequate test coverage?

Yes. The changes to the parser include parser-specific tests and the update to html5lib-tests includes end-to-end tests to test the behavior.

Does this change affect the behavior of either the C or the Java implementations?

This only affects the C implementation as the gumbo parser isn't use for the Java implementation.

Recent tests to html5lib extended the format for the tree construction
tests.

Also add some additional output for some assertions to aid in fixing
tests.
The HTML spec changed to handle `</p>` and `</br>` in foreign context
the same way `<p>` and `<br>` are.

The fragment case is handled identically to the nonfragment case now.
Update to the latest version of html5lib-tests. The spec currently has a
[bug](whatwg/html#6808) so the parser does not
conform to the spec, but it does match Safari, Firefox, Chrome, and the
html5lib-tests tests.
@stevecheckoway
Copy link
Contributor Author

@craigbarnes You'll probably want the changes to gumbo in this PR. The spec changed in its handling of some misformed HTML.

@flavorjones
Copy link
Member

flavorjones commented Jun 28, 2021

@stevecheckoway Just as an FYI in case it ended up being not-obvious, here are the gumbo-related test runs for this PR:

And the html5lib tests run in every CI job (see

- uses: actions/checkout@v2
with:
submodules: true
for an example of where we make sure the submodule is checked out, and this job to see the 50,000+ assertions running!).

Everything is green! Go ahead and hit that merge button when you're ready.

@stevecheckoway
Copy link
Contributor Author

I don't believe I have access to merge.

@stevecheckoway stevecheckoway merged commit e4b29a4 into sparklemotion:main Jun 29, 2021
@stevecheckoway stevecheckoway deleted the update-html5-tests branch June 29, 2021 20:26
@craigbarnes
Copy link
Contributor

@stevecheckoway Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants