8012569: TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails
authorkshefov
Tue, 11 Jun 2013 14:14:31 +0400
changeset 18124 b036434f6675
parent 18123 cfe3f489e77a
child 18125 808eb60c2116
8012569: TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails Reviewed-by: anthony, serb
jdk/test/java/awt/GraphicsDevice/CheckDisplayModes.java
--- a/jdk/test/java/awt/GraphicsDevice/CheckDisplayModes.java	Mon Jun 10 16:44:40 2013 +0400
+++ b/jdk/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);