mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-20 07:15:31 +00:00
8012569: TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails
Reviewed-by: anthony, serb
This commit is contained in:
parent
3039fb09eb
commit
1963dde59a
@ -37,6 +37,10 @@ public class CheckDisplayModes {
|
||||
public static void main(String[] args) {
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
GraphicsDevice graphicDevice = ge.getDefaultScreenDevice();
|
||||
if (!graphicDevice.isDisplayChangeSupported()) {
|
||||
System.err.println("Display mode change is not supported on this host. Test is considered passed.");
|
||||
return;
|
||||
}
|
||||
DisplayMode defaultDisplayMode = graphicDevice.getDisplayMode();
|
||||
checkDisplayMode(defaultDisplayMode);
|
||||
graphicDevice.setDisplayMode(defaultDisplayMode);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user