Skip to content

Commit

Permalink
Missing XComponent.dispose calls in screenshot tests
Browse files Browse the repository at this point in the history
Change-Id: I5df25a16303719593d40f08d1e7c15e4636a2d02
  • Loading branch information
stbergmann committed Nov 18, 2016
1 parent 0da4cde commit 14af38f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sc/qa/unit/screenshots/screenshots.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ void ScScreenshotTest::testOpeningModalDialogs()

/// process input file containing the UXMLDescriptions of the dialogs to dump
processDialogBatchFile("sc/qa/unit/screenshots/data/screenshots.txt");

mxComponent->dispose();
mxComponent.clear();
}

CPPUNIT_TEST_SUITE_REGISTRATION(ScScreenshotTest);
Expand Down
7 changes: 7 additions & 0 deletions sd/qa/unit/dialogs-test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class SdDialogsTest : public ScreenshotTest

virtual void setUp() override;

void tearDown() override;

// try to open a dialog
void openAnyDialog();

Expand Down Expand Up @@ -138,6 +140,11 @@ void SdDialogsTest::setUp()
CPPUNIT_ASSERT(mpImpressDocument);
}

void SdDialogsTest::tearDown()
{
mxComponent->dispose();
ScreenshotTest::tearDown();
}

SdAbstractDialogFactory* SdDialogsTest::getSdAbstractDialogFactory()
{
Expand Down
8 changes: 8 additions & 0 deletions sw/qa/unit/sw-dialogs-test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class SwDialogsTest : public ScreenshotTest

void setUp() override;

void tearDown() override;

// try to open a dialog
void openAnyDialog();

Expand Down Expand Up @@ -78,6 +80,12 @@ void SwDialogsTest::setUp()
(*fn)();
}

void SwDialogsTest::tearDown()
{
component_->dispose();
ScreenshotTest::tearDown();
}

void SwDialogsTest::registerKnownDialogsByID(mapType& /*rKnownDialogs*/)
{
// fill map of known dialogs
Expand Down

0 comments on commit 14af38f

Please sign in to comment.