From d0be032e5c0435c0cb13245a011b9159d8940d19 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Wed, 17 Sep 2014 13:25:26 +0200 Subject: Fix accessibilitylinux autotest failure Each test function is responsible for removing the children it added to m_window, since m_window is reused for each testcase. Due to this, the test QCOMPARE(children.length(), 2); failed, (it was 3). Change-Id: Idbd13214d2e841450800df0542fbdbcfaac85ce1 Reviewed-by: Frederik Gladhorn --- tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp index 4ff90e85cc..5954fa71c0 100644 --- a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp +++ b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp @@ -465,6 +465,7 @@ void tst_QAccessibilityLinux::testSlider() valueInterface->setProperty("CurrentValue", 4); QCOMPARE(valueInterface->property("CurrentValue").toInt(), 4); + m_window->clearChildren(); } quint64 getAtspiState(QDBusInterface *interface) @@ -513,6 +514,11 @@ void tst_QAccessibilityLinux::testFocus() QVERIFY(lineEdit2->hasFocus()); QVERIFY(!(getAtspiState(accessibleInterfaceLineEdit1) & focusedState)); QVERIFY(getAtspiState(accessibleInterfaceLineEdit2) & focusedState); + m_window->clearChildren(); + delete accessibleInterfaceLineEdit1; + delete accessibleInterfaceLineEdit2; + delete componentInterfaceLineEdit1; + delete componentInterfaceLineEdit2; } QTEST_MAIN(tst_QAccessibilityLinux) -- cgit v1.2.3