*
* @param harness the test harness (<code>null</code> not permitted).
*/
public void test(TestHarness harness) {
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
ColorUIResource c = MetalLookAndFeel.getPrimaryControlDarkShadow();
harness.check(c, new ColorUIResource(new Color(102, 102, 153)));
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme() {
public ColorUIResource getPrimaryControlDarkShadow() {
return new ColorUIResource(Color.red);
}
});
c = MetalLookAndFeel.getPrimaryControlDarkShadow();
harness.check(c, new ColorUIResource(Color.red));
// reset the theme so that other tests won't be affected
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
}