videocollection/videocollectionview/tsrc/testvideocollectionuiloader/src/testvideocollectionuiloader.cpp
changeset 24 7d93ee07fb27
parent 17 69946d1824c4
child 28 c48470be1ba7
--- a/videocollection/videocollectionview/tsrc/testvideocollectionuiloader/src/testvideocollectionuiloader.cpp	Fri May 14 15:53:50 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideocollectionuiloader/src/testvideocollectionuiloader.cpp	Thu May 27 12:53:14 2010 +0300
@@ -211,6 +211,15 @@
     mTestObject->addData(params,
         this,
         SLOT(handleObjectReady(QObject*, const QString&)));
+    
+    // first test the findWidget with loadIfNotFound == false.
+    bannerWidget =
+        mTestObject->findWidget<HbGroupBox>(
+            DOCML_NAME_VC_HEADINGBANNER, false);
+    QVERIFY(!bannerWidget);
+    QVERIFY(!mObjects.contains(DOCML_NAME_VC_HEADINGBANNER));
+    
+    // then with default value.
     bannerWidget =
         mTestObject->findWidget<HbGroupBox>(
             DOCML_NAME_VC_HEADINGBANNER);
@@ -295,6 +304,13 @@
     // -object added in loading queue
     params.append(addToCollectionParam);
     mTestObject->addData(params, this, SLOT(handleObjectReady(QObject*, const QString&)));
+    
+    // first test with loadIfNotFound == false
+    addToCollection = mTestObject->findObject<HbAction>(DOCML_NAME_ADD_TO_COLLECTION, false);
+    QVERIFY(!addToCollection);
+    QVERIFY(!mObjects.contains(DOCML_NAME_ADD_TO_COLLECTION));
+    
+    // then with default value.
     addToCollection = mTestObject->findObject<HbAction>(DOCML_NAME_ADD_TO_COLLECTION);
     QVERIFY(addToCollection);
     QVERIFY(mObjects.contains(DOCML_NAME_ADD_TO_COLLECTION));