CppunitTest_sd_html_export_tests: inherit from UnoApiTest
Change-Id: Ia51a023102f83406d83f5bfa92bb7dda31ee9dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141872 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_html_export_tests, \
|
|||||||
sd \
|
sd \
|
||||||
sfx \
|
sfx \
|
||||||
sot \
|
sot \
|
||||||
|
subsequenttest \
|
||||||
svl \
|
svl \
|
||||||
svt \
|
svt \
|
||||||
svx \
|
svx \
|
||||||
|
@@ -7,32 +7,25 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sdmodeltestbase.hxx"
|
#include <test/unoapi_test.hxx>
|
||||||
|
|
||||||
#include <test/htmltesttools.hxx>
|
#include <test/htmltesttools.hxx>
|
||||||
#include <test/xmltesttools.hxx>
|
#include <test/xmltesttools.hxx>
|
||||||
|
|
||||||
using namespace css;
|
using namespace css;
|
||||||
|
|
||||||
class SdHTMLFilterTest : public SdModelTestBase, public XmlTestTools, public HtmlTestTools
|
class SdHTMLFilterTest : public UnoApiTest, public XmlTestTools, public HtmlTestTools
|
||||||
{
|
{
|
||||||
private:
|
public:
|
||||||
htmlDocUniquePtr exportAndParseHtml(sd::DrawDocShellRef const& xDocShRef)
|
SdHTMLFilterTest()
|
||||||
|
: UnoApiTest("/sd/qa/unit/data/")
|
||||||
{
|
{
|
||||||
FileFormat* pFormat = getFormat(HTML);
|
|
||||||
OUString aExt = "." + OUString::createFromAscii(pFormat->pName);
|
|
||||||
utl::TempFileNamed aTempFile(u"", true, aExt);
|
|
||||||
aTempFile.EnableKillingFile();
|
|
||||||
exportTo(xDocShRef.get(), pFormat, aTempFile);
|
|
||||||
return parseHtml(aTempFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
|
||||||
void testHTMLExport()
|
void testHTMLExport()
|
||||||
{
|
{
|
||||||
sd::DrawDocShellRef xDocShRef = loadURL(
|
loadFromURL(u"HtmlExportTestDocument.odp");
|
||||||
m_directories.getURLFromSrc(u"/sd/qa/unit/data/HtmlExportTestDocument.odp"), ODP);
|
utl::TempFileNamed aTempFile = save("impress_html_Export");
|
||||||
htmlDocUniquePtr htmlDoc = exportAndParseHtml(xDocShRef);
|
htmlDocUniquePtr htmlDoc = parseHtml(aTempFile);
|
||||||
|
|
||||||
assertXPath(htmlDoc, "/html", 1);
|
assertXPath(htmlDoc, "/html", 1);
|
||||||
assertXPath(htmlDoc, "/html/body", 1);
|
assertXPath(htmlDoc, "/html/body", 1);
|
||||||
|
Reference in New Issue
Block a user