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