* FYI: Extra ComboBox test
@ 2006-06-08 19:29 Francis Kung
0 siblings, 0 replies; only message in thread
From: Francis Kung @ 2006-06-08 19:29 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
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.
[-- Attachment #2: mauve-ComboBox.diff --]
[-- Type: text/x-patch, Size: 1045 bytes --]
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),
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-08 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-08 19:29 FYI: Extra ComboBox test Francis Kung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).