7077259: [TEST_BUG] [macosx] Test work correctly only when default L&F is Metal
authorkshefov
Mon, 04 Feb 2013 16:01:06 +0000
changeset 15508 6b53b3a93372
parent 15507 9472e3b6d1d4
child 15509 45fdd762011d
child 15633 3b73e7d1d7e5
7077259: [TEST_BUG] [macosx] Test work correctly only when default L&F is Metal Reviewed-by: serb, alexsch
jdk/test/javax/swing/JSlider/4252173/bug4252173.java
jdk/test/javax/swing/JSpinner/6532833/bug6532833.java
jdk/test/javax/swing/plaf/metal/MetalSliderUI/Test6657026.java
--- a/jdk/test/javax/swing/JSlider/4252173/bug4252173.java	Mon Feb 04 13:54:53 2013 +0000
+++ b/jdk/test/javax/swing/JSlider/4252173/bug4252173.java	Mon Feb 04 16:01:06 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,11 +22,11 @@
  */
 
 /* @test
-   @bug 4252173
-   @summary Inability to reuse the HorizontalSliderThumbIcon
-   @author Pavel Porvatov
-   @run main bug4252173
-*/
+ * @bug 4252173 7077259
+ * @summary Inability to reuse the HorizontalSliderThumbIcon
+ * @author Pavel Porvatov
+ * @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel bug4252173
+ */
 
 import javax.swing.*;
 import javax.swing.plaf.metal.DefaultMetalTheme;
--- a/jdk/test/javax/swing/JSpinner/6532833/bug6532833.java	Mon Feb 04 13:54:53 2013 +0000
+++ b/jdk/test/javax/swing/JSpinner/6532833/bug6532833.java	Mon Feb 04 16:01:06 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,11 @@
  */
 
 /* @test
-   @bug 6532833
-   @summary PIT: Metal LAF - The right side border is not shown for the Spinner after the removing the buttons
-   @author Pavel Porvatov
-*/
+ * @bug 6532833 7077259
+ * @summary PIT: Metal LAF - The right side border is not shown for the Spinner after the removing the buttons
+ * @author Pavel Porvatov
+ * @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel bug6532833
+ */
 
 import javax.swing.*;
 import java.awt.*;
--- a/jdk/test/javax/swing/plaf/metal/MetalSliderUI/Test6657026.java	Mon Feb 04 13:54:53 2013 +0000
+++ b/jdk/test/javax/swing/plaf/metal/MetalSliderUI/Test6657026.java	Mon Feb 04 16:01:06 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,22 +23,21 @@
 
 /*
  * @test
- * @bug 6657026
+ * @bug 6657026 7077259
  * @summary Tests shared MetalSliderUI in different application contexts
  * @author Sergey Malenkov
+ * @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel Test6657026
  */
 
-import sun.awt.SunToolkit;
-
 import javax.swing.JSlider;
 import javax.swing.UIManager;
 import javax.swing.plaf.metal.MetalLookAndFeel;
 import javax.swing.plaf.metal.MetalSliderUI;
+import sun.awt.SunToolkit;
 
 public class Test6657026 extends MetalSliderUI implements Runnable {
 
     public static void main(String[] args) throws Exception {
-        UIManager.setLookAndFeel(new MetalLookAndFeel());
         JSlider slider = new JSlider();
         test(slider);