Expand CSSEngine selector matching tests#3970
Merged
vogella merged 1 commit intoeclipse-platform:masterfrom May 7, 2026
Merged
Expand CSSEngine selector matching tests#3970vogella merged 1 commit intoeclipse-platform:masterfrom
vogella merged 1 commit intoeclipse-platform:masterfrom
Conversation
8229ae0 to
edb4ca2
Compare
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.
edb4ca2 to
2734757
Compare
Contributor
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.
Adds fourteen contract-level tests for
CSSEngineselector 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),:selectedand:disabledpseudo-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.TestElementnow passes a unique sentinel toElementAdapteras its native widget. Previously everyTestElementsharednull, which caused the engine's element-context cache to return the first-matched element for every subsequentmatches()call within a single test, making multi-element selector tests impossible.