Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Priya Shanmugam2019-04-08 06:07:49 -0400
committerLakshmi Priya Shanmugam2019-04-08 06:07:49 -0400
commit10ed5067606b3242c450eb195dbd3bd4287a679d (patch)
treec427d1ed1afba1588a0396ec9e4d7cd06f5a4d45
parentb51a2f05fbb9c65936b0fa833ff7f3f60a299e86 (diff)
downloadeclipse.platform.swt-10ed5067606b3242c450eb195dbd3bd4287a679d.tar.gz
eclipse.platform.swt-10ed5067606b3242c450eb195dbd3bd4287a679d.tar.xz
eclipse.platform.swt-10ed5067606b3242c450eb195dbd3bd4287a679d.zip
Bug 546192 - Test failure in test_setForegroundAfterBackground on Mac
The default Text foreground color on Mac uses SWT.COLOR_LIST_FOREGROUND not SWT.COLOR_WIDGET_FOREGROUND. Updated test for Mac. Change-Id: I14beb8ffa47caa1a9943ab5acdf6b7076311994d
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
index d99dc98d53..8c83fdc414 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
@@ -1160,7 +1160,8 @@ public void test_setForegroundAfterBackground() {
makeCleanEnvironment(false);
Color gray = text.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY);
Color white = text.getDisplay().getSystemColor(SWT.COLOR_WHITE);
- Color defaultForeground = text.getDisplay().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND);
+ int systemColor = SwtTestUtil.isCocoa ? SWT.COLOR_LIST_FOREGROUND : SWT.COLOR_WIDGET_FOREGROUND;
+ Color defaultForeground = text.getDisplay().getSystemColor(systemColor);
text.setBackground(gray);
assertEquals(text.getForeground(), defaultForeground);

Back to the top