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:
parent
0dfe66b1d3
commit
ffe9dfbbc6
2 changed files with 9 additions and 15 deletions
|
@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_html_export_tests, \
|
|||
sd \
|
||||
sfx \
|
||||
sot \
|
||||
subsequenttest \
|
||||
svl \
|
||||
svt \
|
||||
svx \
|
||||
|
|
|
@ -7,32 +7,25 @@
|
|||
* 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/xmltesttools.hxx>
|
||||
|
||||
using namespace css;
|
||||
|
||||
class SdHTMLFilterTest : public SdModelTestBase, public XmlTestTools, public HtmlTestTools
|
||||
class SdHTMLFilterTest : public UnoApiTest, public XmlTestTools, public HtmlTestTools
|
||||
{
|
||||
private:
|
||||
htmlDocUniquePtr exportAndParseHtml(sd::DrawDocShellRef const& xDocShRef)
|
||||
public:
|
||||
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()
|
||||
{
|
||||
sd::DrawDocShellRef xDocShRef = loadURL(
|
||||
m_directories.getURLFromSrc(u"/sd/qa/unit/data/HtmlExportTestDocument.odp"), ODP);
|
||||
htmlDocUniquePtr htmlDoc = exportAndParseHtml(xDocShRef);
|
||||
loadFromURL(u"HtmlExportTestDocument.odp");
|
||||
utl::TempFileNamed aTempFile = save("impress_html_Export");
|
||||
htmlDocUniquePtr htmlDoc = parseHtml(aTempFile);
|
||||
|
||||
assertXPath(htmlDoc, "/html", 1);
|
||||
assertXPath(htmlDoc, "/html/body", 1);
|
||||
|
|
Loading…
Reference in a new issue