summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 0cd88cefffa0..d7b93472c1b5 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -51,11 +51,13 @@ public:
void testGetStyles();
void testGetFonts();
void testCreateView();
+ void testGetFilterTypes();
CPPUNIT_TEST_SUITE(DesktopLOKTest);
CPPUNIT_TEST(testGetStyles);
CPPUNIT_TEST(testGetFonts);
CPPUNIT_TEST(testCreateView);
+ CPPUNIT_TEST(testGetFilterTypes);
CPPUNIT_TEST_SUITE_END();
uno::Reference<lang::XComponent> mxComponent;
@@ -150,6 +152,20 @@ void DesktopLOKTest::testCreateView()
closeDoc();
}
+void DesktopLOKTest::testGetFilterTypes()
+{
+ LibLibreOffice_Impl aOffice;
+ char* pJSON = aOffice.m_pOfficeClass->getFilterTypes(&aOffice);
+
+ std::stringstream aStream(pJSON);
+ boost::property_tree::ptree aTree;
+ boost::property_tree::read_json(aStream, aTree);
+
+ CPPUNIT_ASSERT(aTree.size() > 0);
+ CPPUNIT_ASSERT_EQUAL(std::string("application/vnd.oasis.opendocument.text"), aTree.get_child("writer8").get_child("MediaType").get_value<std::string>());
+ free(pJSON);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
CPPUNIT_PLUGIN_IMPLEMENT();