changeset 7333:d14523c12f20

8012569: TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails Reviewed-by: anthony, serb
author kshefov
date Tue, 11 Jun 2013 14:14:31 +0400
parents 2d5bb70458b6
children 9ab7973d5907
files test/java/awt/GraphicsDevice/CheckDisplayModes.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/GraphicsDevice/CheckDisplayModes.java	Mon Jun 10 16:44:40 2013 +0400
+++ b/test/java/awt/GraphicsDevice/CheckDisplayModes.java	Tue Jun 11 14:14:31 2013 +0400
@@ -37,6 +37,10 @@
     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);