diff --git a/slideshow/CppunitTest_slideshow_engine.mk b/slideshow/CppunitTest_slideshow_engine.mk index a88531df49f7..d9a88a980f17 100644 --- a/slideshow/CppunitTest_slideshow_engine.mk +++ b/slideshow/CppunitTest_slideshow_engine.mk @@ -23,9 +23,13 @@ $(eval $(call gb_CppunitTest_use_libraries,slideshow_engine, \ comphelper \ cppu \ slideshow \ + cppuhelper \ sal \ + subsequenttest \ test \ unotest \ + utl \ + tl \ )) $(eval $(call gb_CppunitTest_use_sdk_api,slideshow_engine)) diff --git a/slideshow/qa/engine/engine.cxx b/slideshow/qa/engine/engine.cxx index bdc60b71bab1..f2d3f12121d3 100644 --- a/slideshow/qa/engine/engine.cxx +++ b/slideshow/qa/engine/engine.cxx @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include -#include +#include #include #include @@ -22,32 +21,15 @@ using namespace ::com::sun::star; namespace { /// Covers slideshow/source/engine/ fixes. -class Test : public test::BootstrapFixture, public unotest::MacrosTest +class Test : public UnoApiTest { -private: - uno::Reference mxComponent; - public: - void setUp() override; - void tearDown() override; - uno::Reference& getComponent() { return mxComponent; } + Test() + : UnoApiTest("slideshow/qa/engine/data/") + { + } }; -void Test::setUp() -{ - test::BootstrapFixture::setUp(); - - mxDesktop.set(frame::Desktop::create(mxComponentContext)); -} - -void Test::tearDown() -{ - if (mxComponent.is()) - mxComponent->dispose(); - - test::BootstrapFixture::tearDown(); -} - /// Get the first command node in the animation tree of the page, assuming that it's the first child /// (recursively). uno::Reference @@ -75,9 +57,8 @@ CPPUNIT_TEST_FIXTURE(Test, testLoopingFromAnimation) { // Given a document with a looping video, the looping is defined as part of its auto-play // animation (and not on the media shape): - OUString aURL = m_directories.getURLFromSrc(u"slideshow/qa/engine/data/video-loop.pptx"); - getComponent().set(loadFromDesktop(aURL)); - uno::Reference xDoc(getComponent(), uno::UNO_QUERY); + loadFromURL(u"video-loop.pptx"); + uno::Reference xDoc(mxComponent, uno::UNO_QUERY); uno::Reference xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); uno::Reference xCommandNode = GetFirstCommandNodeOfPage(xPage); uno::Reference xShape(xPage->getByIndex(0), uno::UNO_QUERY);