videoplayback/videoplaybackview/tsrc/testtoolbar/src/testtoolbar.cpp
changeset 62 0e1e938beb1a
parent 52 e3cecb93e76a
equal deleted inserted replaced
59:a76e86df7ccd 62:0e1e938beb1a
    13 *
    13 *
    14 * Description:   tester for methods in TestToolBar
    14 * Description:   tester for methods in TestToolBar
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  7 %
    18 // Version : %version:  8 %
    19 
    19 
    20 
    20 
    21 #include <qdebug>
    21 #include <qdebug>
    22 #include <hbmainwindow.h>
    22 #include <hbmainwindow.h>
    23 #include <hbapplication.h>
    23 #include <hbapplication.h>
   673     // clean up
   673     // clean up
   674     //
   674     //
   675     cleanup();
   675     cleanup();
   676 }
   676 }
   677 
   677 
       
   678 // -------------------------------------------------------------------------------------------------
       
   679 // testResetControl
       
   680 // -------------------------------------------------------------------------------------------------
       
   681 //
       
   682 void TestToolBar::testResetControl()
       
   683 {
       
   684     MPX_ENTER_EXIT(_L("TestToolBar::testResetControl()"));
       
   685 
       
   686     init( true );
       
   687 
       
   688     //
       
   689     // FF
       
   690     //
       
   691     mVideoToolBar->mSeekingState = EFastForwarding;
       
   692     mController->mTimerAction = ETimerCancel;
       
   693     mController->mCommand = EMPXPbvCmdSeekForward;
       
   694 
       
   695     mVideoToolBar->resetControl();
       
   696 
       
   697     QVERIFY( mVideoToolBar->mSeekingState == ENotSeeking );
       
   698     QVERIFY( mController->mTimerAction == ETimerReset );
       
   699     QVERIFY( mController->mCommand == EMPXPbvCmdEndSeek );
       
   700 
       
   701     //
       
   702     // RW
       
   703     //
       
   704     mController->mTimerAction = ETimerCancel;
       
   705     mController->mCommand = EMPXPbvCmdSeekForward;
       
   706     mVideoToolBar->mSeekingState = ERewinding;
       
   707 
       
   708     mVideoToolBar->resetControl();
       
   709 
       
   710     QVERIFY( mVideoToolBar->mSeekingState == ENotSeeking );
       
   711     QVERIFY( mController->mTimerAction == ETimerReset );
       
   712     QVERIFY( mController->mCommand == EMPXPbvCmdEndSeek );
       
   713 
       
   714     //
       
   715     // Not seeking
       
   716     //
       
   717     mController->mTimerAction = ETimerCancel;
       
   718     mController->mCommand = EMPXPbvCmdPlay;
       
   719     mVideoToolBar->mSeekingState = ENotSeeking;
       
   720 
       
   721     mVideoToolBar->resetControl();
       
   722 
       
   723     QVERIFY( mVideoToolBar->mSeekingState == ENotSeeking );
       
   724     QVERIFY( mController->mTimerAction == ETimerCancel );
       
   725     QVERIFY( mController->mCommand == EMPXPbvCmdPlay );
       
   726 
       
   727     //
       
   728     // clean up
       
   729     //
       
   730     cleanup();
       
   731 }
       
   732 
   678 // End of file
   733 // End of file