JDK-8170026 : Some tests in RegionBackgroundFillUITest fail with fractional window scale
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 9,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-18
  • Updated: 2018-09-13
  • Resolved: 2018-02-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx11Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
We get the following 6 unit test failures in RegionBackgroundFillUITest when running on a Windows 10 system with 125% scaling:

RegionBackgroundFillUITest.basicFill_Radius1
RegionBackgroundFillUITest.basicFill_RadiusAndInsets
RegionBackgroundFillUITest.testOnePixelBottomInset
RegionBackgroundFillUITest.testOnePixelLeftInset
RegionBackgroundFillUITest.testOnePixelRightInset
RegionBackgroundFillUITest.testOnePixelTopInset

All tests pass with either 100% or 200% scaling.

Comments
Changeset: e321eebba79c Author: rkamath Date: 2018-02-26 14:58 +0530 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/e321eebba79c 8170026: Some tests in RegionBackgroundFillUITest fail with fractional window scale Reviewed-by: kcr, mbilla
26-02-2018

+1
26-02-2018

Thanks [~kcr] for the review. In addition to your observations, i noticed the below test too fails at 175% scale. RegionBackgroundFillUITest. testScenario2 Updated webrev for skipping the 6 additional tests: http://cr.openjdk.java.net/~rkamath/8170026/webrev.01/
23-02-2018

Looks good. +1
23-02-2018

The code changes look good to me. While testing on Windows with various screen scales, I discovered 5 additional tests that fail at 150% scaling: RegionBackgroundFillUITest.basicFill_Radius2 RegionBackgroundFillUITest.basicFill_Radius3 RegionBackgroundFillUITest.basicFill_Radius4 RegionBackgroundFillUITest.testScenario1 RegionBackgroundFillUITest.testScenario5 Can you please add the logic to skip these 5 additional tests when there is a fractional scale? (I do not think we should try to distinguish 125% versus 150% -- best to skip tests that fail with either scale when there is any fractional scale)
22-02-2018

Skipping these 8 tests by checking if the window scaling set is integral value or not RegionBackgroundFillUITest.basicFill_Radius1 RegionBackgroundFillUITest.basicFill_RadiusAndInsets RegionBackgroundFillUITest.testOnePixelBottomInset RegionBackgroundFillUITest.testOnePixelLeftInset RegionBackgroundFillUITest.testOnePixelRightInset RegionBackgroundFillUITest.testOnePixelTopInset RegionBackgroundFillUITest. testScenario3 RegionBackgroundFillUITest. testScenario4 Also removed explicit setting of glass.win.uiScale as it has no affect in current context. WebRev for review: http://cr.openjdk.java.net/~rkamath/8170026/webrev.00/
21-02-2018

One possible fix for this test bug is to skip the failing tests if the screen scale is a non-integer value (in other words, recognize that the precise one-pixel wide line tests that those tests are doing are not appropriate in the presence of fractional scales). This may be easier than trying to actually fix the tests so that they work in a manner that is still useful with fractional scales.
16-02-2018

While the two failures mentioned related to the marlinrasterizer are new, it is not (yet) the default rasterizer and the other failures are not a problem in practice because they are due to known deficiencies in the tests themselves in trying to examine screen rendering on a HiDPI display. The tests are run with a non-fractional scale for our development purposes so those problems are currently only theoretical and would need to be fixed before we can run the tests at a fractional scale as part of our standard testing.
20-12-2016

I still see these test failures with the fix for JDK-8170140.
01-12-2016

I will test with the patch for that fix, and if it causes the failing tests to now pass, I will close this as a duplicate.
30-11-2016

Is it related to https://bugs.openjdk.java.net/browse/JDK-8170140
30-11-2016

When running with the newly-integrated Marlin rasterizer, by setting "-Dprism.marlinrasterizer=true", we get two additional failures: RegionBackgroundFillUITest.testScenario3 RegionBackgroundFillUITest.testScenario4
18-11-2016