This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Extra ComboBox test


Hi,

Extra test (committed) for the BasicComboBoxUI, checking for the proper
height when a null or empty item has been included in the combobox.

Regards,
Francis


2006-06-08  Francis Kung  <fkung@redhat.com>

	*
gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java: Additional tests for null and empty elements.

Index: gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java,v
retrieving revision 1.3
diff -u -r1.3 getPreferredSize.java
--- gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java	1 Feb 2006 14:30:18 -0000	1.3
+++ gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java	8 Jun 2006 19:20:39 -0000
@@ -75,6 +75,12 @@
     harness.check(ui.getPreferredSize(cb), 
             new Dimension(width + height, height));
     
+    cb.setModel(new DefaultComboBoxModel(new Object[] {null}));
+    harness.check(ui.getPreferredSize(cb).height, height);
+    
+    cb.setModel(new DefaultComboBoxModel(new Object[] {""}));
+    harness.check(ui.getPreferredSize(cb).height, height);
+    
     cb.setPrototypeDisplayValue("XX");    
     width = fm.stringWidth("XX") + additionalWidth;
     harness.check(ui.getPreferredSize(cb), 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]