videoplayback/videoplaybackview/tsrc/testtoolbar/src/testtoolbar.cpp
changeset 58 d2b028fd1f7d
parent 50 21fe8338c6bf
child 66 adb51f74b890
--- a/videoplayback/videoplaybackview/tsrc/testtoolbar/src/testtoolbar.cpp	Mon Aug 23 14:27:29 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testtoolbar/src/testtoolbar.cpp	Fri Sep 03 12:37:43 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  7 %
+// Version : %version:  8 %
 
 
 #include <qdebug>
@@ -675,4 +675,59 @@
     cleanup();
 }
 
+// -------------------------------------------------------------------------------------------------
+// testResetControl
+// -------------------------------------------------------------------------------------------------
+//
+void TestToolBar::testResetControl()
+{
+    MPX_ENTER_EXIT(_L("TestToolBar::testResetControl()"));
+
+    init( true );
+
+    //
+    // FF
+    //
+    mVideoToolBar->mSeekingState = EFastForwarding;
+    mController->mTimerAction = ETimerCancel;
+    mController->mCommand = EMPXPbvCmdSeekForward;
+
+    mVideoToolBar->resetControl();
+
+    QVERIFY( mVideoToolBar->mSeekingState == ENotSeeking );
+    QVERIFY( mController->mTimerAction == ETimerReset );
+    QVERIFY( mController->mCommand == EMPXPbvCmdEndSeek );
+
+    //
+    // RW
+    //
+    mController->mTimerAction = ETimerCancel;
+    mController->mCommand = EMPXPbvCmdSeekForward;
+    mVideoToolBar->mSeekingState = ERewinding;
+
+    mVideoToolBar->resetControl();
+
+    QVERIFY( mVideoToolBar->mSeekingState == ENotSeeking );
+    QVERIFY( mController->mTimerAction == ETimerReset );
+    QVERIFY( mController->mCommand == EMPXPbvCmdEndSeek );
+
+    //
+    // Not seeking
+    //
+    mController->mTimerAction = ETimerCancel;
+    mController->mCommand = EMPXPbvCmdPlay;
+    mVideoToolBar->mSeekingState = ENotSeeking;
+
+    mVideoToolBar->resetControl();
+
+    QVERIFY( mVideoToolBar->mSeekingState == ENotSeeking );
+    QVERIFY( mController->mTimerAction == ETimerCancel );
+    QVERIFY( mController->mCommand == EMPXPbvCmdPlay );
+
+    //
+    // clean up
+    //
+    cleanup();
+}
+
 // End of file