6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows
Reviewed-by: prr
This commit is contained in:
parent
273c7329e7
commit
f56396f168
@ -179,7 +179,6 @@ java/awt/Mixing/NonOpaqueInternalFrame.java 7124549 macosx-all
|
||||
java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java 6829264 generic-all
|
||||
java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java 8080982 generic-all
|
||||
java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java 8079268 linux-all
|
||||
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all
|
||||
java/awt/Toolkit/RealSync/Test.java 6849383 linux-all
|
||||
java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java 8159252 windows-all
|
||||
java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java 8072110 macosx-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,7 +51,6 @@ public class ScreenInsetsTest
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
GraphicsDevice[] gds = ge.getScreenDevices();
|
||||
for (GraphicsDevice gd : gds) {
|
||||
|
||||
GraphicsConfiguration gc = gd.getDefaultConfiguration();
|
||||
Rectangle gcBounds = gc.getBounds();
|
||||
Insets gcInsets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
|
||||
@ -100,7 +99,13 @@ public class ScreenInsetsTest
|
||||
gcBounds.y + gcBounds.height - fBounds.y - fBounds.height,
|
||||
gcBounds.x + gcBounds.width - fBounds.x - fBounds.width);
|
||||
|
||||
if (!expected.equals(gcInsets))
|
||||
// On Windows 10 and up system allows undecorated maximized windows
|
||||
// to be placed over the taskbar so calculated insets might
|
||||
// be smaller than reported ones depending on the taskbar position
|
||||
if (gcInsets.top < expected.top
|
||||
|| gcInsets.bottom < expected.bottom
|
||||
|| gcInsets.left < expected.left
|
||||
|| gcInsets.right < expected.right)
|
||||
{
|
||||
passed = false;
|
||||
System.err.println("Wrong insets for GraphicsConfig: " + gc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user