diff options
author | Tim Buschtöns | 2011-01-31 12:54:22 +0000 |
---|---|---|
committer | Tim Buschtöns | 2011-01-31 12:54:22 +0000 |
commit | 6f830625ebb5ef6ad2a11e9fdcf3927b5c2bb469 (patch) | |
tree | 17a3bdefef7cf04de0e86831f0de5c36d66b922b /tests | |
parent | 0626aee9650d15b1bd210bb1c60bf24f3c7958d6 (diff) | |
download | org.eclipse.rap-6f830625ebb5ef6ad2a11e9fdcf3927b5c2bb469.tar.gz org.eclipse.rap-6f830625ebb5ef6ad2a11e9fdcf3927b5c2bb469.tar.xz org.eclipse.rap-6f830625ebb5ef6ad2a11e9fdcf3927b5c2bb469.zip |
Fix for Bug 335837 - [ToolTip] The ToolTip widget can not have a background-gradient
Diffstat (limited to 'tests')
-rw-r--r-- | tests/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tooltipkit/ToolTipLCA_Test.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tooltipkit/ToolTipLCA_Test.java b/tests/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tooltipkit/ToolTipLCA_Test.java index eaa10a3d1b..d3d72c66a9 100644 --- a/tests/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tooltipkit/ToolTipLCA_Test.java +++ b/tests/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tooltipkit/ToolTipLCA_Test.java @@ -149,7 +149,36 @@ public class ToolTipLCA_Test extends TestCase { ToolTip toolTip = new ToolTip( shell, SWT.NONE ); assertNull( ToolTipLCA.getImage( toolTip ) ); } + + public void testDontOverwriteBackgroundGradient() throws IOException { + ToolTipLCA lca = new ToolTipLCA(); + Fixture.markInitialized( toolTip ); + lca.preserveValues( toolTip ); + lca.renderChanges( toolTip ); + String notExpected = "wm.setBackgroundGradient"; + assertTrue( Fixture.getAllMarkup().indexOf( notExpected ) == -1 ); + } + public void testDontOverwriteBorderRadius() throws IOException { + ToolTipLCA lca = new ToolTipLCA(); + Fixture.markInitialized( toolTip ); + lca.preserveValues( toolTip ); + lca.renderChanges( toolTip ); + String notExpected = "wm.setRoundedBorder"; + assertTrue( Fixture.getAllMarkup().indexOf( notExpected ) == -1 ); + } + + public void testDontrerwriteCusotmVariant() throws IOException { + ToolTipLCA lca = new ToolTipLCA(); + toolTip.setData( WidgetUtil.CUSTOM_VARIANT, "foo" ); + Fixture.markInitialized( toolTip ); + lca.preserveValues( toolTip ); + lca.renderChanges( toolTip ); + String notExpected = "w.addState"; + assertTrue( Fixture.getAllMarkup().indexOf( notExpected ) == -1 ); + toolTip.setData( WidgetUtil.CUSTOM_VARIANT, null ); + } + private Object getPreserved( String propertyName ) { IWidgetAdapter adapter = WidgetUtil.getAdapter( toolTip ); return adapter.getPreserved( propertyName ); |