Commit 2da9762
authored
Add HtmlRenderer.Test project, port applicable tests from PeachPDF (#262)
PeachPDF forked from HTML-Renderer and has since built out a much
larger CSS engine, SVG support, and PDF pipeline, with a large xUnit
test suite covering it. This adds a new HtmlRenderer.Test project and
ports the subset of PeachPDF.Tests that HTML-Renderer's current
feature set can actually exercise, routing tests to the appropriate
project:
- HtmlRenderer.Test: CSS parsing/property and Core Dom/Utils unit
tests, using a new lightweight mock RAdapter/RGraphics test harness
(no dependency on any UI framework).
- HtmlRenderer.IntegrationTest: end-to-end layout/paint behavior
tests, using a similar harness backed by the real WinForms adapter.
- HtmlRenderer.PdfSharp.Test: PDF-generation and PdfSharp-adapter
tests.
- Added Source/Test/HtmlRenderer.Test/CssEngineSupport/: helper
classes (CssConstructionFunctions, TestExtensions,
ObjectArrayComparer) mirroring PeachPDF's own test-construction
helpers, adapted to the internal TheArtOfDev.HtmlRenderer.Core.CssEngine
namespace (accessible via the existing InternalsVisibleTo grant).
- Added ~73 new test files under Source/Test/HtmlRenderer.Test/Css/
(and a Css/Selectors/ subfolder) covering the CSS object model
(stylesheet parsing, tokenization, selectors, colors, URLs),
at-rules (`@font-face`, `@property`, `@container`, `@layer`,
`@keyframes`, `@supports`, CSS nesting), grammar/value converters
(aspect-ratio, basic-shape, box-shadow, calc(), gradients, grid),
and the full property-test suite (flexbox, backgrounds, borders,
fonts, columns, content, custom properties, etc.).
- Tests exercising features that still don't exist (GCPM paged-media
content functions, SVG rendering, WOFF binary decoding, font-variant
granular sub-properties, `:has()` leading combinators) are excluded
entirely rather than ported. Tests exercising a real gap in an
otherwise-working feature are ported with full original assertions
intact but marked [Ignore("not yet spec compliant")], citing the
exact source evidence - including several new gaps this pass found
itself (missing `normal` keyword on gap/row-gap/column-gap,
font-weight's CSS2.1-only 100-900 restriction, GridTemplate/
GridTrackSize missing value-equality, @supports/@container never
applied by the real per-box cascade, cascade-layer precedence not
implemented).1 parent d832b34 commit 2da9762
139 files changed
Lines changed: 35389 additions & 3 deletions
File tree
- .github/workflows
- Source
- HtmlRenderer.PdfSharp
- HtmlRenderer.WinForms
- HtmlRenderer
- Test
- HtmlRenderer.IntegrationTest
- BoxModel
- Painting
- Positioning
- Tables
- TestSupport
- Text
- HtmlRenderer.PdfSharp.Test
- HtmlRenderer.Test
- CssEngineSupport
- Css
- Selectors
- Dom
- Parse
- TestSupport
- Utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
| |||
139 | 153 | | |
140 | 154 | | |
141 | 155 | | |
| 156 | + | |
142 | 157 | | |
143 | 158 | | |
144 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
Lines changed: 85 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
0 commit comments