Skip to content

Expand CSSEngine selector matching tests#3970

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

Expand CSSEngine selector matching tests#3970
vogella merged 1 commit intoeclipse-platform:masterfrom
vogella:css-engine-selector-tests

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented May 6, 2026

Adds fourteen contract-level tests for CSSEngine selector matching, covering the CSS subset Eclipse stylesheets actually ship: type/class/id/compound selectors, descendant and child combinators, attribute presence and ~= word-match (with the word-boundary case), :selected and :disabled pseudo-classes, selector lists, and tag-name case sensitivity. The motivation is to lock in current engine behaviour as a stable contract before the planned SAC parser swap, so any regression surfaces here rather than as a mysterious theme bug downstream.

TestElement now passes a unique sentinel to ElementAdapter as its native widget. Previously every TestElement shared null, which caused the engine's element-context cache to return the first-matched element for every subsequent matches() call within a single test, making multi-element selector tests impossible.

@vogella vogella force-pushed the css-engine-selector-tests branch from 8229ae0 to edb4ca2 Compare May 6, 2026 07:50
Adds 14 contract-level tests covering the CSS subset shipped Eclipse
stylesheets actually use: type, class, id, compound, descendant and
child combinators, attribute presence and ~= word match, :selected
and :disabled pseudo-classes, selector lists, and tag-name case
sensitivity.

TestElement now passes a unique sentinel to ElementAdapter as the
native widget, so multiple TestElement instances hitting matches()
on a single engine no longer collide on a shared null cache key.
@vogella vogella force-pushed the css-engine-selector-tests branch from edb4ca2 to 2734757 Compare May 6, 2026 08:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test Results

   852 files  ± 0     852 suites  ±0   53m 9s ⏱️ + 1m 18s
 7 954 tests +14   7 711 ✅ +14  243 💤 ±0  0 ❌ ±0 
20 364 runs  +42  19 709 ✅ +42  655 💤 ±0  0 ❌ ±0 

Results for commit 2734757. ± Comparison against base commit 7f682c2.

♻️ This comment has been updated with latest results.

@vogella vogella merged commit 7e65263 into eclipse-platform:master May 7, 2026
27 of 28 checks passed
@vogella vogella deleted the css-engine-selector-tests branch May 7, 2026 03:41
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