test/java/awt/Window/ShapedAndTranslucentWindows/Translucent.java

Print this page

        

@@ -24,21 +24,32 @@
 import java.awt.*;
 
 /*
  * @test
  * @summary Check if translucent window is dragged and resized
-            correctly.
+ *          correctly.
+ *
+ * Test Description: Check if TRANSLUCENT translucency type is supported
+ *      on the current platform. Proceed if they are supported. Create
+ *      a window and apply opacity of 0.3. Drag and resize the window
+ *      using AWT Robot and verify that translucency is not affected.
+ *      Make the window appear on top of a known background. Repeat this
+ *      for Window, Dialog, Frame.
+ * Expected Result: If TRANSLUCENT translucency type is supported, the
+ *      window should show the background. Dragging and resizing
+ *      shouldn't affect the translucency.
+ *
+ * @author mrkam
  * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
  * @library ../../../../lib/testlibrary
  * @build Common ExtendedRobot
  * @run main Translucent
  */
 public class Translucent extends Common {
 
     public static void main(String[] args) throws Exception {
-        if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.TRANSLUCENT) &&
-            checkTranslucencyMode(GraphicsDevice.WindowTranslucency.PERPIXEL_TRANSPARENT))
+        if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.TRANSLUCENT))
             for (Class<Window> windowClass: WINDOWS_TO_TEST){
                 new Translucent(windowClass).doTest();
             }
     }