/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include #include #include #include #include #include #include #include #include #include #include #include class XHtmlExportTest : public SwModelTestBase, public HtmlTestTools { public: XHtmlExportTest() : SwModelTestBase("/sw/qa/extras/odfexport/data/", "XHTML Writer File") { } private: virtual std::unique_ptr preTest(const char*) override { setFilterOptions("UTF8"); return nullptr; } }; #define DECLARE_HTMLEXPORT_TEST(TestName, filename) \ DECLARE_SW_EXPORT_TEST(TestName, filename, nullptr, XHtmlExportTest) DECLARE_HTMLEXPORT_TEST(testImageEmbedding, "image-mimetype.odt") { htmlDocPtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT(pDoc); assertXPath(pDoc, "/html/body", 1); assertXPath(pDoc, "/html/body/div[1]/div[1]/img", 1); OUString aValue = getXPath(pDoc, "/html/body/div[1]/div[1]/img", "src"); CPPUNIT_ASSERT(aValue.startsWith("data:image/svg+xml;base64")); } CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */