phoneuis/bubblemanager2/tsrc/unit/ut_bubbleparticipantlistitem/ut_bubbleparticipantlistitem.cpp
--- a/phoneuis/bubblemanager2/tsrc/unit/ut_bubbleparticipantlistitem/ut_bubbleparticipantlistitem.cpp Mon Oct 04 16:06:10 2010 +0300
+++ b/phoneuis/bubblemanager2/tsrc/unit/ut_bubbleparticipantlistitem/ut_bubbleparticipantlistitem.cpp Fri Oct 15 12:58:46 2010 +0300
@@ -38,7 +38,8 @@
void testCreateItem();
void testUpdateChildItems();
-
+ void testUpdateChildItemsFirstTime();
+
private:
BubbleParticipantListItem* mItem;
HbMainWindow* mMainWindow;
@@ -79,5 +80,24 @@
mItem->updateChildItems();
}
+void ut_BubbleParticipantListItem::testUpdateChildItemsFirstTime()
+{
+ BubbleParticipantListItem* listItem = new BubbleParticipantListItem();
+ mMainWindow->addView(listItem);
+
+ // with two actions
+ HbAction act1("Action-1");
+ HbAction act2("Action-2");
+ listItem->addAction(&act1);
+ listItem->addAction(&act2);
+
+ listItem->updateChildItems();
+
+ mMainWindow->show();
+ QTest::qWait(300); // Give HbMainWindow time to complete show() function call.
+
+ listItem->clearActions();
+}
+
BUBBLE_TEST_MAIN(ut_BubbleParticipantListItem)
#include "ut_bubbleparticipantlistitem.moc"