phoneuis/bubblemanager2/tsrc/unit/ut_bubbleparticipantlistitem/ut_bubbleparticipantlistitem.cpp
equal
deleted
inserted
replaced
36 void initTestCase(); |
36 void initTestCase(); |
37 void cleanupTestCase(); |
37 void cleanupTestCase(); |
38 |
38 |
39 void testCreateItem(); |
39 void testCreateItem(); |
40 void testUpdateChildItems(); |
40 void testUpdateChildItems(); |
41 |
41 void testUpdateChildItemsFirstTime(); |
|
42 |
42 private: |
43 private: |
43 BubbleParticipantListItem* mItem; |
44 BubbleParticipantListItem* mItem; |
44 HbMainWindow* mMainWindow; |
45 HbMainWindow* mMainWindow; |
45 int mStyleBaseId; |
46 int mStyleBaseId; |
46 }; |
47 }; |
77 mItem->addAction(&act2); |
78 mItem->addAction(&act2); |
78 mItem->updateChildItems(); |
79 mItem->updateChildItems(); |
79 mItem->updateChildItems(); |
80 mItem->updateChildItems(); |
80 } |
81 } |
81 |
82 |
|
83 void ut_BubbleParticipantListItem::testUpdateChildItemsFirstTime() |
|
84 { |
|
85 BubbleParticipantListItem* listItem = new BubbleParticipantListItem(); |
|
86 mMainWindow->addView(listItem); |
|
87 |
|
88 // with two actions |
|
89 HbAction act1("Action-1"); |
|
90 HbAction act2("Action-2"); |
|
91 listItem->addAction(&act1); |
|
92 listItem->addAction(&act2); |
|
93 |
|
94 listItem->updateChildItems(); |
|
95 |
|
96 mMainWindow->show(); |
|
97 QTest::qWait(300); // Give HbMainWindow time to complete show() function call. |
|
98 |
|
99 listItem->clearActions(); |
|
100 } |
|
101 |
82 BUBBLE_TEST_MAIN(ut_BubbleParticipantListItem) |
102 BUBBLE_TEST_MAIN(ut_BubbleParticipantListItem) |
83 #include "ut_bubbleparticipantlistitem.moc" |
103 #include "ut_bubbleparticipantlistitem.moc" |