Mercurial > hg > release > icedtea6-1.8
changeset 1863:1d8ccb881ce7
6920172: Regression test LocationRelativeToTest does not check frame position correctly.
Summary: Testcase correction - check frame position against graphics environment's center point
Reviewed-by: art
author | ptisnovs |
---|---|
date | Thu, 28 Jan 2010 12:53:33 +0100 |
parents | 102fc7d29141 |
children | 2c335401e50d |
files | Makefile.am patches/icedtea-6920172-location-relative-to-test.patch |
diffstat | 2 files changed, 29 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Thu Jan 28 11:30:12 2010 +0100 +++ b/Makefile.am Thu Jan 28 12:53:33 2010 +0100 @@ -308,7 +308,8 @@ patches/icedtea-parisc.patch \ patches/icedtea-sh4-support.patch \ patches/libpng.patch \ - patches/icedtea-6920143-using-with-mouse.patch + patches/icedtea-6920143-using-with-mouse.patch \ + patches/icedtea-6920172-location-relative-to-test.patch if WITH_RHINO ICEDTEA_PATCHES += \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6920172-location-relative-to-test.patch Thu Jan 28 12:53:33 2010 +0100 @@ -0,0 +1,27 @@ +6920172: Regression test LocationRelativeToTest does not check frame position correctly. +Summary: Testcase correction - check frame position against graphics environment's center point +Reviewed-by: art + +--- openjdk.orig/jdk/test/java/awt/Multiscreen/LocationRelativeToTest/LocationRelativeToTest.java 2010-01-25 17:42:52.000000000 +0100 ++++ openjdk/jdk/test/java/awt/Multiscreen/LocationRelativeToTest/LocationRelativeToTest.java 2010-01-25 17:42:52.000000000 +0100 +@@ -50,7 +50,8 @@ + + GraphicsEnvironment ge = + GraphicsEnvironment.getLocalGraphicsEnvironment(); +- System.out.println("Center point: " + ge.getCenterPoint()); ++ Point centerPoint = ge.getCenterPoint(); ++ System.out.println("Center point: " + centerPoint); + GraphicsDevice[] gds = ge.getScreenDevices(); + GraphicsDevice gdDef = ge.getDefaultScreenDevice(); + GraphicsConfiguration gcDef = +@@ -77,8 +78,7 @@ + // second, check setLocationRelativeTo(invisible) + f.setLocationRelativeTo(f2); + Util.waitForIdle(r); +- checkLocation(f, new Point(gcBounds.x + gcBounds.width / 2, +- gcBounds.y + gcBounds.height / 2)); ++ checkLocation(f, centerPoint); + + // third, check setLocationRelativeTo(visible) + f2.setVisible(true); +