mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-09 06:28:49 +00:00
8211443: Enable different look and feels in SwingSet3 demo test SplitPaneDemoTest
Reviewed-by: serb
This commit is contained in:
parent
a445441580
commit
d49ba47e9b
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2018, 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
|
||||
@ -27,6 +27,7 @@ import static com.sun.swingset3.demos.splitpane.SplitPaneDemo.*;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.KeyEvent;
|
||||
import javax.swing.JSplitPane;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import static org.jemmy2ext.JemmyExt.*;
|
||||
|
||||
@ -59,13 +60,14 @@ import static org.testng.AssertJUnit.*;
|
||||
* java.logging
|
||||
* @build org.jemmy2ext.JemmyExt
|
||||
* @build com.sun.swingset3.demos.splitpane.SplitPaneDemo
|
||||
* @run testng SplitPaneDemoTest
|
||||
* @run testng/timeout=600 SplitPaneDemoTest
|
||||
*/
|
||||
@Listeners(GuiTestListener.class)
|
||||
public class SplitPaneDemoTest {
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
@Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class)
|
||||
public void test(String lookAndFeel) throws Exception {
|
||||
UIManager.setLookAndFeel(lookAndFeel);
|
||||
|
||||
new ClassReference(SplitPaneDemo.class.getCanonicalName()).startApplication();
|
||||
|
||||
@ -73,21 +75,29 @@ public class SplitPaneDemoTest {
|
||||
|
||||
JSplitPaneOperator splitPane = new JSplitPaneOperator(frame);
|
||||
|
||||
// Toggle OneTouch Expandable
|
||||
checkOneTouch(frame, splitPane, true);
|
||||
checkOneTouch(frame, splitPane, false);
|
||||
// OneTouch feature is not available in GTK L&F
|
||||
if(!"GTK".equals(UIManager.getLookAndFeel().getID())) {
|
||||
// Toggle OneTouch Expandable
|
||||
checkOneTouch(frame, splitPane, true);
|
||||
checkOneTouch(frame, splitPane, false);
|
||||
}
|
||||
|
||||
// Check changing divider size to minimum and maximum values
|
||||
changeDividerSize(frame, splitPane, 50);
|
||||
changeDividerSize(frame, splitPane, 6);
|
||||
|
||||
// Check moving the divider
|
||||
checkDividerMoves(frame, splitPane, false);
|
||||
checkDividerMoves(frame, splitPane, true);
|
||||
|
||||
// Check different minumum Day/Night sizes
|
||||
changeMinimumSizes(frame, splitPane, 100);
|
||||
changeMinimumSizes(frame, splitPane, 0);
|
||||
// TODO Skipping this code for Motif L&F as the fix for "CODETOOLS-7902324"
|
||||
// is deferred now
|
||||
if(!("Motif".equals(UIManager.getLookAndFeel().getID()))) {
|
||||
// Check moving the divider
|
||||
checkDividerMoves(frame, splitPane, false);
|
||||
checkDividerMoves(frame, splitPane, true);
|
||||
|
||||
// Check different minumum Day/Night sizes
|
||||
changeMinimumSizes(frame, splitPane, 100);
|
||||
changeMinimumSizes(frame, splitPane, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Check for different day and night minimum size
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user