This is the mail archive of the
mailing list for the Mauve project.
Re: FYI: New Lightweight tests
On Wed, 2006-02-22 at 13:18 -0500, Lillian Angel wrote:
> I fixed up testLoc1
I don't see testLoc1 in
> so it fails with Classpath (without my AWT patch).
> I also adjusted some of the delays to be longer. It was causing race
> conditions with my new test.
> 2006-02-22 Lillian Angel <email@example.com>
> * gnu/testlet/java/awt/Container/LightweightContainer.java
> (testLoc1): Fixed up tests so it fails without pending
> lightweight patch.
Did you mean testLoc2? The first check in testLoc2 fails on Sun and on
JamVM with or without the lightweight patch. This location seems wrong:
int x = LW.getX() + f.getInsets().left + p.x - 1;
int y = pan.getY() + f.getInsets().top + p.y;
since the bottom panel is inset from the left panel.
Also, I think this test should be simplified. The test is:
A Frame containing a lighweight container. The lightweight container
contains a heavyweight child. The lightweight container is moved but
not resized (so that the heavyweight's position changes relative to the
frame but not relative to its parent). So the test should be:
- show a Frame with a null layout and a green background, with
lightweight child at a given size and location. inside that lightweight
child, add a blue heavyweight panel
- wait for a second
- call Component.move on the lightweight child
- check for the blue heavyweight panel's position relative to the frame
Without our patch, the panel will not move and so will end up in the
wrong location relative to the frame. With our patch it will move along
with the lightweight container and end up in the right position.