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 html5lib-tests #460

Merged
merged 40 commits into from
Aug 11, 2023
Merged

Conversation

untitaker
Copy link
Contributor

@untitaker untitaker commented Dec 10, 2021

Follow-up items:

  • More precise errors
  • There is still large divergence between some of the states and their names in code vs spec. It's just that there's no testcase for them.

I'm also fuzzing this branch continuously against https://github.com/untitaker/html5gum using FUZZ_HTML5EVER=1 to find more bugs, but they only cover the tokenizer. Some bugfixes have been made and corresponding regression tests added in a regression.test file.

Fixes #459.

@jdm
Copy link
Member

jdm commented Jan 17, 2022

What makes this a WIP?

@untitaker
Copy link
Contributor Author

untitaker commented Jan 17, 2022

Hmm, in the sense that it's not mergeable as-is. I hadn't planned on working it for now though

@untitaker
Copy link
Contributor Author

eh, I'm working on this now.

  • Some of the testsuite format has changed. Errors are no longer tokens, they're their own separate array entry with line/col/code.
  • Ignoring line/col, the code does not match your human-readable errors at all. Do we want to make an effort assimilating those to what html5lib-tests prescribes?

that's all there is to tokenizer tests, haven't looked at treebuilder tests yet. That said I am not really familiar with how treebuilding is done in the spec, so this could take quite a while.

@jdm
Copy link
Member

jdm commented Jan 18, 2022

Good question about error codes. I suspect a decent way to handle that would be to make an actual error enum that gets passed to emit_error, and then make the html5lib test harness map those error variants to the codes that the html5lib tests expect.

That being said, I'm inclined to file an issue about that and ignore specific error content for right now.

@untitaker untitaker changed the title [WIP] Update html5lib-tests Update html5lib-tests Jul 18, 2023
@untitaker
Copy link
Contributor Author

@jdm all tests are fixed. can you take a look?

@EdorianDark
Copy link

@mrobinson Can you take a look maybe?

@mrobinson mrobinson added this pull request to the merge queue Aug 11, 2023
Merged via the queue into servo:master with commit c736fec Aug 11, 2023
5 checks passed
@djc djc mentioned this pull request Mar 18, 2024
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.

html5ever lags far behind on html5lib-tests
4 participants