* FYI: MetalLookAndFeel test updates
@ 2006-02-01 16:42 David Gilbert
0 siblings, 0 replies; only message in thread
From: David Gilbert @ 2006-02-01 16:42 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
This patch updates a couple of tests so that they pass on JDK 1.5:
2006-02-01 David Gilbert <david.gilbert@object-refinery.com>
*
gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java
(test): Set theme then check color against theme,
*
gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java
(test): Likewise.
Regards,
Dave
[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 2488 bytes --]
Index: gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java,v
retrieving revision 1.4
diff -u -r1.4 getAcceleratorForeground.java
--- gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java 1 Feb 2006 09:46:34 -0000 1.4
+++ gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java 1 Feb 2006 16:37:53 -0000
@@ -40,9 +40,10 @@
* @param harness the test harness (<code>null</code> not permitted).
*/
public void test(TestHarness harness) {
- MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+ DefaultMetalTheme theme = new DefaultMetalTheme();
+ MetalLookAndFeel.setCurrentTheme(theme);
ColorUIResource c = MetalLookAndFeel.getAcceleratorForeground();
- harness.check(c, new ColorUIResource(new Color(99, 130, 191)));
+ harness.check(c, theme.getAcceleratorForeground());
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
public ColorUIResource getAcceleratorForeground() {
Index: gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java,v
retrieving revision 1.4
diff -u -r1.4 setCurrentTheme.java
--- gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java 1 Feb 2006 09:46:34 -0000 1.4
+++ gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java 1 Feb 2006 16:37:53 -0000
@@ -21,8 +21,8 @@
package gnu.testlet.javax.swing.plaf.metal.MetalLookAndFeel;
-import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
import java.awt.Color;
@@ -39,10 +39,11 @@
{
public void test(TestHarness h)
{
- MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
+ DefaultMetalTheme theme = new DefaultMetalTheme();
+ MetalLookAndFeel.setCurrentTheme(theme);
MetalLookAndFeel laf = new MetalLookAndFeel();
Color c1 = laf.getDefaults().getColor("Button.background");
- h.check(c1, new Color(238, 238, 238));
+ h.check(c1, theme.getControl());
MetalLookAndFeel.setCurrentTheme(new TestTheme());
c1 = laf.getDefaults().getColor("Button.background");
h.check(c1, Color.red);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-01 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 16:42 FYI: MetalLookAndFeel test updates David Gilbert
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).