Add comprehensive test coverage improvements#21
Merged
Conversation
Collaborator
marevol
commented
Jan 10, 2026
- Add RawTextElementsTest.java for script/style/textarea/title element handling
- Add StrictModeTest.java for nekohtml.dom.strict system property testing
- Add BrowserQuirksIntegrationTest.java for browser quirks and implied elements
- Extend SimpleHTMLScannerEnhancementsTest with entity and encoding tests
- Extend AdoptionAgencyAlgorithmExtendedTest with AAA loop limit, formatting marker, and table context tests
- Extend HTMLSAXConfigurationTest with feature combination and property tests
- Extend PerformanceStressTest with concurrent parsing, stress patterns, and real-world simulation tests
- Add RawTextElementsTest.java for script/style/textarea/title element handling - Add StrictModeTest.java for nekohtml.dom.strict system property testing - Add BrowserQuirksIntegrationTest.java for browser quirks and implied elements - Extend SimpleHTMLScannerEnhancementsTest with entity and encoding tests - Extend AdoptionAgencyAlgorithmExtendedTest with AAA loop limit, formatting marker, and table context tests - Extend HTMLSAXConfigurationTest with feature combination and property tests - Extend PerformanceStressTest with concurrent parsing, stress patterns, and real-world simulation tests
There was a problem hiding this comment.
Pull request overview
This PR significantly expands test coverage across multiple test suites to validate comprehensive HTML parsing behavior, edge cases, and stress scenarios in the NekoHTML library.
Changes:
- Adds new test files for raw text elements, strict mode handling, and browser quirks compatibility
- Extends existing test suites with entity handling, encoding variations, handler management, feature combinations, and concurrent/stress testing scenarios
- Introduces tests for the Adoption Agency Algorithm's loop limits, formatting markers, and complex nesting patterns
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| SimpleHTMLScannerEnhancementsTest.java | Adds tests for entity handling (named, numeric, incomplete), encoding variations (ISO-8859-1, UTF-16, UTF-8), input source handling, and SAX handler management |
| RawTextElementsTest.java | New file testing raw text element handling for script, style, textarea, title, and deprecated elements with various content patterns |
| HTMLSAXConfigurationTest.java | Extends with feature combination tests, property management, pipeline configuration, handler getters/setters, and complex feature interactions |
| AdoptionAgencyAlgorithmExtendedTest.java | Adds comprehensive tests for AAA outer loop limits, formatting markers in table contexts, special scope elements, and stress scenarios |
| StrictModeTest.java | New file testing nekohtml.dom.strict system property behavior across default, lenient, and strict modes with edge cases |
| BrowserQuirksIntegrationTest.java | New file testing browser quirks compatibility including implied elements, table quirks, form handling, list patterns, and DOCTYPE variations |
| PerformanceStressTest.java | Extends with deep nesting tests, concurrent parsing validation, misnesting patterns, and complex real-world page simulations |
Comments suppressed due to low confidence (1)
src/test/java/org/codelibs/nekohtml/sax/SimpleHTMLScannerEnhancementsTest.java:2
- The copyright year is set to 2025, which is in the future. The current date is January 10, 2026, so the copyright notice should be updated to include 2026.
* Copyright 2012-2025 CodeLibs Project and the Others.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.