videocollection/videocollectionview/tsrc/testlisttoolbar/src/testlisttoolbar.cpp
changeset 66 adb51f74b890
parent 63 4707a0db12f6
equal deleted inserted replaced
63:4707a0db12f6 66:adb51f74b890
    13 *
    13 *
    14 * Description:   tester for methods in VideoListToolbar
    14 * Description:   tester for methods in VideoListToolbar
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 2 %
    18 // Version : %version: 3 %
    19 
    19 
    20 #include <hbapplication.h>
    20 #include <hbapplication.h>
    21 #include <qlist.h>
    21 #include <qlist.h>
    22 #include <hbaction.h>
    22 #include <hbaction.h>
    23 #include <videocollectioncommon.h>
    23 #include <videocollectioncommon.h>
   548     
   548     
   549     disconnect(mTestObject, SIGNAL(actionsChanged(QList<QAction*>)), this, SLOT(testActionsChangedSlot(QList<QAction*>)));
   549     disconnect(mTestObject, SIGNAL(actionsChanged(QList<QAction*>)), this, SLOT(testActionsChangedSlot(QList<QAction*>)));
   550     disconnect(mTestObject, SIGNAL(toolbarExtensionChanged(HbToolBarExtension*)), this, SLOT(testToolbarExtensionChangedSlot(HbToolBarExtension*)));
   550     disconnect(mTestObject, SIGNAL(toolbarExtensionChanged(HbToolBarExtension*)), this, SLOT(testToolbarExtensionChangedSlot(HbToolBarExtension*)));
   551 }
   551 }
   552 
   552 
   553 
       
   554 
       
   555 
       
   556 // ---------------------------------------------------------------------------
       
   557 // testOpenOperatorServiceSlot
       
   558 // ---------------------------------------------------------------------------
       
   559 //
       
   560 void TestListToolbar::testOpenOperatorServiceSlot()
       
   561 {
       
   562     mTestObject->initialize();
       
   563     // no operator services
       
   564     mTestObject->openOperatorServiceSlot();
       
   565     QVERIFY(VideoOperatorServiceData::mLaunchServiceCallCount == 0);
       
   566     
       
   567     cleanup();
       
   568     init();
       
   569     VideoOperatorServiceData::mTitles.append("TestTitle");
       
   570     VideoOperatorServiceData::mUris.append("TestURI");
       
   571     VideoOperatorServiceData::mIcons.append("TestIcon"); 
       
   572     mTestObject->initialize();
       
   573     // more than zero operator services
       
   574     mTestObject->openOperatorServiceSlot();
       
   575     QVERIFY(VideoOperatorServiceData::mLaunchServiceCallCount == 1);
       
   576 }
       
   577  
       
   578 // ---------------------------------------------------------------------------
   553 // ---------------------------------------------------------------------------
   579 // testAddVideosToCollectionSlot
   554 // testAddVideosToCollectionSlot
   580 // ---------------------------------------------------------------------------
   555 // ---------------------------------------------------------------------------
   581 //
   556 //
   582 void TestListToolbar::testAddVideosToCollectionSlot()
   557 void TestListToolbar::testAddVideosToCollectionSlot()