# HG changeset patch # User sveerabhadra # Date 1540542837 -19800 # Node ID e57405e79cd709d6b94de7d43b0f214d31427954 # Parent 7335ac58f32b807131c44ec7ae6c496504d68629 8210057: Enable different look and feels in SwingSet3 demo test InternalFrameDemoTest Reviewed-by: serb Contributed-by: gauri.patil@oracle.com diff -r 7335ac58f32b -r e57405e79cd7 test/jdk/sanity/client/SwingSet/src/InternalFrameDemoTest.java --- a/test/jdk/sanity/client/SwingSet/src/InternalFrameDemoTest.java Fri Oct 26 13:52:08 2018 +0530 +++ b/test/jdk/sanity/client/SwingSet/src/InternalFrameDemoTest.java Fri Oct 26 14:03:57 2018 +0530 @@ -45,10 +45,12 @@ import javax.swing.JDesktopPane; import javax.swing.JInternalFrame; +import javax.swing.UIManager; import org.jemmy2ext.JemmyExt; import org.jtregext.GuiTestListener; import org.netbeans.jemmy.ClassReference; +import org.netbeans.jemmy.JemmyProperties; import org.netbeans.jemmy.operators.ComponentOperator; import org.netbeans.jemmy.operators.JButtonOperator; import org.netbeans.jemmy.operators.JCheckBoxOperator; @@ -74,7 +76,7 @@ * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.internalframe.InternalFrameDemo - * @run testng InternalFrameDemoTest + * @run testng/timeout=600 InternalFrameDemoTest */ @Listeners(GuiTestListener.class) public class InternalFrameDemoTest { @@ -92,8 +94,12 @@ * * @throws Exception */ - @Test - public void test() throws Exception { + @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class) + public void test(String lookAndFeel) throws Exception { + UIManager.setLookAndFeel(lookAndFeel); + // initializing internal frame driver for each L&F + JemmyProperties.setCurrentDispatchingModel( + JemmyProperties.getCurrentDispatchingModel()); new ClassReference(InternalFrameDemo.class.getCanonicalName()).startApplication();