Verified these changes on all platforms and saw no abnormalities in test execution.
This change is based on a preliminary patch done by @aghaisas , with some minor changes and the addition of one Leak-related web test. EventListenerLeak test was not touched, as it is a separate manual test app instead of a JUnit test. ------------- Commit messages: - Use JMemoryBuddy in Web leak tests - Use JMemoryBuddy in tests currently using System.gc() Changes: https://git.openjdk.org/jfx/pull/1121/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1121&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8296919 Stats: 179 lines in 9 files changed: 24 ins; 118 del; 37 mod Patch: https://git.openjdk.org/jfx/pull/1121.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1121/head:pull/1121 PR: https://git.openjdk.org/jfx/pull/1121