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/06/05 10:35:05 UTC
svn commit: r951676 [9/20] - 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/auth/make/ classlib...
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrameTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrameTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrameTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrameTest.java Sat Jun 5 08:34:57 2010
@@ -39,7 +39,6 @@ import javax.swing.event.InternalFrameEv
import javax.swing.event.InternalFrameListener;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicInternalFrameUI;
-import tests.support.Support_Excludes;
@SuppressWarnings("serial")
public class JInternalFrameTest extends SwingTestCase {
@@ -229,10 +228,6 @@ public class JInternalFrameTest extends
* instead.
*/
public void testReshape() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final Point location = new Point(20, 21);
final int width = 22;
final int height = 23;
@@ -247,10 +242,6 @@ public class JInternalFrameTest extends
* Class under test for void updateUI()
*/
public void testUpdateUI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
frame.updateUI();
ComponentUI ui1 = frame.getUI();
ComponentUI ui2 = UIManager.getUI(frame);
@@ -289,10 +280,6 @@ public class JInternalFrameTest extends
* Class under test for void JInternalFrame()
*/
public void testJInternalFrame() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
frame = new JInternalFrame();
checkJInternalFrameCorrectness("", false, false, false, false);
}
@@ -301,10 +288,6 @@ public class JInternalFrameTest extends
* Class under test for void doDefaultCloseAction()
*/
public void testDoDefaultCloseAction() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
MyInternalFrameListener listener = new MyInternalFrameListener();
frame.addInternalFrameListener(listener);
@@ -338,10 +321,6 @@ public class JInternalFrameTest extends
* Class under test for void pack()
*/
public void testPack() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final JComponent comp1 = new JPanel();
final JComponent comp2 = new JPanel();
comp2.setPreferredSize(new Dimension(60, 20));
@@ -359,10 +338,6 @@ public class JInternalFrameTest extends
* Class under test for void moveToBack()
*/
public void testMoveToBack() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// test without JDesktopPane set
frame.moveToBack();
// test with JDesktopPane set
@@ -384,10 +359,6 @@ public class JInternalFrameTest extends
* Class under test for void moveToFront()
*/
public void testMoveToFront() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// test without JDesktopPane set
frame.moveToFront();
// test with JDesktopPane set
@@ -410,10 +381,6 @@ public class JInternalFrameTest extends
* Class under test for void toBack()
*/
public void testToBack() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// test without JDesktopPane set
frame.toBack();
// test with JDesktopPane set
@@ -435,10 +402,6 @@ public class JInternalFrameTest extends
* Class under test for void toFront()
*/
public void testToFront() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// test without JDesktopPane set
frame.toFront();
// test with JDesktopPane set
@@ -460,10 +423,6 @@ public class JInternalFrameTest extends
* Class under test for void fireInternalFrameEvent(int)
*/
public void testFireInternalFrameEvent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
MyInternalFrameListener l = new MyInternalFrameListener();
frame.addInternalFrameListener(l);
@@ -499,10 +458,6 @@ public class JInternalFrameTest extends
* int getDefaultCloseOperation()
*/
public void testSetGetDefaultCloseOperation() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// default value is JInternalFrame.DISPOSE_ON_CLOSE
assertEquals(WindowConstants.DISPOSE_ON_CLOSE, frame.getDefaultCloseOperation());
// test setting valid value
@@ -529,10 +484,6 @@ public class JInternalFrameTest extends
* int getLayer()
*/
public void testSetGetLayer() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("default level is 0", frame.getLayer() == 0);
// test setLayer() without JDesktopPane set
frame.setLayer(1);
@@ -550,10 +501,6 @@ public class JInternalFrameTest extends
* Class under test for void setLayer(Integer)
*/
public void testSetLayerInteger() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// test setLayer() without JDesktopPane set
frame.setLayer(new Integer(1));
assertTrue("layer is set", frame.getLayer() == 1);
@@ -572,10 +519,6 @@ public class JInternalFrameTest extends
* boolean isClosable()
*/
public void testSetIsClosable() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse("closable is false by default", frame.isClosable());
frame.setClosable(true);
assertTrue("closable is set", frame.isClosable());
@@ -587,10 +530,6 @@ public class JInternalFrameTest extends
* boolean isClosed()
*/
public void testSetIsClosed() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MyInternalFrameListener frameListener = new MyInternalFrameListener();
frame.addInternalFrameListener(frameListener);
MyPropertyChangeListener l = new MyPropertyChangeListener();
@@ -667,10 +606,6 @@ public class JInternalFrameTest extends
* boolean isIcon()
*/
public void testSetIsIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JDesktopPane desktop = new JDesktopPane();
desktop.add(frame);
MyPropertyChangeListener listener = new MyPropertyChangeListener();
@@ -738,10 +673,6 @@ public class JInternalFrameTest extends
* boolean isIconifiable()
*/
public void testSetIsIconifiable() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse("iconable is false by default", frame.isIconifiable());
frame.setIconifiable(true);
assertTrue("iconable is set", frame.isIconifiable());
@@ -753,10 +684,6 @@ public class JInternalFrameTest extends
* boolean isMaximizable()
*/
public void testSetIsMaximizable() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse("maximizable is false by default", frame.isMaximizable());
frame.setMaximizable(true);
assertTrue("maximizable is set", frame.isMaximizable());
@@ -768,10 +695,6 @@ public class JInternalFrameTest extends
* boolean isMaximum()
*/
public void testSetIsMaximum() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JDesktopPane desktop = new JDesktopPane();
desktop.add(frame);
MyPropertyChangeListener listener = new MyPropertyChangeListener();
@@ -829,10 +752,6 @@ public class JInternalFrameTest extends
* boolean isResizable()
*/
public void testSetIsResizable() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse("resizable is false by default", frame.isResizable());
frame.setResizable(true);
assertTrue("resizable is set", frame.isResizable());
@@ -844,10 +763,6 @@ public class JInternalFrameTest extends
* boolean isRootPaneCheckingEnabled()
*/
public void testSetIsRootPaneCheckingEnabled() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
assertTrue("rootPaneCheckingEnabled is true by default", frame
.isRootPaneCheckingEnabled());
@@ -862,10 +777,6 @@ public class JInternalFrameTest extends
* boolean isSelected()
*/
public void testSetIsSelected() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
createAndShowRootFrame();
rootFrame.getContentPane().add(new JInternalFrame()); // to make 'frame' not selectable by default
//rootFrame.getContentPane().add(frame);
@@ -977,10 +888,6 @@ public class JInternalFrameTest extends
* Class under test for void JInternalFrame(String, boolean, boolean, boolean, boolean)
*/
public void testJInternalFrameStringbooleanbooleanbooleanboolean() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String title = "Test title";
frame = new JInternalFrame(title, true, true, true, true);
checkJInternalFrameCorrectness(title, true, true, true, true);
@@ -994,10 +901,6 @@ public class JInternalFrameTest extends
* Class under test for void JInternalFrame(String, boolean, boolean, boolean)
*/
public void testJInternalFrameStringbooleanbooleanboolean() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String title = "Test title";
frame = new JInternalFrame(title, true, true, true);
checkJInternalFrameCorrectness(title, true, true, true, false);
@@ -1011,10 +914,6 @@ public class JInternalFrameTest extends
* Class under test for void JInternalFrame(String, boolean, boolean)
*/
public void testJInternalFrameStringbooleanboolean() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String title = "Test title";
frame = new JInternalFrame(title, true, true);
checkJInternalFrameCorrectness(title, true, true, false, false);
@@ -1028,10 +927,6 @@ public class JInternalFrameTest extends
* Class under test for void JInternalFrame(String, boolean)
*/
public void testJInternalFrameStringboolean() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String title = "Test title";
frame = new JInternalFrame(title, false);
checkJInternalFrameCorrectness(title, false, false, false, false);
@@ -1043,10 +938,6 @@ public class JInternalFrameTest extends
* Class under test for void JInternalFrame(String)
*/
public void testJInternalFrameString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String title = "Test title";
frame = new JInternalFrame(title);
checkJInternalFrameCorrectness(title, false, false, false, false);
@@ -1056,10 +947,6 @@ public class JInternalFrameTest extends
* Class under test for void addImpl(Component, Object, int)
*/
public void testAddImpl() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
JComponent comp = new JPanel();
// rootPaneCheckingEnabled is true, no exception since 1.5
@@ -1094,10 +981,6 @@ public class JInternalFrameTest extends
* InternalFrameUI getUI()
*/
public void testSetGetUI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
BasicInternalFrameUI ui = new BasicInternalFrameUI(frame);
frame.setUI(ui);
assertTrue(frame.getUI() == ui);
@@ -1124,10 +1007,6 @@ public class JInternalFrameTest extends
* InternalFrameListener[] getInternalFrameListeners()
*/
public void testAddRemoveGetInternalFrameListener() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
InternalFrameListener l = new MyInternalFrameListener();
frame.addInternalFrameListener(l);
InternalFrameListener[] listeners = frame.getInternalFrameListeners();
@@ -1143,10 +1022,6 @@ public class JInternalFrameTest extends
* JRootPane getRootPane()
*/
public void testSetGetRootPane() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
assertTrue("setRootPane() is called from the constructor",
TestInternalFrame.setRootPaneCalled);
@@ -1166,10 +1041,6 @@ public class JInternalFrameTest extends
* Class under test for JRootPane createRootPane()
*/
public void testCreateRootPane() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
assertTrue("createRootPane() is called from the constructor",
TestInternalFrame.createRootPaneCalled);
@@ -1184,10 +1055,6 @@ public class JInternalFrameTest extends
*/
@SuppressWarnings("deprecation")
public void testSetGetMenuBar() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull(frame.getMenuBar());
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(JInternalFrame.MENU_BAR_PROPERTY, listener);
@@ -1205,10 +1072,6 @@ public class JInternalFrameTest extends
* JMenuBar getJMenuBar()
*/
public void testSetGetJMenuBar() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull(frame.getJMenuBar());
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(JInternalFrame.MENU_BAR_PROPERTY, listener);
@@ -1226,10 +1089,6 @@ public class JInternalFrameTest extends
* JLayeredPane getLayeredPane()
*/
public void testSetGetLayeredPane() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(JInternalFrame.LAYERED_PANE_PROPERTY, listener);
JLayeredPane pane = new JLayeredPane();
@@ -1257,10 +1116,6 @@ public class JInternalFrameTest extends
* JDesktopIcon getDesktopIcon()
*/
public void testSetGetDesktopIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("desktopIcon is not null by default", frame.getDesktopIcon() != null);
JInternalFrame.JDesktopIcon icon = new JInternalFrame.JDesktopIcon(frame);
assertTrue("desktopIcon is not set", frame.getDesktopIcon() != icon);
@@ -1274,10 +1129,6 @@ public class JInternalFrameTest extends
* Class under test for JDesktopPane getDesktopPane()
*/
public void testGetDesktopPane() throws NullPointerException {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// no desktopPane
assertNull("desktopPane is null by default", frame.getDesktopPane());
//JInternalFrame.JDesktopIcon icon = new JInternalFrame.JDesktopIcon(frame);
@@ -1310,10 +1161,6 @@ public class JInternalFrameTest extends
* Icon getFrameIcon()
*/
public void testSetGetFrameIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Icon icon = new ImageIcon();
assertTrue("frameIcon is not null by default", frame.getFrameIcon() != null);
frame.setFrameIcon(icon);
@@ -1326,10 +1173,6 @@ public class JInternalFrameTest extends
* Class under test for AccessibleContext getAccessibleContext()
*/
public void testGetAccessibleContext() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
AccessibleContext c = frame.getAccessibleContext();
assertTrue("instanceof AccessibleJInternalFrame",
c instanceof JInternalFrame.AccessibleJInternalFrame);
@@ -1373,10 +1216,6 @@ public class JInternalFrameTest extends
* String getTitle()
*/
public void testSetGetTitle() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String title = "Test title";
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(JInternalFrame.TITLE_PROPERTY, listener);
@@ -1394,10 +1233,6 @@ public class JInternalFrameTest extends
* Class under test for String paramString()
*/
public void testParamString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
assertTrue("paramString() cannot return null", frame.paramString() != null);
}
@@ -1406,10 +1241,6 @@ public class JInternalFrameTest extends
* Class under test for String getUIClassID()
*/
public void testGetUIClassID() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("InternalFrameUI" == frame.getUIClassID());
}
@@ -1419,10 +1250,6 @@ public class JInternalFrameTest extends
* Rectangle getNormalBounds()
*/
public void testSetGetNormalBounds() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(listener);
JDesktopPane desktopPane = new JDesktopPane();
@@ -1457,10 +1284,6 @@ public class JInternalFrameTest extends
* Class under test for void setLayout(LayoutManager)
*/
public void testSetLayout() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestInternalFrame frame = new TestInternalFrame();
LayoutManager contentLayout = frame.getContentPane().getLayout();
LayoutManager frameLayout = frame.getLayout();
@@ -1497,10 +1320,6 @@ public class JInternalFrameTest extends
* Class under test for void paintComponent(Graphics)
*/
public void testPaintComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Note: painting code, cannot test
}
@@ -1510,10 +1329,6 @@ public class JInternalFrameTest extends
* Container getContentPane()
*/
public void testSetGetContentPane() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(JInternalFrame.CONTENT_PANE_PROPERTY, listener);
JPanel pane = new JPanel();
@@ -1541,10 +1356,6 @@ public class JInternalFrameTest extends
* Component getGlassPane()
*/
public void testSetGetGlassPane() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MyPropertyChangeListener listener = new MyPropertyChangeListener();
frame.addPropertyChangeListener(JInternalFrame.GLASS_PANE_PROPERTY, listener);
JPanel pane = new JPanel();
@@ -1570,10 +1381,6 @@ public class JInternalFrameTest extends
* Class under test for void remove(Component)
*/
public void testRemove() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JComponent comp = new JPanel();
frame.getContentPane().add(comp);
assertTrue("label is in contentPane", frame.isAncestorOf(comp));
@@ -1644,10 +1451,6 @@ public class JInternalFrameTest extends
* Class under test for String getWarningString()
*/
public void testGetWarningString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull("getWarningString() always returns null", frame.getWarningString());
}
@@ -1657,10 +1460,6 @@ public class JInternalFrameTest extends
* boolean isFocusCycleRoot()
*/
public void testFocusCycleRoot() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("isFocusCycleRoot is always true", frame.isFocusCycleRoot());
frame.setFocusCycleRoot(false);
assertTrue("isFocusCycleRoot is always true", frame.isFocusCycleRoot());
@@ -1672,10 +1471,6 @@ public class JInternalFrameTest extends
* Class under test for Container getFocusCycleRootAncestor()
*/
public void testGetFocusCycleRootAncestor() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull("always returns null", frame.getFocusCycleRootAncestor());
}
@@ -1683,10 +1478,6 @@ public class JInternalFrameTest extends
* Class under test for void hide()
*/
public void testHide() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
frame.setVisible(true);
frame.hide();
assertFalse("frame is hided", frame.isVisible());
@@ -1699,10 +1490,6 @@ public class JInternalFrameTest extends
* Class under test for void show()
*/
public void testShow() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MyInternalFrameListener l = new MyInternalFrameListener();
frame.addInternalFrameListener(l);
frame.show();
@@ -1746,10 +1533,6 @@ public class JInternalFrameTest extends
* Class under test for void dispose()
*/
public void testDispose() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
createAndShowRootFrame();
MyInternalFrameListener l = new MyInternalFrameListener();
frame.addInternalFrameListener(l);
@@ -1774,10 +1557,6 @@ public class JInternalFrameTest extends
}
public void testSetBounds() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Regression for HARMONY-1801
final Marker validateMarker = new Marker();
final Marker revalidateMarker = new Marker();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrame_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrame_MultithreadedTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrame_MultithreadedTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JInternalFrame_MultithreadedTest.java Sat Jun 5 08:34:57 2010
@@ -25,7 +25,6 @@ import java.awt.Container;
import java.beans.PropertyVetoException;
import java.lang.reflect.InvocationTargetException;
import java.util.Comparator;
-import tests.support.Support_Excludes;
/**
* Tests for JInternalFrame class that cannot be run in Event Dispatch Thread.
@@ -76,10 +75,6 @@ public class JInternalFrame_Multithreade
*/
public void testRestoreSubcomponentFocus() throws InterruptedException,
InvocationTargetException {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final Component comp1 = new JPanel();
final Component comp2 = new JPanel();
final Component comp3 = new JPanel();
@@ -134,10 +129,6 @@ public class JInternalFrame_Multithreade
*/
public void testGetMostRecentFocusOwner() throws PropertyVetoException,
InterruptedException, InvocationTargetException {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final Component initial = new JPanel(); // initial focus component
final Component def = new JPanel(); // default focus component
final Component some = new JPanel(); // some another component
@@ -195,10 +186,6 @@ public class JInternalFrame_Multithreade
* Class under test for Component getFocusOwner()
*/
public void testGetFocusOwner() throws InterruptedException, InvocationTargetException {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final Component comp1 = new JPanel();
final Component comp2 = new JPanel();
final Component comp3 = new JPanel();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JListTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JListTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JListTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JListTest.java Sat Jun 5 08:34:57 2010
@@ -38,7 +38,6 @@ import javax.swing.event.ListSelectionEv
import javax.swing.event.ListSelectionListener;
import javax.swing.plaf.ListUI;
import javax.swing.text.Position;
-import tests.support.Support_Excludes;
public class JListTest extends SwingTestCase {
private JList list;
@@ -77,10 +76,6 @@ public class JListTest extends SwingTest
}
public void testJList() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list = new JList();
assertNotNull(list.getModel());
assertTrue(list.getSelectionModel() instanceof DefaultListSelectionModel);
@@ -116,10 +111,6 @@ public class JListTest extends SwingTest
}
public void testAddGetRemoveListSelectionListener() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(0, list.getListSelectionListeners().length);
TestListSelectionListener l = new TestListSelectionListener();
list.addListSelectionListener(l);
@@ -131,10 +122,6 @@ public class JListTest extends SwingTest
}
public void testAddSelectionInterval() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.isSelectionEmpty());
assertTrue(list.getSelectionModel().isSelectionEmpty());
list.addSelectionInterval(1, 2);
@@ -155,10 +142,6 @@ public class JListTest extends SwingTest
}
public void testClearSelection() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.isSelectionEmpty());
assertTrue(list.getSelectionModel().isSelectionEmpty());
list.setSelectedIndex(1);
@@ -170,18 +153,10 @@ public class JListTest extends SwingTest
}
public void testCreateSelectionModel() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(new TestList().createSelectionModel() instanceof DefaultListSelectionModel);
}
public void testEnsureIndexIsVisible() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JScrollPane scroller = insertListToFrame();
assertNotNull(scroller);
Rectangle bounds = list.getCellBounds(1, 1);
@@ -200,10 +175,6 @@ public class JListTest extends SwingTest
}
public void testFireSelectionValueChanged() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
TestListSelectionListener l1 = new TestListSelectionListener();
TestListSelectionListener l2 = new TestListSelectionListener();
TestListSelectionListener l3 = new TestListSelectionListener();
@@ -238,28 +209,16 @@ public class JListTest extends SwingTest
}
public void testGetAccssibleContext() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.getAccessibleContext() instanceof JList.AccessibleJList);
}
public void testGetAnchorSelectionIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.addSelectionInterval(2, 1);
assertEquals(2, list.getAnchorSelectionIndex());
assertEquals(2, list.getSelectionModel().getAnchorSelectionIndex());
}
public void testGetCellBounds() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.setUI(new ListUI() {
@Override
public Point indexToLocation(final JList arg0, final int arg1) {
@@ -280,10 +239,6 @@ public class JListTest extends SwingTest
}
public void testGetSetCellRenderer() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.getCellRenderer() instanceof DefaultListCellRenderer);
ListCellRenderer testRenderer = new ListCellRenderer() {
public Component getListCellRendererComponent(final JList list, final Object value,
@@ -296,20 +251,12 @@ public class JListTest extends SwingTest
}
public void testGetSetDragEnabled() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse(list.getDragEnabled());
list.setDragEnabled(true);
assertTrue(list.getDragEnabled());
}
public void testGetFirstVisibleIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JScrollPane scroller = insertListToFrame();
Rectangle bounds = list.getCellBounds(1, 1);
assertNotNull(bounds);
@@ -319,10 +266,6 @@ public class JListTest extends SwingTest
}
public void testGetSetFixedCellHeight() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(-1, list.getFixedCellHeight());
list.setFixedCellHeight(10);
assertEquals(10, list.getFixedCellHeight());
@@ -330,10 +273,6 @@ public class JListTest extends SwingTest
}
public void testGetSetFixedCellWidth() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(-1, list.getFixedCellWidth());
list.setFixedCellWidth(10);
assertEquals(10, list.getFixedCellWidth());
@@ -341,10 +280,6 @@ public class JListTest extends SwingTest
}
public void testGetLastVisibleIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JScrollPane scroller = insertListToFrame();
Rectangle bounds = list.getCellBounds(1, 1);
assertNotNull(bounds);
@@ -354,10 +289,6 @@ public class JListTest extends SwingTest
}
public void testGetSetLayoutOrientation() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(JList.VERTICAL, list.getLayoutOrientation());
list.setLayoutOrientation(JList.VERTICAL_WRAP);
assertEquals(JList.VERTICAL_WRAP, list.getLayoutOrientation());
@@ -373,40 +304,24 @@ public class JListTest extends SwingTest
}
public void testGetLeadSelectionIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.addSelectionInterval(2, 1);
assertEquals(1, list.getLeadSelectionIndex());
assertEquals(1, list.getSelectionModel().getLeadSelectionIndex());
}
public void testGetMaxSelectionIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.addSelectionInterval(2, 1);
assertEquals(2, list.getMaxSelectionIndex());
assertEquals(2, list.getSelectionModel().getMaxSelectionIndex());
}
public void testGetMinSelectionIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.addSelectionInterval(2, 1);
assertEquals(1, list.getMinSelectionIndex());
assertEquals(1, list.getSelectionModel().getMinSelectionIndex());
}
public void testGetSetModel() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNotNull(list.getModel());
ListModel m = new DefaultListModel();
list.setModel(m);
@@ -415,10 +330,6 @@ public class JListTest extends SwingTest
}
public void testGetNextMatch() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list = new JList(new Object[] { "a1", "b1", "c1", "a2", "B2", "c2" });
assertEquals(0, list.getNextMatch("a", 0, Position.Bias.Forward));
assertEquals(3, list.getNextMatch("a", 1, Position.Bias.Forward));
@@ -449,10 +360,6 @@ public class JListTest extends SwingTest
}
public void testGetPreferredScrollableViewportSize() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.setFixedCellHeight(10);
list.setFixedCellWidth(100);
list.setVisibleRowCount(5);
@@ -473,10 +380,6 @@ public class JListTest extends SwingTest
}
public void testGetSetPrototypeCellValue() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull(list.getPrototypeCellValue());
list.setFixedCellHeight(1);
list.setFixedCellWidth(1);
@@ -491,10 +394,6 @@ public class JListTest extends SwingTest
//TODO
public void testGetScrollableBlockIncrement() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
list.setListData(new Object[] { "a", "b", "c", "d", "e", "f", "g", "h" });
JScrollPane scroller = insertListToFrame(50);
int lastVisibleIndex = list.getLastVisibleIndex();
@@ -525,10 +424,6 @@ public class JListTest extends SwingTest
}
public void testGetScrollableTracksViewportHeight() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JScrollPane scroller = insertListToFrame();
assertNotNull(scroller);
list.setPreferredSize(new Dimension(1000, 10));
@@ -544,10 +439,6 @@ public class JListTest extends SwingTest
}
public void testGetScrollableTracksViewportWidth() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JScrollPane scroller = insertListToFrame();
assertNotNull(scroller);
list.setPreferredSize(new Dimension(10, 1000));
@@ -563,10 +454,6 @@ public class JListTest extends SwingTest
}
public void testGetScrollableUnitIncrement() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JScrollPane scroller = insertListToFrame();
assertEquals(0, list.getFirstVisibleIndex());
int rowHeight = list.getCellBounds(0, 0).height;
@@ -618,10 +505,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectedIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(-1, list.getSelectedIndex());
list.setSelectedIndex(2);
assertEquals(2, list.getSelectedIndex());
@@ -631,10 +514,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectedIndices() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(0, list.getSelectedIndices().length);
list.setSelectedIndices(new int[] { 0, 2 });
assertEquals(2, list.getSelectedIndices().length);
@@ -646,10 +525,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectedValue() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull(list.getSelectedValue());
list.setSelectedIndex(1);
assertEquals("b", list.getSelectedValue());
@@ -663,10 +538,6 @@ public class JListTest extends SwingTest
}
public void testGetSelectedValues() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(0, list.getSelectedValues().length);
list.setSelectedIndex(1);
assertEquals(1, list.getSelectedValues().length);
@@ -680,10 +551,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectionBackground() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNotNull(list.getSelectionBackground());
list.setSelectionBackground(Color.red);
assertEquals(Color.red, list.getSelectionBackground());
@@ -691,10 +558,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectionForeground() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNotNull(list.getSelectionForeground());
list.setSelectionForeground(Color.red);
assertEquals(Color.red, list.getSelectionForeground());
@@ -702,10 +565,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectionMode() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION, list.getSelectionMode());
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
assertEquals(ListSelectionModel.SINGLE_SELECTION, list.getSelectionMode());
@@ -714,10 +573,6 @@ public class JListTest extends SwingTest
}
public void testGetSetSelectionModel() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.getSelectionModel() instanceof DefaultListSelectionModel);
ListSelectionModel model = new DefaultListSelectionModel();
list.setSelectionModel(model);
@@ -726,10 +581,6 @@ public class JListTest extends SwingTest
}
public void testGetToolTipText() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
insertListToFrame();
assertNull(list.getToolTipText());
list.setToolTipText("list tooltip");
@@ -755,10 +606,6 @@ public class JListTest extends SwingTest
}
public void testGetSetUpdateUI() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ListUI ui = new ListUI() {
@Override
public Point indexToLocation(final JList arg0, final int arg1) {
@@ -782,18 +629,10 @@ public class JListTest extends SwingTest
}
public void testGetUICalssID() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("ListUI", list.getUIClassID());
}
public void testGetSetValueIsAdjusting() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse(list.getValueIsAdjusting());
list.setValueIsAdjusting(true);
assertTrue(list.getValueIsAdjusting());
@@ -801,10 +640,6 @@ public class JListTest extends SwingTest
}
public void testGetSetVisibleRowCount() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals(8, list.getVisibleRowCount());
list.setVisibleRowCount(10);
assertEquals(10, list.getVisibleRowCount());
@@ -816,10 +651,6 @@ public class JListTest extends SwingTest
}
public void testIndexToLocation() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ListUI ui = new ListUI() {
@Override
public Point indexToLocation(final JList arg0, final int arg1) {
@@ -841,10 +672,6 @@ public class JListTest extends SwingTest
}
public void testIsSelectedIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse(list.isSelectedIndex(0));
list.setSelectedIndex(0);
assertTrue(list.isSelectedIndex(0));
@@ -852,10 +679,6 @@ public class JListTest extends SwingTest
}
public void testIsSelectionEmpty() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.isSelectionEmpty());
list.setSelectedIndex(1);
assertFalse(list.isSelectionEmpty());
@@ -863,10 +686,6 @@ public class JListTest extends SwingTest
}
public void testLocationToIndex() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ListUI ui = new ListUI() {
@Override
public Point indexToLocation(final JList arg0, final int arg1) {
@@ -888,10 +707,6 @@ public class JListTest extends SwingTest
}
public void testRemoveSelectionInterval() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue(list.isSelectionEmpty());
assertTrue(list.getSelectionModel().isSelectionEmpty());
list.addSelectionInterval(0, 2);
@@ -905,10 +720,6 @@ public class JListTest extends SwingTest
}
public void testSetListData() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ListModel model = list.getModel();
assertEquals(3, model.getSize());
list.setListData(new Object[] { "1", "2" });
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JMenuTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JMenuTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JMenuTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JMenuTest.java Sat Jun 5 08:34:57 2010
@@ -29,7 +29,6 @@ import java.util.EventListener;
import javax.swing.JPopupMenuTest.MyAction;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
-import tests.support.Support_Excludes;
@SuppressWarnings("serial")
public class JMenuTest extends JMenuItemTest {
@@ -107,20 +106,12 @@ public class JMenuTest extends JMenuItem
@Override
public void testJMenuItem() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
}
/*
* Test method for 'javax.swing.JMenu.JMenu()'
*/
public void testJMenu() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
assertNull("icon ", button.getIcon());
assertEquals("text ", "", button.getText());
@@ -145,10 +136,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.JMenu(String)'
*/
public void testJMenuString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String text = "texttext";
button = menuItem = menu = new JMenu(text);
assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
@@ -177,10 +164,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.JMenu(String, boolean)'
*/
public void testJMenuStringBoolean() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String text = "texttext";
button = menuItem = menu = new JMenu(text, true);
assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
@@ -209,10 +192,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.JMenu(Action)'
*/
public void testJMenuAction() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String command = "dnammoc";
class MyAction extends AbstractAction {
public MyAction(final String text, final Icon icon) {
@@ -274,10 +253,6 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testGetAccessibleContext() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
boolean assertedValue = (menuItem.getAccessibleContext() != null && menuItem
.getAccessibleContext().getClass().getName().equals(
"javax.swing.JMenu$AccessibleJMenu"));
@@ -288,10 +263,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.applyComponentOrientation(ComponentOrientation)'
*/
public void testApplyComponentOrientation() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item = new JMenuItem();
menu.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
assertTrue(menu.getPopupMenu().getComponentOrientation().isLeftToRight());
@@ -306,10 +277,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.setComponentOrientation(ComponentOrientation)'
*/
public void testSetComponentOrientation() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item = new JMenuItem();
menu.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
assertTrue(menu.getPopupMenu().getComponentOrientation().isLeftToRight());
@@ -324,10 +291,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.remove(int)'
*/
public void testRemoveInt() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
menu.add(item1);
@@ -354,10 +317,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.remove(Component)'
*/
public void testRemoveComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
menu.add(item1);
@@ -376,10 +335,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.remove(JMenuItem)'
*/
public void testRemoveJMenuItem() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
menu.add(item1);
@@ -399,10 +354,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.removeAll()'
*/
public void testRemoveAll() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
assertEquals(0, menu.getMenuComponentCount());
@@ -420,10 +371,6 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testGetUIClassID() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("MenuUI", menu.getUIClassID());
}
@@ -432,20 +379,12 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testDoClick() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
}
/*
* Test method for 'javax.swing.JMenu.doClick(int)'
*/
public void testDoClickInt() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JFrame frame = new JFrame();
JMenuBar menuBar = new JMenuBar();
frame.getContentPane().add(menuBar);
@@ -466,10 +405,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.setSelected(boolean)'
*/
public void testSetIsSelected() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ConcreteMenuListener listener = new ConcreteMenuListener();
menu.addMenuListener(listener);
menu.setSelected(true);
@@ -489,10 +424,6 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testSetAccelerator() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
try {
menu.setAccelerator(null);
fail("no exception has been thrown");
@@ -505,10 +436,6 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testGetComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertSame(menu, menu.getComponent());
}
@@ -517,10 +444,6 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testGetSubElements() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
JMenuItem item3 = new JMenuItem();
@@ -557,10 +480,6 @@ public class JMenuTest extends JMenuItem
*/
@Override
public void testMenuSelectionChanged() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ConcreteMenuListener listener = new ConcreteMenuListener();
menu.addMenuListener(listener);
menu.menuSelectionChanged(true);
@@ -579,10 +498,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.add(Action)'
*/
public void testAddAction() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Icon icon = createNewIcon();
String text = "texttext";
Action action = new JPopupMenuTest.MyAction(text, icon);
@@ -598,10 +513,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.add(String)'
*/
public void testAddString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String text1 = "text";
String text2 = "texttext";
JMenuItem item1 = menu.add(text1);
@@ -622,10 +533,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.add(JMenuItem)'
*/
public void testAddJMenuItem() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
JPopupMenu popup = menu.getPopupMenu();
@@ -648,10 +555,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.add(Component)'
*/
public void testAddComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Component item1 = new JMenuItem();
Component item2 = new JMenuItem();
Component item3 = new JButton();
@@ -683,10 +586,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.add(Component, int)'
*/
public void testAddComponentInt() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Component item1 = new JMenuItem();
Component item2 = new JMenuItem();
Component item3 = new JButton();
@@ -718,10 +617,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.addSeparator()'
*/
public void testAddSeparator() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
JPopupMenu popup = menu.getPopupMenu();
@@ -747,10 +642,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.addMenuListener(MenuListener)'
*/
public void testAddGetRemoveMenuListener() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MenuListener listener1 = new ConcreteMenuListener();
MenuListener listener2 = new ConcreteMenuListener();
MenuListener listener3 = new ConcreteMenuListener();
@@ -781,10 +672,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.createActionChangeListener(JMenuItem)'
*/
public void testCreateActionChangeListener() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String text1 = "text";
String text2 = "texttext";
String text3 = "texttexttext";
@@ -818,10 +705,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.createActionComponent(Action)'
*/
public void testCreateActionComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final String command = "dnammoc";
class MyAction extends AbstractAction {
public MyAction(final String text, final Icon icon) {
@@ -859,10 +742,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.createWinListener(JPopupMenu)'
*/
public void testCreateWinListener() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JPopupMenu pupop = new JPopupMenu();
JMenu.WinListener listener1 = menu.createWinListener(pupop);
JMenu.WinListener listener2 = menu.createWinListener(pupop);
@@ -875,10 +754,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.fireMenuCanceled()'
*/
public void testFireMenuCanceled() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ConcreteMenuListener listener1 = new ConcreteMenuListener();
ConcreteMenuListener listener2 = new ConcreteMenuListener();
menu.addMenuListener(listener1);
@@ -894,10 +769,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.fireMenuDeselected()'
*/
public void testFireMenuDeselected() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ConcreteMenuListener listener1 = new ConcreteMenuListener();
ConcreteMenuListener listener2 = new ConcreteMenuListener();
menu.addMenuListener(listener1);
@@ -913,10 +784,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.fireMenuSelected()'
*/
public void testFireMenuSelected() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ConcreteMenuListener listener1 = new ConcreteMenuListener();
ConcreteMenuListener listener2 = new ConcreteMenuListener();
menu.addMenuListener(listener1);
@@ -932,10 +799,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getMenuComponentCount()'
*/
public void testGetMenuComponentCount() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
assertEquals(0, menu.getMenuComponentCount());
@@ -953,10 +816,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getItemCount()'
*/
public void testGetItemCount() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
assertEquals(0, menu.getItemCount());
@@ -974,10 +833,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getMenuComponent(int)'
*/
public void testGetMenuComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
assertNull(menu.getMenuComponent(0));
@@ -1001,10 +856,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getItem(int)'
*/
public void testGetItem() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
assertNull(menu.getItem(0));
@@ -1028,10 +879,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getMenuComponents()'
*/
public void testGetMenuComponents() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
JMenuItem item3 = new JMenuItem();
@@ -1068,10 +915,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getPopupMenu()'
*/
public void testGetPopupMenu() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNotNull(menu.getPopupMenu());
assertNull(menu.getPopupMenu().getLabel());
assertEquals(0, menu.getPopupMenu().getComponentCount());
@@ -1084,10 +927,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.getPopupMenuOrigin()'
*/
public void testGetPopupMenuOrigin() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
int offsetX1 = 50;
int offsetY1 = 60;
int offsetX2 = 20;
@@ -1129,10 +968,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.insert(String, int)'
*/
public void testInsertStringInt() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String text1 = "text";
String text2 = "texttext";
menu.insert(text1, 0);
@@ -1165,10 +1000,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.insert(JMenuItem, int)'
*/
public void testInsertJMenuItemInt() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
assertSame(item1, menu.insert(item1, 0));
@@ -1192,10 +1023,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.insert(Action, int)'
*/
public void testInsertActionInt() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Icon icon = createNewIcon();
String text = "texttext";
MyAction action1 = new MyAction(text, icon);
@@ -1228,10 +1055,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.insertSeparator(int)'
*/
public void testInsertSeparator() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
menu.insertSeparator(0);
assertEquals(1, menu.getItemCount());
assertNull(menu.getItem(0));
@@ -1255,10 +1078,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.isMenuComponent(Component)'
*/
public void testIsMenuComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JMenuItem item1 = new JMenuItem();
JMenuItem item2 = new JMenuItem();
JMenuItem item3 = new JMenuItem();
@@ -1301,10 +1120,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.isTearOff()'
*/
public void testIsTearOff() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
try {
menu.isTearOff();
fail("no exception has been thrown");
@@ -1316,10 +1131,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.isTopLevelMenu()'
*/
public void testIsTopLevelMenu() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse(menu.isTopLevelMenu());
JMenuBar menuBar = new JMenuBar();
JMenu menu2 = new JMenu();
@@ -1334,10 +1145,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.setDelay(int)'
*/
public void testGetSetDelay() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
int delay1 = 1000;
int delay2 = -1000;
menu.setDelay(0);
@@ -1354,10 +1161,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.setMenuLocation(int, int)'
*/
public void testSetMenuLocation() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
int x = 100;
int y = 200;
menu.getPopupMenu().setVisible(true);
@@ -1370,10 +1173,6 @@ public class JMenuTest extends JMenuItem
* Test method for 'javax.swing.JMenu.setPopupMenuVisible(boolean)'
*/
public void testSetIsPopupMenuVisible() throws InterruptedException {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
menu.setPopupMenuVisible(true);
assertFalse(menu.isPopupMenuVisible());
JWindow frame = new JWindow();
@@ -1398,10 +1197,6 @@ public class JMenuTest extends JMenuItem
@Override
public void testNumberOfModelListeners() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
button.setUI(null);
DefaultButtonModel model = (DefaultButtonModel) button.getModel();
assertEquals("model's action listeners ", 1, model.getActionListeners().length);
@@ -1415,10 +1210,6 @@ public class JMenuTest extends JMenuItem
@Override
public void testConfigurePropertiesFromAction() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Icon icon1 = createNewIcon();
Icon icon2 = createNewIcon();
KeyStroke ks1 = KeyStroke.getKeyStroke('a');
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneRTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneRTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneRTest.java Sat Jun 5 08:34:57 2010
@@ -20,7 +20,6 @@
package javax.swing;
import java.awt.Frame;
-import tests.support.Support_Excludes;
public class JOptionPaneRTest extends SwingTestCase {
public JOptionPaneRTest(final String name) {
@@ -28,10 +27,6 @@ public class JOptionPaneRTest extends Sw
}
public void testGetFrameForComponent() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
final Frame f = new Frame();
final JDialog dialog = new JDialog(f);
assertSame(f, JOptionPane.getFrameForComponent(dialog));
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JOptionPaneTest.java Sat Jun 5 08:34:57 2010
@@ -26,7 +26,6 @@ import java.awt.Frame;
import java.awt.image.BufferedImage;
import javax.accessibility.AccessibleRole;
import javax.swing.plaf.OptionPaneUI;
-import tests.support.Support_Excludes;
public class JOptionPaneTest extends SwingTestCase {
JOptionPane pane = null;
@@ -41,10 +40,6 @@ public class JOptionPaneTest extends Swi
}
public void testGetAccessibleContext() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
boolean assertedValue = (pane.getAccessibleContext() != null && pane
.getAccessibleContext().getClass().getName().equals(
"javax.swing.JOptionPane$AccessibleJOptionPane"));
@@ -54,26 +49,14 @@ public class JOptionPaneTest extends Swi
}
public void testParamString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("ParamString returns a string ", pane.toString() != null);
}
public void testGetUIClassID() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("UI class ID", "OptionPaneUI", pane.getUIClassID());
}
public void testUpdateUI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
OptionPaneUI ui = new OptionPaneUI() {
@Override
public void selectInitialValue(JOptionPane arg0) {
@@ -94,10 +77,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane()
*/
public void testJOptionPane() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("message", "JOptionPane message", pane.getMessage());
assertEquals("message type", JOptionPane.PLAIN_MESSAGE, pane.getMessageType());
assertEquals("option type", JOptionPane.DEFAULT_OPTION, pane.getOptionType());
@@ -112,10 +91,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane(Object)
*/
public void testJOptionPaneObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String message = "message";
pane = new JOptionPane(message);
assertEquals("message", message, pane.getMessage());
@@ -131,10 +106,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane(Object, int)
*/
public void testJOptionPaneObjectint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String message = "message";
int messageType1 = JOptionPane.ERROR_MESSAGE;
int messageType2 = -100;
@@ -159,10 +130,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane(Object, int, int)
*/
public void testJOptionPaneObjectintint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String message = "message";
int messageType1 = JOptionPane.ERROR_MESSAGE;
int messageType2 = -100;
@@ -196,10 +163,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane(Object, int, int, Icon)
*/
public void testJOptionPaneObjectintintIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String message = "message";
Icon icon1 = new ImageIcon();
Icon icon2 = null;
@@ -242,10 +205,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane(Object, int, int, Icon, Object[])
*/
public void testJOptionPaneObjectintintIconObjectArray() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String message = "message";
Icon icon1 = new ImageIcon();
Icon icon2 = null;
@@ -299,10 +258,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void JOptionPane(Object, int, int, Icon, Object[], Object)
*/
public void testJOptionPaneObjectintintIconObjectArrayObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
String message = "message";
Icon icon1 = new ImageIcon();
Icon icon2 = null;
@@ -370,10 +325,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInputDialog(Object)
*/
public void testShowInputDialogObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInputDialog().
}
@@ -381,10 +332,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInputDialog(Object, Object)
*/
public void testShowInputDialogObjectObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInputDialog().
}
@@ -392,10 +339,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInputDialog(Component, Object)
*/
public void testShowInputDialogComponentObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInputDialog().
}
@@ -403,10 +346,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInputDialog(Component, Object, Object)
*/
public void testShowInputDialogComponentObjectObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInputDialog().
}
@@ -414,10 +353,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInputDialog(Component, Object, String, int)
*/
public void testShowInputDialogComponentObjectStringint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInputDialog().
}
@@ -425,10 +360,6 @@ public class JOptionPaneTest extends Swi
* Class under test for Object showInputDialog(Component, Object, String, int, Icon, Object[], Object)
*/
public void testShowInputDialogComponentObjectStringintIconObjectArrayObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInputDialog().
}
@@ -436,10 +367,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void showMessageDialog(Component, Object)
*/
public void testShowMessageDialogComponentObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showMessageDialog().
}
@@ -447,10 +374,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void showMessageDialog(Component, Object, String, int)
*/
public void testShowMessageDialogComponentObjectStringint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showMessageDialog().
}
@@ -458,10 +381,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void showMessageDialog(Component, Object, String, int, Icon)
*/
public void testShowMessageDialogComponentObjectStringintIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showMessageDialog().
}
@@ -469,10 +388,6 @@ public class JOptionPaneTest extends Swi
* Class under test for int showConfirmDialog(Component, Object)
*/
public void testShowConfirmDialogComponentObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showConfirmDialog().
}
@@ -480,10 +395,6 @@ public class JOptionPaneTest extends Swi
* Class under test for int showConfirmDialog(Component, Object, String, int)
*/
public void testShowConfirmDialogComponentObjectStringint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showConfirmDialog().
}
@@ -491,10 +402,6 @@ public class JOptionPaneTest extends Swi
* Class under test for int showConfirmDialog(Component, Object, String, int, int)
*/
public void testShowConfirmDialogComponentObjectStringintint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showConfirmDialog().
}
@@ -502,26 +409,14 @@ public class JOptionPaneTest extends Swi
* Class under test for int showConfirmDialog(Component, Object, String, int, int, Icon)
*/
public void testShowConfirmDialogComponentObjectStringintintIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showConfirmDialog().
}
public void testShowOptionDialog() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showOptionDialog().
}
public void testCreateInternalFrame() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JDesktopPane deskTop = new JDesktopPane();
JFrame frame = new JFrame();
JPanel panel = new JPanel();
@@ -553,10 +448,6 @@ public class JOptionPaneTest extends Swi
}
public void testCreateDialog() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JFrame frame = new JFrame();
JPanel panel = new JPanel();
String title = "title-title";
@@ -575,10 +466,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void showInternalMessageDialog(Component, Object)
*/
public void testShowInternalMessageDialogComponentObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalMessageDialog().
// JFrame frame = new JFrame();
// JPanel panel = new JPanel();
@@ -593,10 +480,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void showInternalMessageDialog(Component, Object, String, int)
*/
public void testShowInternalMessageDialogComponentObjectStringint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalMessageDialog().
}
@@ -604,10 +487,6 @@ public class JOptionPaneTest extends Swi
* Class under test for void showInternalMessageDialog(Component, Object, String, int, Icon)
*/
public void testShowInternalMessageDialogComponentObjectStringintIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalMessageDialog().
}
@@ -615,10 +494,6 @@ public class JOptionPaneTest extends Swi
* Class under test for int showInternalConfirmDialog(Component, Object)
*/
public void testShowInternalConfirmDialogComponentObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalConfirmDialog().
}
@@ -626,10 +501,6 @@ public class JOptionPaneTest extends Swi
* Class under test for int showInternalConfirmDialog(Component, Object, String, int)
*/
public void testShowInternalConfirmDialogComponentObjectStringint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalConfirmDialog().
}
@@ -637,10 +508,6 @@ public class JOptionPaneTest extends Swi
* Class under test for int showInternalConfirmDialog(Component, Object, String, int, int)
*/
public void testShowInternalConfirmDialogComponentObjectStringintint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalConfirmDialog().
}
@@ -648,18 +515,10 @@ public class JOptionPaneTest extends Swi
* Class under test for int showInternalConfirmDialog(Component, Object, String, int, int, Icon)
*/
public void testShowInternalConfirmDialogComponentObjectStringintintIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalConfirmDialog().
}
public void testShowInternalOptionDialog() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalOptionDialog().
}
@@ -667,10 +526,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInternalInputDialog(Component, Object)
*/
public void testShowInternalInputDialogComponentObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalInputDialog().
}
@@ -678,10 +533,6 @@ public class JOptionPaneTest extends Swi
* Class under test for String showInternalInputDialog(Component, Object, String, int)
*/
public void testShowInternalInputDialogComponentObjectStringint() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalInputDialog().
}
@@ -689,18 +540,10 @@ public class JOptionPaneTest extends Swi
* Class under test for Object showInternalInputDialog(Component, Object, String, int, Icon, Object[], Object)
*/
public void testShowInternalInputDialogComponentObjectStringintIconObjectArrayObject() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement showInternalInputDialog().
}
public void testGetFrameForComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Frame defaultFrame = JOptionPane.getRootFrame();
JPanel panel = new JPanel();
JFrame frame = new JFrame();
@@ -718,10 +561,6 @@ public class JOptionPaneTest extends Swi
}
public void testGetDesktopPaneForComponent() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JPanel panel = new JPanel();
JDesktopPane frame = new JDesktopPane();
assertNull("frame", JOptionPane.getDesktopPaneForComponent(null));
@@ -731,10 +570,6 @@ public class JOptionPaneTest extends Swi
}
public void testSetRootFrame() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Frame frame1 = new Frame();
Frame frame2 = new JFrame();
JOptionPane.setRootFrame(frame1);
@@ -747,10 +582,6 @@ public class JOptionPaneTest extends Swi
}
public void testGetRootFrame() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Frame frame1 = JOptionPane.getRootFrame();
frame1.add(new JPanel());
frame1.add(new JPanel());
@@ -764,25 +595,13 @@ public class JOptionPaneTest extends Swi
* is beinng tested in BasicOptionPaneUITest
*/
public void testSetUIOptionPaneUI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
}
public void testGetUI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("ui is returned ", pane.getUI() != null);
}
public void testSetMessage() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
PropertyChangeController listener1 = new PropertyChangeController();
String message1 = "message1";
String message2 = "message2";
@@ -801,18 +620,10 @@ public class JOptionPaneTest extends Swi
}
public void testGetMessage() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("message", "JOptionPane message", pane.getMessage());
}
public void testSetIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Icon icon1 = new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_BYTE_GRAY));
Icon icon2 = new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_BYTE_GRAY));
PropertyChangeController listener1 = new PropertyChangeController();
@@ -835,18 +646,10 @@ public class JOptionPaneTest extends Swi
}
public void testGetIcon() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull("icon", pane.getIcon());
}
public void testSetValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JButton button1 = new JButton("1");
JButton button2 = new JButton("2");
PropertyChangeController listener1 = new PropertyChangeController();
@@ -861,18 +664,10 @@ public class JOptionPaneTest extends Swi
}
public void testGetValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("value", JOptionPane.UNINITIALIZED_VALUE, pane.getValue());
}
public void testSetOptions() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Object options2[] = new Object[] { new JButton("1"), new ImageIcon(), "asdasd" };
Object options22[] = options2.clone();
Object options3[] = new Object[] { "asd", new InputMap(), new JPanel() };
@@ -898,20 +693,12 @@ public class JOptionPaneTest extends Swi
}
public void testGetOptions() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertTrue("options", pane.getOptions() == null || pane.getOptions().length == 0);
assertNull(new JOptionPane().getOptions());
}
public void testSetInitialValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JButton button1 = new JButton("1");
JButton button2 = new JButton("2");
pane.setWantsInput(false);
@@ -928,18 +715,10 @@ public class JOptionPaneTest extends Swi
}
public void testGetInitialValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertNull("InitialValue", pane.getInitialValue());
}
public void testSetMessageType() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
PropertyChangeController listener1 = new PropertyChangeController();
pane.addPropertyChangeListener(listener1);
pane.setMessageType(JOptionPane.ERROR_MESSAGE);
@@ -966,18 +745,10 @@ public class JOptionPaneTest extends Swi
}
public void testGetMessageType() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("message type", JOptionPane.PLAIN_MESSAGE, pane.getMessageType());
}
public void testSetOptionType() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
PropertyChangeController listener1 = new PropertyChangeController();
pane.addPropertyChangeListener(listener1);
pane.setOptionType(JOptionPane.CANCEL_OPTION);
@@ -1003,18 +774,10 @@ public class JOptionPaneTest extends Swi
}
public void testGetOptionType() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("option type", JOptionPane.CLOSED_OPTION, pane.getOptionType());
}
public void testSetSelectionValues() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Object buttons2[] = new Object[] { new JButton("1"), new JButton("2") };
Object buttons3[] = new Object[] { new JButton("1"), new JButton("2") };
PropertyChangeController listener1 = new PropertyChangeController();
@@ -1047,10 +810,6 @@ public class JOptionPaneTest extends Swi
}
public void testGetSelectionValues() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Object buttons2[] = new Object[] { new JButton("1"), new JButton("2") };
Object buttons3[] = new Object[] { new JButton("1"), new JButton("2") };
assertNull("SelectionValues", pane.getSelectionValues());
@@ -1063,10 +822,6 @@ public class JOptionPaneTest extends Swi
}
public void testSetInitialSelectionValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Object str1 = "String1";
Object str2 = "String2";
pane.setWantsInput(false);
@@ -1081,10 +836,6 @@ public class JOptionPaneTest extends Swi
}
public void testGetInitialSelectionValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JButton button1 = new JButton("1");
JButton button2 = new JButton("2");
assertNull("InitialSelectionValue", pane.getInitialSelectionValue());
@@ -1097,10 +848,6 @@ public class JOptionPaneTest extends Swi
}
public void testSetInputValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
PropertyChangeController listener1 = new PropertyChangeController();
JButton button1 = new JButton("1");
JButton button2 = new JButton("2");
@@ -1119,34 +866,18 @@ public class JOptionPaneTest extends Swi
}
public void testGetInputValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
}
public void testGetMaxCharactersPerLineCount() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertEquals("num characters", Integer.MAX_VALUE, pane.getMaxCharactersPerLineCount());
}
public void testSelectInitialValue() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
//TODO Implement selectInitialValue().
}
public void testSetWantsInput() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
PropertyChangeController listener1 = new PropertyChangeController();
pane.addPropertyChangeListener(listener1);
pane.setWantsInput(true);
@@ -1163,10 +894,6 @@ public class JOptionPaneTest extends Swi
}
public void testGetWantsInput() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
assertFalse("wants input", pane.getWantsInput());
}
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JRootPaneRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JRootPaneRTest.java?rev=951676&r1=951675&r2=951676&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JRootPaneRTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/swing/src/test/api/java.injected/javax/swing/JRootPaneRTest.java Sat Jun 5 08:34:57 2010
@@ -20,7 +20,6 @@
package javax.swing;
import java.beans.PropertyVetoException;
-import tests.support.Support_Excludes;
public class JRootPaneRTest extends SwingTestCase {
private JFrame frame;
@@ -39,10 +38,6 @@ public class JRootPaneRTest extends Swin
}
public void testDefaultButton() throws PropertyVetoException {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
JInternalFrame iframe = new JInternalFrame("", true, true, true, true);
JDesktopPane desktop = new JDesktopPane();
desktop.add(iframe);