test/jdk/java/awt/GraphicsDevice/IncorrectDisplayModeExitFullscreen.java
changeset 57522 af678f2593e2
parent 52739 7199c4da1a6f
equal deleted inserted replaced
57521:d0c2e34bae88 57522:af678f2593e2
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    44 
    44 
    45         final GraphicsDevice[] devices =
    45         final GraphicsDevice[] devices =
    46                 GraphicsEnvironment.getLocalGraphicsEnvironment()
    46                 GraphicsEnvironment.getLocalGraphicsEnvironment()
    47                                    .getScreenDevices();
    47                                    .getScreenDevices();
    48         if (devices.length < 2 || devices[0].getDisplayModes().length < 2
    48         if (devices.length < 2 || devices[0].getDisplayModes().length < 2
       
    49                 || !devices[0].isDisplayChangeSupported()
    49                 || !devices[0].isFullScreenSupported()
    50                 || !devices[0].isFullScreenSupported()
    50                 || !devices[1].isFullScreenSupported()) {
    51                 || !devices[1].isFullScreenSupported()) {
    51             System.err.println("Testcase is not applicable");
    52             System.err.println("Testcase is not applicable");
    52             return;
    53             return;
    53         }
    54         }