diff options
author | Anna Gadomska <ext-anna.2.gadomska@nokia.com> | 2010-08-20 09:39:49 +0300 |
---|---|---|
committer | Dominik Kapusta <dominik.kapusta@teleca.com> | 2010-08-20 08:58:29 +0200 |
commit | d4db071d651b0c9a0b9de187b557b598e62c9a15 (patch) | |
tree | c0cee4a79808918b2e8c154308260aac6e159fee /tests/ut_mcombobox | |
parent | 3b80792a4181143e8996b54031aaf447f517b39d (diff) |
Changes: MContentItem unit test, MComboBox unit test improvements
RevBy: Dominik
Diffstat (limited to 'tests/ut_mcombobox')
-rw-r--r-- | tests/ut_mcombobox/ut_mcombobox.cpp | 19 | ||||
-rw-r--r-- | tests/ut_mcombobox/ut_mcombobox.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/ut_mcombobox/ut_mcombobox.cpp b/tests/ut_mcombobox/ut_mcombobox.cpp index 68d2d8be..54dbe536 100644 --- a/tests/ut_mcombobox/ut_mcombobox.cpp +++ b/tests/ut_mcombobox/ut_mcombobox.cpp @@ -509,5 +509,24 @@ void Ut_MComboBox::testProgressIndicator() QCOMPARE(comboboxButtonLayout->policy(), viewPrivate->button->layoutPolicy(MComboBoxButton::TitleShown)); } +void Ut_MComboBox::testProgressIndicator2() +{ + MComboBoxView *view = (MComboBoxView *)m_combobox->view(); + MComboBoxViewPrivate *viewPrivate = view->d_func(); + MLayout* comboboxButtonLayout = static_cast<MLayout*>(viewPrivate->button->layout()); + + QCOMPARE(m_combobox->isProgressIndicatorVisible(), false); + QCOMPARE(comboboxButtonLayout->policy(), viewPrivate->button->layoutPolicy(MComboBoxButton::TitleShown)); + + m_combobox->showProgressIndicator(); + QCOMPARE(m_combobox->isProgressIndicatorVisible(), true); + QCOMPARE(comboboxButtonLayout->policy(), + viewPrivate->button->layoutPolicy(MComboBoxButton::TitleShown|MComboBoxButton::ProgressShown)); + + m_combobox->hideProgressIndicator(); + QCOMPARE(m_combobox->isProgressIndicatorVisible(), false); + QCOMPARE(comboboxButtonLayout->policy(), viewPrivate->button->layoutPolicy(MComboBoxButton::TitleShown)); +} + QTEST_APPLESS_MAIN(Ut_MComboBox) diff --git a/tests/ut_mcombobox/ut_mcombobox.h b/tests/ut_mcombobox/ut_mcombobox.h index f800e651..996fd95d 100644 --- a/tests/ut_mcombobox/ut_mcombobox.h +++ b/tests/ut_mcombobox/ut_mcombobox.h @@ -55,6 +55,7 @@ private slots: void testActivatedSignal(); void testSetCurrentIndex(); void testProgressIndicator(); + void testProgressIndicator2(); private: MComboBox *m_combobox; |