Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289611

MouseLocationOnScreenTest sometimes fails on Mac M1

    XMLWordPrintable

Details

    Description

      The robot test MouseLocationOnScreenTest consistently fails on Mac M1. On my system, the following error occurs:

      MouseLocationOnScreenTest > testMouseLocation FAILED
          java.lang.AssertionError: expected:<657> but was:<656>
              at org.junit.Assert.fail(Assert.java:89)
              at org.junit.Assert.failNotEquals(Assert.java:835)
              at org.junit.Assert.assertEquals(Assert.java:647)
              at org.junit.Assert.assertEquals(Assert.java:633)
              at test.robot.javafx.scene.MouseLocationOnScreenTest.validate(MouseLocationOnScreenTest.java:130)
              at test.robot.javafx.scene.MouseLocationOnScreenTest.edge(MouseLocationOnScreenTest.java:139)
              at test.robot.javafx.scene.MouseLocationOnScreenTest.lambda$testMouseLocation$1(MouseLocationOnScreenTest.java:84)

      This test moves the mouse to all locations along the edge of the screen. The problem is that the M1 has a cutout for the camera, which prevents the mouse from being moved into that area.

      A probable fix is to use the visual bounds of the screen instead of the bounds.

      Attachments

        Issue Links

          Activity

            People

              angorya Andy Goryachev
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: