--- a/phoneuis/bubblemanager2/tsrc/unit/ut_bubblestyleplugin/ut_bubblestyleplugin.cpp Fri Apr 16 14:58:25 2010 +0300
+++ b/phoneuis/bubblemanager2/tsrc/unit/ut_bubblestyleplugin/ut_bubblestyleplugin.cpp Mon May 03 12:31:11 2010 +0300
@@ -53,6 +53,7 @@
void testVoipCallStatusIcon();
void testNumberTypeIcon();
void testCipheringIcon();
+ void testAvatar();
private:
BubbleStylePlugin* mPluginInstance;
@@ -365,5 +366,21 @@
QVERIFY(icon->icon().iconName()=="");
}
+void ut_BubbleStylePlugin::testAvatar()
+{
+ QGraphicsItem *item = mPlugin->createPrimitive(
+ (HbStyle::Primitive)(BP_DefaultAvatar_icon),mParent);
+ QVERIFY(item);
+ QVERIFY(item->parentItem()==mParent);
+
+ HbIconItem* icon = qgraphicsitem_cast<HbIconItem*>(item);
+ QVERIFY(icon);
+ BubbleStyleOption option;
+ mPlugin->updatePrimitive(
+ item, (HbStyle::Primitive)(BP_DefaultAvatar_icon),
+ &option);
+ QVERIFY(icon->icon().iconName()=="qtg_large_avatar");
+}
+
BUBBLE_TEST_MAIN(ut_BubbleStylePlugin)
#include "ut_bubblestyleplugin.moc"