On Mon, 22 Jun 2026 13:22:52 GMT, Marius Hanl <[email protected]> wrote:
> Found while reviewing > https://github.com/openjdk/jfx/pull/2184#discussion_r3452349547. > > If this particular test runs before `TextInputControlModenaTest`, it will set > the `Application` user agent stylesheet to `"data:,"` and not null. > The contract of `Application.setUserAgentStylesheet(..)` is that a `null` > value will restore the platform default stylesheets, which is `Modena`. So we > need to reset this value when changed in a test. > > In our case, it is always `null`, but I still followed the pattern we use in > other tests (like for `Locale`). > > This can very easily tested by copying the test into > `TextInputControlModenaTest` and see that the `testHighlightTextInput` will > fail - and succeed with this change. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 3306add3 Author: Marius Hanl <[email protected]> URL: https://git.openjdk.org/jfx/commit/3306add314f069a24c02fda4ed3ece9611344920 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod 8387020: StyleManagerTest#testSetApplicationUserAgentStylesheetFromDataURI does not correctly reset the Application user agent stylesheet Reviewed-by: angorya, zelmidaoui ------------- PR: https://git.openjdk.org/jfx/pull/2195
