Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java')
-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