test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java
changeset 52085 26c3104c936d
parent 50139 6e7126d9e99f
child 54227 17da5f618aaf
equal deleted inserted replaced
52084:ec4f2762b234 52085:26c3104c936d
    25 import static org.testng.Assert.assertTrue;
    25 import static org.testng.Assert.assertTrue;
    26 
    26 
    27 import javax.swing.JCheckBoxMenuItem;
    27 import javax.swing.JCheckBoxMenuItem;
    28 import javax.swing.JRadioButtonMenuItem;
    28 import javax.swing.JRadioButtonMenuItem;
    29 import javax.swing.ToolTipManager;
    29 import javax.swing.ToolTipManager;
       
    30 import javax.swing.UIManager;
    30 import javax.swing.plaf.metal.MetalLookAndFeel;
    31 import javax.swing.plaf.metal.MetalLookAndFeel;
    31 
    32 
    32 import org.jtregext.GuiTestListener;
    33 import org.jtregext.GuiTestListener;
    33 import org.netbeans.jemmy.ClassReference;
    34 import org.netbeans.jemmy.ClassReference;
    34 import org.netbeans.jemmy.ComponentChooser;
    35 import org.netbeans.jemmy.ComponentChooser;
    56  * @library /sanity/client/lib/SwingSet2/src
    57  * @library /sanity/client/lib/SwingSet2/src
    57  * @modules java.desktop
    58  * @modules java.desktop
    58  *          java.logging
    59  *          java.logging
    59  * @build org.jemmy2ext.JemmyExt
    60  * @build org.jemmy2ext.JemmyExt
    60  * @build SwingSet2
    61  * @build SwingSet2
    61  * @run testng SwingSet2DemoTest
    62  * @run testng/timeout=600 SwingSet2DemoTest
    62  */
    63  */
    63 @Listeners(GuiTestListener.class)
    64 @Listeners(GuiTestListener.class)
    64 public class SwingSet2DemoTest {
    65 public class SwingSet2DemoTest {
    65 
    66 
    66     private static final String OCEAN_THEME_NAME = "Ocean";
    67     private static final String OCEAN_THEME_NAME = "Ocean";
    72      * themes. Testing of all other main swing components are covered in
    73      * themes. Testing of all other main swing components are covered in
    73      * SwingSet3 demo tests.
    74      * SwingSet3 demo tests.
    74      *
    75      *
    75      * @throws Exception
    76      * @throws Exception
    76      */
    77      */
    77     @Test
    78     @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class)
    78     public void test() throws Exception {
    79     public void test(String lookAndFeel) throws Exception {
       
    80         UIManager.setLookAndFeel(lookAndFeel);
    79 
    81 
    80         new ClassReference(SwingSet2.class.getCanonicalName()).startApplication();
    82         new ClassReference(SwingSet2.class.getCanonicalName()).startApplication();
    81         JFrameOperator frameOperator = new JFrameOperator(SwingSet2.FRAME_TITLE);
    83         JFrameOperator frameOperator = new JFrameOperator(SwingSet2.FRAME_TITLE);
    82         frameOperator.setComparator(EXACT_STRING_COMPARATOR);
    84         frameOperator.setComparator(EXACT_STRING_COMPARATOR);
    83 
    85