diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-04-03 00:23:23 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-06-12 11:46:19 +0200 |
commit | 8e70df7fdac8b723d1c762b84ed13a8da2fafb27 (patch) | |
tree | cb4f2d64a4045b875a1b5479ba2c240f83511242 /sw | |
parent | cdea5f4ceb2d59ae739a8435e4888a302bb0d260 (diff) |
sw: oox: unit-test for default Content_Types
Change-Id: I59432487d1b995a4b3dd28396860990b73ad4252
Reviewed-on: https://gerrit.libreoffice.org/70176
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/73490
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index d6dc27cda24e..b0201deb2cd5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -82,6 +82,32 @@ DECLARE_OOXMLEXPORT_TEST(testDocm, "hello.docm") "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"); } +DECLARE_OOXMLEXPORT_TEST(testDefaultContentTypes, "fdo55381.docx") +{ + if (xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml")) + { + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Default[@Extension='xml']", + "ContentType", + "application/xml"); + + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Default[@Extension='rels']", + "ContentType", + "application/vnd.openxmlformats-package.relationships+xml"); + + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Default[@Extension='png']", + "ContentType", + "image/png"); + + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Default[@Extension='jpeg']", + "ContentType", + "image/jpeg"); + } +} + DECLARE_SW_ROUNDTRIP_TEST(testDocmSave, "hello.docm", nullptr, DocmTest) { // This was |