You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/05/26 11:31:15 UTC
svn commit: r948377 [13/21] - in /harmony/enhanced/java/branches/mrh:
classlib/make/ classlib/modules/accessibility/make/
classlib/modules/annotation/make/ classlib/modules/applet/make/
classlib/modules/archive/make/ classlib/modules/archive/src/test/j...
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboBoxUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboBoxUITest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboBoxUITest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboBoxUITest.java Wed May 26 09:31:07 2010
@@ -36,6 +36,7 @@ import javax.swing.ListCellRenderer;
import javax.swing.SwingConstants;
import javax.swing.SwingTestCase;
import javax.swing.plaf.ComponentUI;
+import tests.support.Support_Excludes;
public class BasicComboBoxUITest extends SwingTestCase {
private BasicComboBoxUI ui;
@@ -63,11 +64,19 @@ public class BasicComboBoxUITest extends
}
public void testBasicComboBoxUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(ui.currentValuePane);
assertFalse(ui.currentValuePane.isVisible());
}
public void testCreateUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ComponentUI ui1 = BasicComboBoxUI.createUI(new JComboBox());
assertNotNull(ui1);
ComponentUI ui2 = BasicComboBoxUI.createUI(new JComboBox());
@@ -76,6 +85,10 @@ public class BasicComboBoxUITest extends
}
public void testCreatePopup() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.popup);
ui.comboBox = comboBox;
assertNotSame(ui.createPopup(), ui.createPopup());
@@ -83,48 +96,84 @@ public class BasicComboBoxUITest extends
}
public void testCreateKeyListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createKeyListener() instanceof BasicComboBoxUI.KeyHandler);
}
}
public void testCreateFocusListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createFocusListener() instanceof BasicComboBoxUI.FocusHandler);
}
}
public void testCreateListDataListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createListDataListener() instanceof BasicComboBoxUI.ListDataHandler);
}
}
public void testCreateItemListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.createItemListener());
}
public void testCreatePropertyChangeListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createPropertyChangeListener() instanceof BasicComboBoxUI.PropertyChangeHandler);
}
}
public void testCreateLayoutManager() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createLayoutManager() instanceof BasicComboBoxUI.ComboBoxLayoutManager);
}
}
public void testCreateRenderer() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertTrue(ui.createRenderer() instanceof BasicComboBoxRenderer.UIResource);
}
public void testCreateEditor() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertTrue(ui.createEditor().getClass() == BasicComboBoxEditor.UIResource.class);
}
public void testAddRemoveEditor() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.uninstallComponents();
assertEquals(0, ui.comboBox.getComponentCount());
@@ -139,6 +188,10 @@ public class BasicComboBoxUITest extends
}
public void testCreateArrowButton() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JButton arrowButton = ui.createArrowButton();
assertTrue(arrowButton instanceof BasicArrowButton);
assertEquals(SwingConstants.SOUTH, ((BasicArrowButton) arrowButton).getDirection());
@@ -146,6 +199,10 @@ public class BasicComboBoxUITest extends
}
public void testIsPopupVisible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createVisibleCombo();
ui.popup = new BasicComboPopup(comboBox);
assertFalse(ui.isPopupVisible(comboBox));
@@ -156,6 +213,10 @@ public class BasicComboBoxUITest extends
}
public void testSetPopupVisible() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createVisibleCombo();
ui.popup = new BasicComboPopup(comboBox);
assertFalse(ui.isPopupVisible(comboBox));
@@ -166,6 +227,10 @@ public class BasicComboBoxUITest extends
}
public void testIsFocusTraversable() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
assertTrue(ui.isFocusTraversable(comboBox));
comboBox.setEditable(true);
@@ -173,6 +238,10 @@ public class BasicComboBoxUITest extends
}
public void testGetPreferredSize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.listBox = ui.popup.getList();
@@ -184,6 +253,10 @@ public class BasicComboBoxUITest extends
}
public void testGetMinimumSize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.installUI(comboBox);
comboBox.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
@@ -205,6 +278,10 @@ public class BasicComboBoxUITest extends
}
public void testSelectNextPossibleValue() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
assertEquals(-1, comboBox.getSelectedIndex());
ui.selectNextPossibleValue();
@@ -222,6 +299,10 @@ public class BasicComboBoxUITest extends
}
public void testSelectPreviousPossibleValue() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
assertEquals(-1, comboBox.getSelectedIndex());
ui.selectPreviousPossibleValue();
@@ -242,6 +323,10 @@ public class BasicComboBoxUITest extends
}
public void testToggleOpenClose() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createVisibleCombo();
ui.popup = new BasicComboPopup(comboBox);
assertFalse(ui.isPopupVisible(comboBox));
@@ -252,6 +337,10 @@ public class BasicComboBoxUITest extends
}
public void testRectangleForCurrentValue() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
Rectangle r1 = ui.rectangleForCurrentValue();
assertEquals(new Rectangle(0, 0, 0, 0), r1);
@@ -261,6 +350,10 @@ public class BasicComboBoxUITest extends
// Regression test for HARMONY-2896
public void testGetAccessibleChildrenCount() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = null;
try {
ui.getAccessibleChildrenCount(new JComponent() {});
@@ -277,6 +370,10 @@ public class BasicComboBoxUITest extends
}
public void testGetInsets() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
assertEquals(comboBox.getInsets(), ui.getInsets());
comboBox.setBorder(BorderFactory.createEmptyBorder(1, 2, 3, 4));
@@ -285,6 +382,10 @@ public class BasicComboBoxUITest extends
}
public void testGetDefaultSize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.listBox = new BasicComboPopup(comboBox).getList();
if (isHarmony()) {
@@ -298,6 +399,10 @@ public class BasicComboBoxUITest extends
}
public void testGetDisplaySize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.listBox = ui.popup.getList();
@@ -315,6 +420,10 @@ public class BasicComboBoxUITest extends
}
public void testInstallDefaults() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
comboBox.setFont(null);
comboBox.setForeground(null);
comboBox.setBackground(null);
@@ -328,6 +437,10 @@ public class BasicComboBoxUITest extends
}
public void testInstallUninstallListeners() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.uninstallListeners();
@@ -373,6 +486,10 @@ public class BasicComboBoxUITest extends
}
public void testInstallUninstallComponents() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.uninstallComponents();
@@ -397,6 +514,10 @@ public class BasicComboBoxUITest extends
}
public void testInstallUninstallUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.uninstallUI(null);
@@ -412,12 +533,20 @@ public class BasicComboBoxUITest extends
}
public void testPaintCurrentValueBackground() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.paintCurrentValueBackground(createTestGraphics(), new Rectangle(0, 0, 10, 10), true);
}
// Regression test for HARMONY-2898
public void testPaintCurrentValueBackground_Null() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = null;
try {
ui.paintCurrentValueBackground(createTestGraphics(), new Rectangle(0, 0, 10, 10), true);
@@ -428,6 +557,10 @@ public class BasicComboBoxUITest extends
}
public void testPaintCurrentValue() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.listBox = ui.popup.getList();
@@ -435,6 +568,10 @@ public class BasicComboBoxUITest extends
}
public void testPaint() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.popup = new BasicComboPopup(comboBox);
ui.listBox = ui.popup.getList();
@@ -442,6 +579,10 @@ public class BasicComboBoxUITest extends
}
public void testConfigureUnconfigureEditor() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.comboBox = comboBox;
ui.editor = new JTextField();
int focusListenerCount = ui.editor.getFocusListeners().length;
@@ -452,6 +593,10 @@ public class BasicComboBoxUITest extends
}
public void testConfigureUnconfigureArrowButton() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.configureArrowButton();
ui.unconfigureArrowButton();
ui.popup = new BasicComboPopup(comboBox);
@@ -469,6 +614,10 @@ public class BasicComboBoxUITest extends
}
public void testPropertyChangeHandler() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(comboBox);
Font newFont = comboBox.getFont().deriveFont(30f);
comboBox.setFont(newFont);
@@ -497,12 +646,20 @@ public class BasicComboBoxUITest extends
}
public void testRemove_NullEditor() throws Exception{
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Regression test for Harmony-1749
BasicComboBoxUI cb = new BasicComboBoxUI();
cb.removeEditor();
}
public void testComboBoxLayoutManager() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
BasicComboBoxUI ui = new BasicComboBoxUI();
BasicComboBoxUI.ComboBoxLayoutManager b = ui.new ComboBoxLayoutManager();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboPopupTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboPopupTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboPopupTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicComboPopupTest.java Wed May 26 09:31:07 2010
@@ -31,6 +31,7 @@ import javax.swing.SwingTestCase;
import javax.swing.border.LineBorder;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
+import tests.support.Support_Excludes;
public class BasicComboPopupTest extends SwingTestCase {
private BasicComboPopup popup;
@@ -55,6 +56,10 @@ public class BasicComboPopupTest extends
}
public void testBasicComboPopup() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(popup.comboBox);
assertNotNull(popup.list);
assertNotNull(popup.scroller);
@@ -73,6 +78,10 @@ public class BasicComboPopupTest extends
}
public void testShowHide() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createVisibleComboBox();
popup.show();
assertTrue(popup.isShowing());
@@ -87,6 +96,10 @@ public class BasicComboPopupTest extends
}
public void testGetList() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(popup.getList());
assertEquals(popup.list, popup.getList());
JList newList = new JList();
@@ -95,6 +108,10 @@ public class BasicComboPopupTest extends
}
public void testGetMouseListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.mouseListener);
assertEquals(popup.getMouseListener(), popup.mouseListener);
if (isHarmony()) {
@@ -103,6 +120,10 @@ public class BasicComboPopupTest extends
}
public void testGetMouseMotionListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.mouseMotionListener);
assertEquals(popup.getMouseMotionListener(), popup.mouseMotionListener);
if (isHarmony()) {
@@ -111,11 +132,19 @@ public class BasicComboPopupTest extends
}
public void testGetKeyListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.keyListener);
assertNull(popup.getKeyListener());
}
public void testUninstallingUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
comboBox = new JComboBox();
int mouseListenerCount = comboBox.getMouseListeners().length;
int mouseMotionListenerCount = comboBox.getMouseMotionListeners().length;
@@ -138,6 +167,10 @@ public class BasicComboPopupTest extends
}
public void testFirePopupMenuWillBecomeVisibleInvisibleCanceled() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
PopupMenuController comboController = new PopupMenuController();
PopupMenuController popupController = new PopupMenuController();
popup.addPopupMenuListener(popupController);
@@ -164,6 +197,10 @@ public class BasicComboPopupTest extends
}
public void testCreateMouseListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(popup.createMouseListener().getClass() == BasicComboPopup.InvocationMouseHandler.class);
assertFalse(popup.createMouseListener() == popup.createMouseListener());
@@ -171,6 +208,10 @@ public class BasicComboPopupTest extends
}
public void testCreateMouseMotionListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(popup.createMouseMotionListener().getClass() == BasicComboPopup.InvocationMouseMotionHandler.class);
assertFalse(popup.createMouseMotionListener() == popup.createMouseMotionListener());
@@ -178,20 +219,36 @@ public class BasicComboPopupTest extends
}
public void testCreateKeyListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.createKeyListener());
}
public void testCreateListSelectionListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.createListSelectionListener());
assertNull(popup.listSelectionListener);
}
public void testCreateListDataListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.createListDataListener());
assertNull(popup.listDataListener);
}
public void testCreateListMouseListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(popup.listMouseListener.getClass() == BasicComboPopup.ListMouseHandler.class);
assertTrue(popup.createListMouseListener().getClass() == BasicComboPopup.ListMouseHandler.class);
@@ -200,6 +257,10 @@ public class BasicComboPopupTest extends
}
public void testCreateListMouseMotionListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(popup.listMouseMotionListener.getClass() == BasicComboPopup.ListMouseMotionHandler.class);
assertTrue(popup.createListMouseMotionListener().getClass() == BasicComboPopup.ListMouseMotionHandler.class);
@@ -209,6 +270,10 @@ public class BasicComboPopupTest extends
}
public void testCreatePropertyChangeListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(popup.propertyChangeListener.getClass() == BasicComboPopup.PropertyChangeHandler.class);
assertTrue(popup.createPropertyChangeListener().getClass() == BasicComboPopup.PropertyChangeHandler.class);
@@ -218,6 +283,10 @@ public class BasicComboPopupTest extends
}
public void testCreateItemListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(popup.itemListener.getClass() == BasicComboPopup.ItemHandler.class);
assertTrue(popup.createItemListener().getClass() == BasicComboPopup.ItemHandler.class);
@@ -226,11 +295,19 @@ public class BasicComboPopupTest extends
}
public void testCreateList() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotSame(popup.createList(), popup.createList());
assertNotSame(popup.createList(), popup.list);
}
public void testConfigureList() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
popup.list = new JList();
int mouseListenerCount = popup.list.getMouseListeners().length;
int mouseMotionListenerCount = popup.list.getMouseMotionListeners().length;
@@ -241,22 +318,38 @@ public class BasicComboPopupTest extends
}
public void testCreateScroller() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(popup.scroller);
assertNotSame(popup.createScroller(), popup.createScroller());
assertNotSame(popup.createScroller(), popup.scroller);
}
public void testConfigureScroller() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
popup.scroller = new JScrollPane();
popup.configureScroller();
}
public void testInstallUninstallComboBoxModelListeners() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
popup.installComboBoxModelListeners(null);
popup.uninstallComboBoxModelListeners(null);
}
public void testInstallUninstallComboBoxListeners() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
int mouseListenerCount = comboBox.getMouseListeners().length;
int mouseMotionListenerCount = comboBox.getMouseMotionListeners().length;
int itemListenerCount = comboBox.getItemListeners().length;
@@ -272,6 +365,10 @@ public class BasicComboPopupTest extends
}
public void testInstallUninstallKeyboardActions() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
int count = popup.comboBox.getActionMap().allKeys().length;
popup.uninstallKeyboardActions();
assertEquals(count, popup.comboBox.getActionMap().allKeys().length);
@@ -280,6 +377,10 @@ public class BasicComboPopupTest extends
}
public void testInstallListListeners() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
int mouseListenerCount = popup.list.getMouseListeners().length;
int mouseMotionListenerCount = popup.list.getMouseMotionListeners().length;
int selectionListenerCount = popup.list.getListSelectionListeners().length;
@@ -290,10 +391,18 @@ public class BasicComboPopupTest extends
}
public void testIsFocusTraversable() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(popup.isFocusTraversable());
}
public void testStartStopAutoscrolloing() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(popup.autoscrollTimer);
assertFalse(popup.isAutoScrolling);
popup.startAutoScrolling(BasicComboPopup.SCROLL_UP);
@@ -309,6 +418,10 @@ public class BasicComboPopupTest extends
}
public void testAutoScrollUpDown() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
createVisibleComboBox();
popup.show();
@@ -327,12 +440,20 @@ public class BasicComboPopupTest extends
}
public void testGetAccessibleContext() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNotNull(popup.getAccessibleContext());
// Is not clear how it should be
// assertEquals(popup.comboBox, popup.getAccessibleContext().getAccessibleParent());
}
public void testTogglePopup() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createVisibleComboBox();
assertFalse(popup.isShowing());
popup.togglePopup();
@@ -342,6 +463,10 @@ public class BasicComboPopupTest extends
}
public void testConvertMouseEvent() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
MouseEvent original = createMouseEvent(0, 0);
assertNotSame(original, popup.convertMouseEvent(original));
comboBox.setLocation(0, 0);
@@ -357,6 +482,10 @@ public class BasicComboPopupTest extends
}
public void testGetPopupHeightForRowCount() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
popup = new BasicComboPopup(new JComboBox());
assertEquals(100, popup.getPopupHeightForRowCount(0));
assertEquals(100, popup.getPopupHeightForRowCount(1));
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicDesktopPaneUIActionsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicDesktopPaneUIActionsTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicDesktopPaneUIActionsTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicDesktopPaneUIActionsTest.java Wed May 26 09:31:07 2010
@@ -27,6 +27,7 @@ import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.SwingTestCase;
+import tests.support.Support_Excludes;
public class BasicDesktopPaneUIActionsTest extends SwingTestCase {
private JFrame frame;
@@ -65,6 +66,10 @@ public class BasicDesktopPaneUIActionsTe
}
public void testNavigateAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (!isHarmony()) {
return;
}
@@ -96,24 +101,40 @@ public class BasicDesktopPaneUIActionsTe
}
public void testCloseAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
AbstractAction action = ui.new CloseAction();
action.actionPerformed(null);
assertTrue(desktop.getSelectedFrame().isClosed());
}
public void testMaximizeAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
AbstractAction action = ui.new MaximizeAction();
action.actionPerformed(null);
assertTrue(desktop.getSelectedFrame().isMaximum());
}
public void testMinimizeAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
AbstractAction action = ui.new MinimizeAction();
action.actionPerformed(null);
assertTrue(desktop.getSelectedFrame().isIcon());
}
public void testOpenAction() throws PropertyVetoException {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
AbstractAction action = ui.new OpenAction();
desktop.getSelectedFrame().setMaximum(true);
action.actionPerformed(null);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicEditorPaneUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicEditorPaneUITest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicEditorPaneUITest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicEditorPaneUITest.java Wed May 26 09:31:07 2010
@@ -27,6 +27,7 @@ import javax.swing.JTextField;
import javax.swing.SwingTestCase;
import javax.swing.plaf.ComponentUI;
import javax.swing.text.DefaultEditorKit;
+import tests.support.Support_Excludes;
public class BasicEditorPaneUITest extends SwingTestCase {
JEditorPane jep;
@@ -54,6 +55,10 @@ public class BasicEditorPaneUITest exten
}
public void testCreateUI() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ComponentUI ui1 = BasicEditorPaneUI.createUI(jep);
ComponentUI ui2 = BasicEditorPaneUI.createUI(jep);
assertTrue(ui1 instanceof BasicEditorPaneUI);
@@ -65,6 +70,10 @@ public class BasicEditorPaneUITest exten
}
public void testGetEditorKit() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(jep.getEditorKit(), ui.getEditorKit(jep));
jep.setContentType("text/html");
assertEquals(jep.getEditorKit(), ui.getEditorKit(jep));
@@ -80,6 +89,10 @@ public class BasicEditorPaneUITest exten
}
public void testGetPropertyPrefix() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals("EditorPane", ui.getPropertyPrefix());
}
@@ -101,6 +114,10 @@ public class BasicEditorPaneUITest exten
}
public void testPropertyChange() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Action a1[] = jep.getActions();
Object a2[] = jep.getActionMap().getParent().getParent().allKeys();
checkNames(a1, a2);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicFileChooserUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicFileChooserUITest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicFileChooserUITest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicFileChooserUITest.java Wed May 26 09:31:07 2010
@@ -26,6 +26,7 @@ import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.SwingTestCase;
import javax.swing.UIManager;
+import tests.support.Support_Excludes;
public class BasicFileChooserUITest extends SwingTestCase {
private BasicFileChooserUI ui;
@@ -45,6 +46,10 @@ public class BasicFileChooserUITest exte
}
public void testGetAcceptAllFileFilter() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(fc);
assertNotNull(ui.getAcceptAllFileFilter(fc));
assertEquals(UIManager.getString("FileChooser.acceptAllFileFilterText"), ui
@@ -53,6 +58,10 @@ public class BasicFileChooserUITest exte
}
public void testGetApproveButtonText() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(fc);
assertEquals(UIManager.get("FileChooser.openDialogTitleText"), ui.getDialogTitle(fc));
assertEquals(UIManager.get("FileChooser.openButtonText"), ui.getApproveButtonText(fc));
@@ -75,6 +84,10 @@ public class BasicFileChooserUITest exte
}
public void testGetApproveButtonToolTipText() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
javax.swing.plaf.basic.BasicFileChooserUI b =
new javax.swing.plaf.basic.BasicFileChooserUI(new JFileChooser(""));
@@ -86,11 +99,19 @@ public class BasicFileChooserUITest exte
}
public void testGetModel() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(fc);
assertNotNull(ui.getModel());
}
public void testBasicFileView() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
BasicFileChooserUI.BasicFileView fileView = new BasicFileChooserUI(fc).new BasicFileView();
assertNotNull(fileView);
assertEquals(0, fileView.iconCache.size());
@@ -112,15 +133,27 @@ public class BasicFileChooserUITest exte
}
public void testCreatePropertyChangeListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.createPropertyChangeListener(fc));
}
public void testGetApproveButton() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(fc);
assertNull(ui.getApproveButton(fc));
}
public void testGetDialogTitle() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.getDialogTitle(fc));
ui.installUI(fc);
fc.setDialogTitle("my");
@@ -128,12 +161,20 @@ public class BasicFileChooserUITest exte
}
public void testGetFileView() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(fc);
assertNotNull(ui.getFileView(fc));
assertTrue(ui.getFileView(fc) instanceof BasicFileChooserUI.BasicFileView);
}
public void testGetSetDirectory() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.getDirectory());
ui.installUI(fc);
assertNull(ui.getDirectory());
@@ -143,18 +184,30 @@ public class BasicFileChooserUITest exte
}
public void testGetSetDirectoryName() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.getDirectoryName());
ui.setDirectoryName("a");
assertNull(ui.getDirectoryName());
}
public void testGetSetDirectorySelected() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertFalse(ui.isDirectorySelected());
ui.setDirectorySelected(true);
assertTrue(ui.isDirectorySelected());
}
public void testGetAccessoryPanel() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.getAccessoryPanel());
ui.installUI(fc);
assertNotNull(ui.getAccessoryPanel());
@@ -164,18 +217,30 @@ public class BasicFileChooserUITest exte
}
public void testGetApproveButtonAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(fc);
assertNotNull(ui.getApproveSelectionAction());
assertEquals(ui.getApproveSelectionAction(), ui.getApproveSelectionAction());
}
public void testGetPreferredSize() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.getPreferredSize(fc));
ui.installUI(fc);
assertNull(ui.getPreferredSize(fc));
}
public void testEnsureFileIsVisible() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
BasicFileChooserUI fc = new BasicFileChooserUI(null);
fc.ensureFileIsVisible(new JFileChooser(), new File("a"));
@@ -186,6 +251,10 @@ public class BasicFileChooserUITest exte
}
public void testInstallDefaults() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
new BasicFileChooserUI(null) {
public void installDefaults(JFileChooser fc) {
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicGraphicsUtilsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicGraphicsUtilsTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicGraphicsUtilsTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicGraphicsUtilsTest.java Wed May 26 09:31:07 2010
@@ -34,6 +34,7 @@ import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JMenuItem;
import javax.swing.SwingTestCase;
+import tests.support.Support_Excludes;
public class BasicGraphicsUtilsTest extends SwingTestCase {
private JFrame frame;
@@ -76,10 +77,18 @@ public class BasicGraphicsUtilsTest exte
}
public void testBasicGraphicsUtils() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
new BasicGraphicsUtils();
}
public void testDrawEtchedRect() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Color color = g.getColor();
BasicGraphicsUtils.drawEtchedRect(g, x, y, w, h, shadow, darkShadow, highlight,
lightHighlight);
@@ -87,20 +96,36 @@ public class BasicGraphicsUtilsTest exte
}
public void testGetEtchedInsets() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(new Insets(2, 2, 2, 2), BasicGraphicsUtils.getEtchedInsets());
}
public void testDrawGroove() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Color color = g.getColor();
BasicGraphicsUtils.drawGroove(g, x, y, w, h, shadow, highlight);
assertSame(color, g.getColor());
}
public void testGetGrooveInsets() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(new Insets(2, 2, 2, 2), BasicGraphicsUtils.getGrooveInsets());
}
public void testDrawBezel() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Color color = g.getColor();
BasicGraphicsUtils.drawBezel(g, x, y, w, h, true, true, shadow, darkShadow, highlight,
lightHighlight);
@@ -114,6 +139,10 @@ public class BasicGraphicsUtilsTest exte
}
public void testDrawLoweredBezel() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Color color = g.getColor();
BasicGraphicsUtils.drawLoweredBezel(g, x, y, w, h, shadow, darkShadow, highlight,
lightHighlight);
@@ -123,14 +152,26 @@ public class BasicGraphicsUtilsTest exte
}
public void testDrawString() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// TODO: implement
}
public void testDrawStringUnderlineCharAt() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// TODO: implement
}
public void testDrawDashedRect() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
g = new DebugGraphics(g);
Color color = g.getColor();
BasicGraphicsUtils.drawDashedRect(g, x, y, w, h);
@@ -138,6 +179,10 @@ public class BasicGraphicsUtilsTest exte
}
public void testGetPreferredButtonSize() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Icon icon = new ImageIcon(new BufferedImage(10, 20, BufferedImage.TYPE_INT_RGB));
JMenuItem item = new JMenuItem() {
private static final long serialVersionUID = 1L;
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameTitlePaneTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameTitlePaneTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameTitlePaneTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameTitlePaneTest.java Wed May 26 09:31:07 2010
@@ -39,6 +39,7 @@ import javax.swing.UIManager;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import javax.swing.plaf.metal.MetalInternalFrameTitlePane;
+import tests.support.Support_Excludes;
public class BasicInternalFrameTitlePaneTest extends SwingTestCase {
private BasicInternalFrameTitlePane pane;
@@ -115,6 +116,10 @@ public class BasicInternalFrameTitlePane
}
public void testAddSubComponents() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame = new JInternalFrame("", true, true, true, true);
pane = new BasicInternalFrameTitlePane(frame);
assertEquals(4, pane.getComponentCount());
@@ -126,6 +131,10 @@ public class BasicInternalFrameTitlePane
}
public void testCreateActions() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
pane.createActions();
// test created actions
assertTrue("closeAction != null", pane.closeAction != null);
@@ -149,6 +158,10 @@ public class BasicInternalFrameTitlePane
}
public void testCreateButtons() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
pane.createButtons();
// test created buttons
assertTrue("maxButton != null", pane.maxButton != null);
@@ -160,6 +173,10 @@ public class BasicInternalFrameTitlePane
}
public void testEnableActions() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// iconifyAction test
frame.setIconifiable(false);
checkEnabledActions();
@@ -203,6 +220,10 @@ public class BasicInternalFrameTitlePane
}
public void testInstallDefaults() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertSame(UIManager.getIcon("InternalFrame.closeIcon"), pane.closeIcon);
assertSame(UIManager.getIcon("InternalFrame.maximizeIcon"), pane.maxIcon);
assertSame(UIManager.getIcon("InternalFrame.minimizeIcon"), pane.minIcon);
@@ -219,6 +240,10 @@ public class BasicInternalFrameTitlePane
}
public void testInstallUninstallListeners() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
pane.uninstallListeners();
assertFalse("listener was uninstalled", belongs(pane.propertyChangeListener, frame
.getPropertyChangeListeners()));
@@ -232,6 +257,10 @@ public class BasicInternalFrameTitlePane
}
public void testInstallTitlePane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
pane.installTitlePane();
assertSame(UIManager.getIcon("InternalFrame.closeIcon"), pane.closeIcon);
assertTrue("listener != null", pane.propertyChangeListener != null);
@@ -246,6 +275,10 @@ public class BasicInternalFrameTitlePane
}
public void testSetButtonIcons() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
checkButtonIcons();
// test icons in Maximum state
frame.setMaximizable(true);
@@ -276,6 +309,10 @@ public class BasicInternalFrameTitlePane
}
public void testShowSystemMenu() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createAndShowRootFrame();
pane.showSystemMenu();
assertTrue("", pane.windowMenu.isPopupMenuVisible());
@@ -289,16 +326,28 @@ public class BasicInternalFrameTitlePane
}
public void testUninstallDefaults() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// nothing to test
}
public void testBasicInternalFrameTitlePane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
pane = new BasicInternalFrameTitlePane(frame);
assertTrue("frame is set", pane.frame == frame);
assertTrue("layout", pane.getLayout() != null);
}
public void testGetTitle() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
createAndShowRootFrame();
final String title = "Document #1";
Font font = new Font("Fixed", Font.PLAIN, 10);
@@ -310,22 +359,38 @@ public class BasicInternalFrameTitlePane
}
public void testCreateSystemMenuBar() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JMenuBar menuBar = pane.createSystemMenuBar();
assertEquals(0, menuBar.getMenuCount());
}
public void testAddSystemMenuItems() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JMenu menu = new JMenu();
pane.addSystemMenuItems(menu);
assertEquals(7, menu.getItemCount());
}
public void testCreateSystemMenu() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JMenu menu = pane.createSystemMenu();
assertEquals(0, menu.getItemCount());
}
public void testAssembleSystemMenu() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
pane.assembleSystemMenu();
assertTrue("windowMenu != null", pane.windowMenu != null);
assertEquals("7 items", 7, pane.windowMenu.getItemCount());
@@ -334,6 +399,10 @@ public class BasicInternalFrameTitlePane
}
public void testPostClosingEvent() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
class MyInternalFrameAdapter extends InternalFrameAdapter {
boolean ok = false;
@@ -351,6 +420,10 @@ public class BasicInternalFrameTitlePane
}
public void testCreatePropertyChangeListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
PropertyChangeListener listener = pane.createPropertyChangeListener();
assertTrue("!= null", listener != null);
if (isHarmony()) {
@@ -360,6 +433,10 @@ public class BasicInternalFrameTitlePane
}
public void testCreateLayout() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
LayoutManager layout = pane.createLayout();
assertTrue("!= null", layout != null);
if (isHarmony()) {
@@ -369,6 +446,10 @@ public class BasicInternalFrameTitlePane
}
public void testCloseButton() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// test with isClosable == false
pane.closeButton.doClick(0);
assertFalse("not closed", frame.isClosed());
@@ -379,6 +460,10 @@ public class BasicInternalFrameTitlePane
}
public void testIconifyButton() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// test with isIconifiable == false
pane.iconButton.doClick(0);
assertFalse("not iconified", frame.isIcon());
@@ -403,6 +488,10 @@ public class BasicInternalFrameTitlePane
}
public void testMaximizeButton() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// test with isMaximizable == false
pane.maxButton.doClick(0);
assertFalse("not maximized", frame.isMaximum());
@@ -431,6 +520,10 @@ public class BasicInternalFrameTitlePane
}
public void testRestoreAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setMaximizable(true);
pane.maxButton.doClick(0);
assertTrue("maximized", frame.isMaximum());
@@ -462,14 +555,26 @@ public class BasicInternalFrameTitlePane
}
public void testSizeAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// cannot test
}
public void testMoveAction() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// cannot test
}
public void testTitlePaneLayout() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
LayoutManager layout = pane.new TitlePaneLayout();
pane.setSize(200, 31);
final Rectangle menuBarBounds = new Rectangle(2, 7, 16, 16);
@@ -508,6 +613,10 @@ public class BasicInternalFrameTitlePane
@SuppressWarnings("deprecation")
public void testSystemMenuBar() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JMenuBar menuBar = pane.new SystemMenuBar();
assertTrue("opaque", menuBar.isOpaque());
assertFalse("isFocusTraversable", menuBar.isFocusTraversable());
@@ -515,6 +624,10 @@ public class BasicInternalFrameTitlePane
}
public void testPropertyChangeHandler() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// test "iconable" property change
frame.setIconifiable(false);
frame.setIconifiable(true);
@@ -536,11 +649,19 @@ public class BasicInternalFrameTitlePane
}
public void testPaintTitleBackground() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Note: painting code, cannot test
}
public void testConstructor() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
new BasicInternalFrameTitlePane((JInternalFrame) null);
fail("NPE should be thrown");
@@ -549,6 +670,10 @@ public class BasicInternalFrameTitlePane
}
}
public void testPaintComponent() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// Note: painting code, cannot test
}
@@ -556,6 +681,10 @@ public class BasicInternalFrameTitlePane
* Regression test for HARMONY-2608
* */
public void testMoveActionKey() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
BasicInternalFrameTitlePane.MoveAction m = pane.new MoveAction();
assertEquals(1, m.getKeys().length);
String key = (String)m.getKeys()[0];
@@ -567,6 +696,10 @@ public class BasicInternalFrameTitlePane
* Regression test for HARMONY-2608
* */
public void testMoveActionPerformed() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
BasicInternalFrameTitlePane.MoveAction m = pane.new MoveAction();
try {
m.actionPerformed(null);
@@ -579,6 +712,10 @@ public class BasicInternalFrameTitlePane
* Regression test for HARMONY-2604
* */
public void testSizeActionPerformed() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String str = "test string";
JInternalFrame jf = new JInternalFrame(str);
MetalInternalFrameTitlePane jp = new MetalInternalFrameTitlePane(jf);
@@ -594,6 +731,10 @@ public class BasicInternalFrameTitlePane
* Regression test for HARMONY-2588
* */
public void testSizeActionKey() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
String str = "test string";
JInternalFrame jf = new JInternalFrame(str);
MetalInternalFrameTitlePane jp = new MetalInternalFrameTitlePane(jf);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameUITest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameUITest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicInternalFrameUITest.java Wed May 26 09:31:07 2010
@@ -39,6 +39,7 @@ import javax.swing.UIManager;
import javax.swing.event.MouseInputAdapter;
import javax.swing.event.MouseInputListener;
import javax.swing.plaf.ComponentUI;
+import tests.support.Support_Excludes;
public class BasicInternalFrameUITest extends SwingTestCase {
@@ -87,6 +88,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void createInternalFrameListener()
*/
public void testCreateInternalFrameListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// cannot test createInternalFrameListener() directly, because
// it only sets BasicInternalFrameUI.internalFrameListener field
// which is private
@@ -104,6 +109,10 @@ public class BasicInternalFrameUITest ex
* void uninstallComponents()
*/
public void testInstallUninstallComponents() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.frame = frame;
ui.installComponents();
assertTrue("titlePane installed", belongs(ui.titlePane, frame.getComponents()));
@@ -118,6 +127,10 @@ public class BasicInternalFrameUITest ex
* Class is under test for void installDefaults()
*/
public void testInstallDefaults() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setBackground(null);
frame.setBorder(null);
frame.setFrameIcon(null);
@@ -136,6 +149,10 @@ public class BasicInternalFrameUITest ex
* Class is under test for void uninstallDefaults()
*/
public void testUninstallDefaults() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
// test general uninstallDefaults()
ui.uninstallDefaults();
@@ -156,6 +173,10 @@ public class BasicInternalFrameUITest ex
* Class is under test for void installKeyboardActions()
*/
public void testInstallKeyboardActions() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UIManager.getDefaults().put("InternalFrame.windowBindings",
new Object[] { "shift ESCAPE", "showSystemMenu" });
frame.setUI(ui);
@@ -174,6 +195,10 @@ public class BasicInternalFrameUITest ex
* Class is under test for void uninstallKeyboardActions()
*/
public void testUninstallKeyboardActions() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UIManager.getDefaults().put("InternalFrame.windowBindings",
new Object[] { "shift ESCAPE", "showSystemMenu" });
frame.setUI(ui);
@@ -194,6 +219,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void installListeners()
*/
public void testInstallListeners() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JFrame f = new JFrame();
f.setSize(50, 100);
f.getContentPane().add(frame);
@@ -226,6 +255,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void uninstallListeners()
*/
public void testUninstallListeners() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JFrame f = new JFrame();
f.setSize(50, 100);
f.getContentPane().add(frame);
@@ -255,6 +288,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void setupMenuCloseKey()
*/
public void testSetupMenuCloseKey() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// the function does nothing, just check that it doesn't crash
ui.setupMenuCloseKey();
}
@@ -263,6 +300,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void setupMenuOpenKey()
*/
public void testSetupMenuOpenKey() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
assertNull("inputMap not installed", SwingUtilities.getUIInputMap(frame,
JComponent.WHEN_IN_FOCUSED_WINDOW));
@@ -294,6 +335,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void BasicInternalFrameUI(JInternalFrame)
*/
public void testBasicInternalFrameUI() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui = new BasicInternalFrameUI(frame);
assertTrue("frame is not set", ui.frame != frame);
assertTrue("ui is not installed", frame.getUI() != ui);
@@ -303,6 +348,10 @@ public class BasicInternalFrameUITest ex
* Class under test for MouseInputAdapter createBorderListener(JInternalFrame)
*/
public void testCreateBorderListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
MouseInputAdapter listener1 = ui.createBorderListener(frame);
assertTrue("not null", listener1 != null);
assertTrue("instanceof BorderListener",
@@ -315,6 +364,10 @@ public class BasicInternalFrameUITest ex
* Class under test for JComponent createWestPane(JInternalFrame)
*/
public void testCreateWestPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
assertNull("null", ui.createWestPane(frame));
assertNull("null", ui.createWestPane(null));
@@ -324,6 +377,10 @@ public class BasicInternalFrameUITest ex
* Class under test for JComponent createSouthPane(JInternalFrame)
*/
public void testCreateSouthPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
assertNull("null", ui.createSouthPane(frame));
assertNull("null", ui.createSouthPane(null));
@@ -333,6 +390,10 @@ public class BasicInternalFrameUITest ex
* Class under test for JComponent createNorthPane(JInternalFrame)
*/
public void testCreateNorthPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
JComponent comp = ui.createNorthPane(frame);
assertTrue("title pane", comp instanceof BasicInternalFrameTitlePane);
assertFalse("doesn't belong", belongs(comp, frame.getComponents()));
@@ -365,6 +426,10 @@ public class BasicInternalFrameUITest ex
* Class under test for JComponent createEastPane(JInternalFrame)
*/
public void testCreateEastPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
assertNull("null", ui.createEastPane(frame));
assertNull("null", ui.createEastPane(null));
@@ -374,6 +439,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void replacePane(JComponent, JComponent)
*/
public void testReplacePane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JComponent comp = new JButton("OK");
// ordinary replace
@@ -401,6 +470,10 @@ public class BasicInternalFrameUITest ex
* Class under test for Dimension getPreferredSize(JComponent)
*/
public void testGetPreferredSize() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setPreferredSize(new Dimension(200, 200));
Dimension standardSize = new Dimension(100, 100);
// ui is not installed into the frame
@@ -419,6 +492,10 @@ public class BasicInternalFrameUITest ex
* Class under test for Dimension getMinimumSize(JComponent)
*/
public void testGetMinimumSize() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setMinimumSize(new Dimension(200, 200));
Dimension standardSize = new Dimension(0, 0);
// ui is not installed into the frame
@@ -437,6 +514,10 @@ public class BasicInternalFrameUITest ex
* Class under test for Dimension getMaximumSize(JComponent)
*/
public void testGetMaximumSize() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(frame);
// ui is installed into the frame
Dimension size = ui.getMaximumSize(frame);
@@ -451,6 +532,10 @@ public class BasicInternalFrameUITest ex
* Class under test for MouseInputListener createGlassPaneDispatcher()
*/
public void testCreateGlassPaneDispatcher() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
MouseInputListener listener1 = ui.createGlassPaneDispatcher();
assertTrue("not null", listener1 != null);
assertNotSame(listener1, ui.glassPaneDispatcher);
@@ -460,6 +545,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void minimizeFrame(JInternalFrame)
*/
public void testMinimizeFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
Dimension size = new Dimension(10, 20);
frame.setUI(ui);
frame.setSize(size);
@@ -482,6 +571,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void maximizeFrame(JInternalFrame)
*/
public void testMaximizeFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
@@ -494,6 +587,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void iconifyFrame(JInternalFrame)
*/
public void testIconifyFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
@@ -506,6 +603,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void deiconifyFrame(JInternalFrame)
*/
public void testDeiconifyFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
@@ -526,6 +627,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void activateFrame(JInternalFrame)
*/
public void testActivateFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
@@ -539,6 +644,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void deactivateFrame(JInternalFrame)
*/
public void testDeactivateFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
@@ -553,6 +662,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void closeFrame(JInternalFrame)
*/
public void testCloseFrame() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
@@ -568,6 +681,10 @@ public class BasicInternalFrameUITest ex
* JComponent getWestPane()
*/
public void testSetGetWestPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JButton comp = new JButton("ok");
// null by default
@@ -588,6 +705,10 @@ public class BasicInternalFrameUITest ex
* JComponent getSouthPane()
*/
public void testSetGetSouthPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JButton comp = new JButton("ok");
// null by default
@@ -608,6 +729,10 @@ public class BasicInternalFrameUITest ex
* JComponent getNorthPane()
*/
public void testSetGetNorthPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JComponent comp = new JButton("ok");
// not null by default
@@ -628,6 +753,10 @@ public class BasicInternalFrameUITest ex
* JComponent getEastPane()
*/
public void testSetGetEastPane() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
JButton comp = new JButton("ok");
// null by default
@@ -646,6 +775,10 @@ public class BasicInternalFrameUITest ex
* Class under test for ComponentUI createUI(JComponent)
*/
public void testCreateUI() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ComponentUI ui1 = BasicInternalFrameUI.createUI(frame);
ComponentUI ui2 = BasicInternalFrameUI.createUI(frame);
assertTrue("not null", ui1 != null);
@@ -656,6 +789,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void installUI(JComponent)
*/
public void testInstallUI() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setBorder(null);
ui.installUI(frame);
// we'll check only some key points
@@ -670,6 +807,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void uninstallUI(JComponent)
*/
public void testUninstallUI() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(frame);
ui.uninstallUI(frame);
// we'll check only some key points
@@ -683,6 +824,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void installMouseHandlers(JComponent)
*/
public void testInstallMouseHandlers() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.borderListener = ui.createBorderListener(frame);
// install to frame
ui.installMouseHandlers(frame);
@@ -708,6 +853,10 @@ public class BasicInternalFrameUITest ex
* Class under test for void deinstallMouseHandlers(JComponent)
*/
public void testDeinstallMouseHandlers() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.borderListener = ui.createBorderListener(frame);
ui.installMouseHandlers(frame);
ui.titlePane = new BasicInternalFrameTitlePane(frame);
@@ -730,6 +879,10 @@ public class BasicInternalFrameUITest ex
* Class under test for DesktopManager getDesktopManager()
*/
public void testGetDesktopManager() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
// no desktop pane, the default desktop manager is created
DesktopManager manager1 = ui.getDesktopManager();
@@ -751,6 +904,10 @@ public class BasicInternalFrameUITest ex
* Class under test for DesktopManager createDesktopManager()
*/
public void testCreateDesktopManager() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
DesktopManager manager1 = ui.createDesktopManager();
assertTrue("not null", manager1 != null);
DesktopManager manager2 = ui.createDesktopManager();
@@ -761,6 +918,10 @@ public class BasicInternalFrameUITest ex
* Class under test for PropertyChangeListener createPropertyChangeListener()
*/
public void testCreatePropertyChangeListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
PropertyChangeListener listener1 = ui.createPropertyChangeListener();
assertTrue("not null", listener1 != null);
PropertyChangeListener listener2 = ui.createPropertyChangeListener();
@@ -772,6 +933,10 @@ public class BasicInternalFrameUITest ex
* Class under test for ComponentListener createComponentListener()
*/
public void testCreateComponentListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ComponentListener listener1 = ui.createComponentListener();
assertTrue("not null", listener1 != null);
assertNotSame(listener1, ui.componentListener);
@@ -781,6 +946,10 @@ public class BasicInternalFrameUITest ex
* Class under test for LayoutManager createLayoutManager()
*/
public void testCreateLayoutManager() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
LayoutManager layout = ui.createLayoutManager();
assertTrue("not null", layout != null);
if (isHarmony()) {
@@ -796,6 +965,10 @@ public class BasicInternalFrameUITest ex
* boolean isKeyBindingRegistered()
*/
public void testSetIsKeyBindingRegistered() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
assertFalse("false by default", ui.isKeyBindingRegistered());
ui.setKeyBindingRegistered(true);
@@ -810,6 +983,10 @@ public class BasicInternalFrameUITest ex
* boolean isKeyBindingActive()
*/
public void testSetIsKeyBindingActive() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
frame.setUI(ui);
assertFalse("false by default", ui.isKeyBindingActive());
ui.setKeyBindingActive(true);
@@ -819,22 +996,42 @@ public class BasicInternalFrameUITest ex
}
public void testBorderListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// the documentation is empty
}
public void testBasicInternalFrameListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// the documentation is empty
}
public void testComponentHandler() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// the documentation is empty
}
public void testGlassPaneDispatcher() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// the documentation is empty
}
public void testInternalFramePropertyChangeListener() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
// the documentation is empty
}
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicListUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicListUITest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicListUITest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicListUITest.java Wed May 26 09:31:07 2010
@@ -38,6 +38,7 @@ import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
+import tests.support.Support_Excludes;
public class BasicListUITest extends SwingTestCase {
private JList list;
@@ -83,6 +84,10 @@ public class BasicListUITest extends Swi
}
public void testBasicListUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(-1, ui.cellHeight);
assertEquals(-1, ui.cellWidth);
assertNull(ui.cellHeights);
@@ -92,6 +97,10 @@ public class BasicListUITest extends Swi
}
public void testBasicListUI_FocusListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertNull(ui.focusListener);
int listenersCount = list.getFocusListeners().length;
ui.installUI(list);
@@ -106,9 +115,17 @@ public class BasicListUITest extends Swi
}
public void testBasicListUI_ListDataHandler() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
}
public void testConvertRowToY() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertEquals(-1, ui.convertRowToY(0));
assertEquals(-1, ui.convertRowToY(-1));
@@ -122,6 +139,10 @@ public class BasicListUITest extends Swi
}
public void testConvertYToRow() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertEquals(-1, ui.convertYToRow(0));
list.setListData(new Object[] { "a", "b" });
@@ -134,42 +155,70 @@ public class BasicListUITest extends Swi
}
public void testCreateFocusListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createFocusListener() instanceof BasicListUI.FocusHandler);
}
}
public void testCreateListDataListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createListDataListener() instanceof BasicListUI.ListDataHandler);
}
}
public void testCreateListSelectionListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createListSelectionListener() instanceof BasicListUI.ListSelectionHandler);
}
}
public void testCreateMouseInputListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createMouseInputListener() instanceof BasicListUI.MouseInputHandler);
}
}
public void testCreatePropertyChangeListener() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
if (isHarmony()) {
assertTrue(ui.createPropertyChangeListener() instanceof BasicListUI.PropertyChangeHandler);
}
}
public void testCreateUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
BasicListUI newUI1 = (BasicListUI) BasicListUI.createUI(list);
BasicListUI newUI2 = (BasicListUI) BasicListUI.createUI(list);
assertNotSame(newUI1, newUI2);
}
public void testGetCellBounds() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertNull(ui.getCellBounds(list, 0, 0));
assertNull(ui.getCellBounds(list, -1, -1));
@@ -191,6 +240,10 @@ public class BasicListUITest extends Swi
}
public void testGetCellBounds_Null() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
testExceptionalCase(new NullPointerCase() {
@Override
public void exceptionalAction() throws Exception {
@@ -206,16 +259,28 @@ public class BasicListUITest extends Swi
}
public void testGetMaximumSize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertEquals(ui.getPreferredSize(list), ui.getMaximumSize(list));
}
public void testGetMinimumSize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertEquals(ui.getPreferredSize(list), ui.getMinimumSize(list));
}
public void testGetPreferredSize() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
list.setSize(100, 100);
assertEquals(new Dimension(0, 0), ui.getPreferredSize(list));
@@ -234,6 +299,10 @@ public class BasicListUITest extends Swi
}
public void testGetRowHeight() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
assertEquals(-1, ui.getRowHeight(-1));
ui.installUI(list);
assertEquals(-1, ui.getRowHeight(0));
@@ -250,6 +319,10 @@ public class BasicListUITest extends Swi
}
public void testIndexToLocation() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertNull(ui.indexToLocation(list, -1));
assertNull(ui.indexToLocation(list, 0));
@@ -268,6 +341,10 @@ public class BasicListUITest extends Swi
}
public void testInstallDefaults() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UIManager.getDefaults().put("List.background", new ColorUIResource(Color.red));
UIManager.getDefaults().put("List.foreground", new ColorUIResource(Color.yellow));
Font font = new FontUIResource(list.getFont().deriveFont(100f));
@@ -286,6 +363,10 @@ public class BasicListUITest extends Swi
}
public void testUninstallDefaults() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
UIManager.getDefaults().put("List.background", new ColorUIResource(Color.red));
UIManager.getDefaults().put("List.foreground", new ColorUIResource(Color.yellow));
Font font = new FontUIResource(list.getFont().deriveFont(100f));
@@ -315,17 +396,29 @@ public class BasicListUITest extends Swi
}
public void testInstallKeyboardActions() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
list.setUI(ui);
assertNotNull(SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED));
}
public void testUninstallKeyboardActions() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
list.setUI(ui);
ui.uninstallKeyboardActions();
assertNull(SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED));
}
public void testInstallListeners() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
list.setUI(ui);
assertNotNull(ui.focusListener);
assertTrue(list.getFocusListeners().length > 0);
@@ -338,6 +431,10 @@ public class BasicListUITest extends Swi
}
public void testUninstallListeners() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
list.setUI(ui);
int focusListenersCount = list.getFocusListeners().length;
int mouseListenersCount = list.getMouseListeners().length;
@@ -355,6 +452,10 @@ public class BasicListUITest extends Swi
}
public void testInstallUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertNotNull(list.getBackground());
assertNotNull(SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED));
@@ -364,6 +465,10 @@ public class BasicListUITest extends Swi
}
public void testUninstallUI() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
list.setUI(ui);
ui.uninstallUI(list);
if (isHarmony()) {
@@ -374,6 +479,10 @@ public class BasicListUITest extends Swi
}
public void testLocationToIndex() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertEquals(-1, ui.locationToIndex(list, new Point(3, 3)));
list.setListData(new Object[] { "aa", "bb" });
@@ -399,6 +508,10 @@ public class BasicListUITest extends Swi
}
public void testMaybeUpdateLayoutState() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertTrue(ui.updateLayoutStateNeeded != 0);
ui.maybeUpdateLayoutState();
@@ -407,13 +520,25 @@ public class BasicListUITest extends Swi
//TODO
public void testPaint() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
}
//TODO
public void testPaintCell() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
}
public void testUpdateLayoutState() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
assertEquals(-1, ui.cellHeight);
assertEquals(-1, ui.cellWidth);
@@ -439,6 +564,10 @@ public class BasicListUITest extends Swi
}
public void testSelectNextPreviousIndex() throws Exception {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
ui.installUI(list);
list.setListData(new Object[] { "1", "2", "3" });
assertTrue(list.isSelectionEmpty());
@@ -507,6 +636,10 @@ public class BasicListUITest extends Swi
* Regression test for HARMONY-2653
* */
public void testRGetPreferredSize() {
+ if (Support_Excludes.isExcluded()) {
+ return;
+ }
+
try {
BasicListUI bl = new BasicListUI();
bl.getPreferredSize(new JFileChooser() );