--- a/videoplayback/videoplaybackview/tsrc/testtoolbar/src/testtoolbar.cpp Thu Sep 02 20:28:16 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testtoolbar/src/testtoolbar.cpp Fri Sep 17 08:30:05 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