8012569: TEST_BUG: java/awt/GraphicsDevice/CheckDisplayModes.java fails
Reviewed-by: anthony, serb
--- 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);