videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/src/testmpxvideoviewwrapper.cpp
--- a/videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/src/testmpxvideoviewwrapper.cpp Mon Sep 20 18:25:37 2010 +0300
+++ b/videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/src/testmpxvideoviewwrapper.cpp Tue Oct 05 09:26:49 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 18 %
+// Version : %version: 20 %
#include <e32err.h>
#include <w32std.h>
@@ -37,6 +37,7 @@
#include "mpxcollectionutility.h"
#include "mpxcollectionplaylist.h"
#include "testmpxvideoviewwrapper.h"
+#include "devsoundif.h"
#include "../stub/inc/videobaseplaybackview.h"
#include "../stub/inc/videoplaybackviewfiledetails.h"
@@ -837,8 +838,6 @@
QVERIFY( err == KErrNone );
QCOMPARE( mVideoViewWrapper->iView->mCurrentError, KErrNone );
QVERIFY( mVideoViewWrapper->iControlsController->mFileDetailsAdded );
- QVERIFY( mVideoViewWrapper->iControlsController->mReceivedEvent == EControlCmdSetAspectRatio );
- QVERIFY( mVideoViewWrapper->iControlsController->mValue == EMMFNatural );
QVERIFY( mVideoViewWrapper->iPlaybackUtility->iCommand == EPbCmdPlay );
QVERIFY( mVideoViewWrapper->iMediaRequestStatus == MediaDelivered );
@@ -872,8 +871,6 @@
QVERIFY( err == KErrNone );
QCOMPARE( mVideoViewWrapper->iView->mCurrentError, KErrNone );
QVERIFY( mVideoViewWrapper->iControlsController->mFileDetailsAdded );
- QVERIFY( mVideoViewWrapper->iControlsController->mReceivedEvent == EControlCmdSetAspectRatio );
- QVERIFY( mVideoViewWrapper->iControlsController->mValue == EMMFNatural );
QVERIFY( mVideoViewWrapper->iPlaybackUtility->iCommand == EPbCmdPause );
QVERIFY( mVideoViewWrapper->iMediaRequestStatus == MediaDelivered );
@@ -906,8 +903,6 @@
QVERIFY( err == KErrNone );
QVERIFY( ! mVideoViewWrapper->iControlsController->mFileDetailsAdded );
- QVERIFY( mVideoViewWrapper->iControlsController->mReceivedEvent == EControlCmdSetAspectRatio );
- QVERIFY( mVideoViewWrapper->iControlsController->mValue == EMMFNatural );
QVERIFY( mVideoViewWrapper->iPlaybackUtility->iCommand == EPbCmdPause );
QCOMPARE( mVideoViewWrapper->iView->mCurrentError, KErrNone );
QVERIFY( mVideoViewWrapper->iMediaRequestStatus == MediaDelivered );
@@ -966,4 +961,35 @@
cleanup();
}
+void TestMPXVideoViewWrapper::testVolumeSteps()
+{
+ init();
+
+ int volumeSteps = 0;
+
+ TRAP_IGNORE( {
+ CDevSoundIf* devSoundIf = CDevSoundIf::NewL();
+ volumeSteps = devSoundIf->GetNumberOfVolumeSteps();
+ delete devSoundIf;
+ } );
+
+ QVERIFY( mVideoViewWrapper->VolumeSteps() == volumeSteps );
+
+ cleanup();
+}
+
+void TestMPXVideoViewWrapper::testSetDefaultAspectRatio()
+{
+ init();
+
+ int aspectRatio = 3;
+
+ mVideoViewWrapper->SetDefaultAspectRatio( aspectRatio );
+
+ QVERIFY( mVideoViewWrapper->iControlsController->mReceivedEvent == EControlCmdSetAspectRatio );
+ QVERIFY( mVideoViewWrapper->iControlsController->mValue == aspectRatio );
+
+ cleanup();
+}
+
// End of file