sw/qa/extras/htmlexport/htmlexport.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit d4c991b7ae534d207c583590cce93fd86d1b25e9
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Mar 7 20:11:46 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Mar 8 07:01:47 2023 +0000

    CppunitTest_sw_htmlexport: avoid XHTML magic in testXHTML
    
    Set the filter option explicitly, rather than inferring it from the test
    name. Also remove the now unused EmbedImages handling in preTest().
    
    Change-Id: I9d6689c116aa2e2969c70460aefbdde0828dd624
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148444
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index c99f6d4b23a8..9936a101c2ce 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -214,9 +214,7 @@ private:
 
     virtual std::unique_ptr<Resetter> preTest(const char* filename) override
     {
-        if (getTestName().indexOf("EmbedImages") != -1)
-            setFilterOptions("EmbedImages");
-        else if (getTestName().indexOf("XHTML") != -1)
+        if (getTestName().indexOf("XHTML") != -1)
             setFilterOptions("XHTML");
         else if (getTestName().indexOf("ReqIf") != -1)
         {
@@ -637,8 +635,12 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, 
testEmbedImagesEnabled)
     CPPUNIT_ASSERT(imgSrc.startsWith("data:image/png;base64,"));
 }
 
-DECLARE_HTMLEXPORT_TEST(testXHTML, "hello.html")
+CPPUNIT_TEST_FIXTURE(HtmlExportTest, testXHTML)
 {
+    createSwWebDoc("hello.html");
+    setFilterOptions("XHTML");
+    save(OUString::createFromAscii(mpFilter));
+
     OString aExpected("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML");
     SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
     CPPUNIT_ASSERT(pStream);

Reply via email to