summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorTobias Lippert <drtl@fastmail.fm>2015-02-21 21:39:45 +0100
committerYousuf Philips <philipz85@hotmail.com>2015-05-27 12:24:21 +0000
commit2a0118a98fc39dfed56fb7904733f63f6a2d6fe8 (patch)
treee9237ec691edcf32ee8e444bb7888d7dbb182e8e /vcl/qa
parent0cdab3fc10828233d202e064a175dc6442a4a473 (diff)
tdf#88675 Fix display names for hicontrast and tango_testing
The special cases for the icon themes with the filenames "images_hicontrast.zip" and "images_tango_testing.zip" are now handled. They will be displayed as "High Contrast" and "Tango Testing" respectively. Change-Id: Ia3c2b8b57809db9c5ed132c42a412157e91b2599 Reviewed-on: https://gerrit.libreoffice.org/14574 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeInfo.cxx24
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeSelector.cxx4
2 files changed, 26 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
index 2a199d27793a..416f8e22abc2 100644
--- a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
@@ -36,6 +36,12 @@ class IconThemeInfoTest : public CppUnit::TestFixture
ThemeIdIsDetectedFromFileNameWithUnderscore();
void
+ DisplayNameForHicontrastIsHighContrast();
+
+ void
+ DisplayNameForTango_testingIsTangoTesting();
+
+ void
ExceptionIsThrownWhenIdCannotBeDetermined1();
void
@@ -114,6 +120,24 @@ IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined2()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception was thrown", true, thrown);
}
+void
+IconThemeInfoTest::DisplayNameForHicontrastIsHighContrast()
+{
+ OUString id("hicontrast");
+ OUString expected("High Contrast");
+ OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id);
+ CPPUNIT_ASSERT_EQUAL(expected, displayName);
+}
+
+void
+IconThemeInfoTest::DisplayNameForTango_testingIsTangoTesting()
+{
+ OUString id("tango_testing");
+ OUString expected("Tango Testing");
+ OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id);
+ CPPUNIT_ASSERT_EQUAL(expected, displayName);
+}
+
// Put the test suite in the registry
CPPUNIT_TEST_SUITE_REGISTRATION(IconThemeInfoTest);
diff --git a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
index 40ff352778fb..e32ccd209c8e 100644
--- a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
@@ -80,7 +80,7 @@ IconThemeSelectorTest::GetFakeInstalledThemes()
r.push_back(a);
a.mThemeId = "oxygen";
r.push_back(a);
- a.mThemeId = vcl::IconThemeSelector::HIGH_CONTRAST_ICON_THEME_ID;
+ a.mThemeId = "hicontrast";
r.push_back(a);
return r;
}
@@ -122,7 +122,7 @@ IconThemeSelectorTest::ThemeIsOverriddenByHighContrastMode()
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
OUString selected = s.SelectIconTheme(themes, "tango");
CPPUNIT_ASSERT_EQUAL_MESSAGE("'tango' theme is overridden by high contrast mode",
- vcl::IconThemeSelector::HIGH_CONTRAST_ICON_THEME_ID, selected);
+ OUString("hicontrast"), selected);
s.SetUseHighContrastTheme(false);
selected = s.SelectIconTheme(themes, "tango");
CPPUNIT_ASSERT_EQUAL_MESSAGE("'tango' theme is no longer overridden by high contrast mode",