Skip to content

Add CSS parser round-trip structure tests#3974

Merged
vogella merged 1 commit intoeclipse-platform:masterfrom
vogella:css-engine-parser-roundtrip-tests
May 7, 2026
Merged

Add CSS parser round-trip structure tests#3974
vogella merged 1 commit intoeclipse-platform:masterfrom
vogella:css-engine-parser-roundtrip-tests

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented May 6, 2026

Adds twelve structural tests over the CSS parser's output, asserted purely through the high-level DOM-CSS interfaces (CSSStyleSheet, CSSRule, CSSStyleDeclaration, CSSValue). Covers empty sheets, single rule shape, rule order preservation, multiple selectors in one rule, multiple declarations, whitespace and comment tolerance, @import rule type and href exposure, quoted and unquoted attribute values, the four CSS color forms (#rgb, #rrggbb, rgb(), named), and that invalid input either throws or invokes the error handler.

A small helper parseCssWithoutImports is added to ParserTestUtil so the @import tests can inspect the raw AST without the engine's eager URL resolution pass.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test Results

   855 files     855 suites   53m 40s ⏱️
 7 966 tests  7 723 ✅ 243 💤 0 ❌
20 400 runs  19 745 ✅ 655 💤 0 ❌

Results for commit 710e760.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the css-engine-parser-roundtrip-tests branch from 2359572 to f57a0cb Compare May 6, 2026 16:32
Adds 12 tests covering the structural shape the engine's CSS parser
produces, asserted only through the high-level DOM-CSS interfaces
(CSSStyleSheet, CSSRule, CSSStyleDeclaration, CSSValue). Covers empty
sheets, single rule, rule order preservation, multiple selectors per
rule, multiple declarations, whitespace and comment tolerance,
@import rule type and href exposure, quoted vs unquoted attribute
values, color value forms (#rgb, #rrggbb, rgb(), named), and that
invalid input either throws or invokes the error handler.

Adds parseCssWithoutImports to ParserTestUtil so the @import tests
can inspect the raw AST without the engine's eager URL resolution
pass.
@vogella vogella force-pushed the css-engine-parser-roundtrip-tests branch from f57a0cb to 710e760 Compare May 7, 2026 03:41
@vogella vogella merged commit 336961f into eclipse-platform:master May 7, 2026
18 checks passed
@vogella vogella deleted the css-engine-parser-roundtrip-tests branch May 7, 2026 06:15
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.

1 participant