* RFC: Fix java.awt.Dialog.size
@ 2009-03-23 20:26 Omair Majid
2009-03-23 22:29 ` Mark Wielaard
0 siblings, 1 reply; 3+ messages in thread
From: Omair Majid @ 2009-03-23 20:26 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
This patch fixes an issue in the java.awt.Dialog.size test where the
Dialog was shown and then a component was added to it, causing the
preferred size to become more than the actual size.
Works with IcedTea6 and gij 4.3.2
Changelog:
2009-03-23 Omair Majid <omajid@redhat.com>
* gnu/testlet/java/awt/Dialog/size.java (test): First add any
components to the Dialog, then pack it before testing preferred
size and actual size.
Cheers,
Omair
[-- Attachment #2: dialog-size.patch --]
[-- Type: text/x-patch, Size: 667 bytes --]
Index: gnu/testlet/java/awt/Dialog/size.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Dialog/size.java,v
retrieving revision 1.2
diff -u -r1.2 size.java
--- gnu/testlet/java/awt/Dialog/size.java 2 Nov 2005 16:38:22 -0000 1.2
+++ gnu/testlet/java/awt/Dialog/size.java 23 Mar 2009 20:11:13 -0000
@@ -37,8 +37,9 @@
public void test(TestHarness harness)
{
Dialog jd = new Dialog(new Frame());
- jd.show();
jd.add(new Label("Hello world"));
+ jd.pack();
+ jd.show();
// jd insets may be larger than preferred size
Dimension pref = jd.getPreferredSize();
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: Fix java.awt.Dialog.size
2009-03-23 20:26 RFC: Fix java.awt.Dialog.size Omair Majid
@ 2009-03-23 22:29 ` Mark Wielaard
2009-03-26 15:53 ` Lillian Angel
0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2009-03-23 22:29 UTC (permalink / raw)
To: Omair Majid; +Cc: mauve-patches
Hi Omair,
On Mon, 2009-03-23 at 16:25 -0400, Omair Majid wrote:
> This patch fixes an issue in the java.awt.Dialog.size test where the
> Dialog was shown and then a component was added to it, causing the
> preferred size to become more than the actual size.
>
> Works with IcedTea6 and gij 4.3.2
>
> Changelog:
> 2009-03-23 Omair Majid <omajid@redhat.com>
>
> * gnu/testlet/java/awt/Dialog/size.java (test): First add any
> components to the Dialog, then pack it before testing preferred
> size and actual size.
The original version of this test had "Dialog should be shown at
preferred size when pack is not called before show." Which is probably
why pack() wasn't in the original. I am not sure that is a legal
assumption though. So adding the pack() might be what is needed here. It
depends on what you want to test. Maybe Lillian remembers, she added the
test originally.
Cheers,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: Fix java.awt.Dialog.size
2009-03-23 22:29 ` Mark Wielaard
@ 2009-03-26 15:53 ` Lillian Angel
0 siblings, 0 replies; 3+ messages in thread
From: Lillian Angel @ 2009-03-26 15:53 UTC (permalink / raw)
To: Mark Wielaard; +Cc: Omair Majid, mauve-patches
Mark Wielaard wrote:
> Hi Omair,
>
> On Mon, 2009-03-23 at 16:25 -0400, Omair Majid wrote:
>
>> This patch fixes an issue in the java.awt.Dialog.size test where the
>> Dialog was shown and then a component was added to it, causing the
>> preferred size to become more than the actual size.
>>
>> Works with IcedTea6 and gij 4.3.2
>>
>> Changelog:
>> 2009-03-23 Omair Majid <omajid@redhat.com>
>>
>> * gnu/testlet/java/awt/Dialog/size.java (test): First add any
>> components to the Dialog, then pack it before testing preferred
>> size and actual size.
>>
>
> The original version of this test had "Dialog should be shown at
> preferred size when pack is not called before show." Which is probably
> why pack() wasn't in the original. I am not sure that is a legal
> assumption though. So adding the pack() might be what is needed here. It
> depends on what you want to test. Maybe Lillian remembers, she added the
> test originally.
I wish I had a better recollection of writing this test. If that is not
a legal assumption, then I am ok with the test being changed.
Lillian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-26 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-23 20:26 RFC: Fix java.awt.Dialog.size Omair Majid
2009-03-23 22:29 ` Mark Wielaard
2009-03-26 15:53 ` Lillian Angel
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).