33 #include "hbvideobaseplaybackview.h" |
33 #include "hbvideobaseplaybackview.h" |
34 #include "mpxvideoplaybackviewfiledetails.h" |
34 #include "mpxvideoplaybackviewfiledetails.h" |
35 #include "mpxvideoviewwrapper.h" |
35 #include "mpxvideoviewwrapper.h" |
36 #include "mpxvideoplaybackfullscreencontrol.h" |
36 #include "mpxvideoplaybackfullscreencontrol.h" |
37 #include "mpxvideoplaybackcontrolconfiguration.h" |
37 #include "mpxvideoplaybackcontrolconfiguration.h" |
38 #include "mpxvideoplaybacknontouchvolumebar.h" |
|
39 #include "thumbnailmanager_qt.h" |
38 #include "thumbnailmanager_qt.h" |
40 #include "mpxvideoplaybackdocumentloader.h" |
39 #include "mpxvideoplaybackdocumentloader.h" |
|
40 #include "hbvolumesliderpopup.h" |
|
41 #include "videoservices.h" |
|
42 #include "xqserviceutilxtra.h" |
41 |
43 |
42 #define private public |
44 #define private public |
43 #include "mpxvideoplaybackcontrolscontroller.h" |
45 #include "mpxvideoplaybackcontrolscontroller.h" |
44 #undef private |
46 #undef private |
45 |
47 |
248 |
250 |
249 init(); |
251 init(); |
250 TMPXVideoPlaybackControlCommandIds event = EMPXControlCmdStateChanged; |
252 TMPXVideoPlaybackControlCommandIds event = EMPXControlCmdStateChanged; |
251 |
253 |
252 // |
254 // |
253 // state change (EPbStateInitialised, streaming) |
|
254 // |
|
255 int value = EPbStateInitialised; |
|
256 mFileDetails->mPlaybackMode = EMPXVideoStreaming; |
|
257 mController->handleEvent( event, value ); |
|
258 verifyHandleEventStateChangedResult( value ); |
|
259 |
|
260 // |
|
261 // state change (EPbStateInitialised, live-streaming) |
|
262 // |
|
263 value = EPbStateInitialised; |
|
264 mFileDetails->mPlaybackMode = EMPXVideoLiveStreaming; |
|
265 mController->handleEvent( event, value ); |
|
266 verifyHandleEventStateChangedResult( value ); |
|
267 |
|
268 // |
|
269 // state change (EPbStateInitialised, non-streaming) |
|
270 // |
|
271 value = EPbStateInitialised; |
|
272 mFileDetails->mPlaybackMode = EMPXVideoLocal; |
|
273 mController->handleEvent( event, value ); |
|
274 verifyHandleEventStateChangedResult( value ); |
|
275 |
|
276 // |
|
277 // state change (EPbStateInitialising) |
255 // state change (EPbStateInitialising) |
278 // |
256 // |
279 value = EPbStateInitialising; |
257 int value = EPbStateInitialising; |
280 mController->handleEvent( event, value ); |
258 mController->handleEvent( event, value ); |
281 verifyHandleEventStateChangedResult( value ); |
259 verifyHandleEventStateChangedResult( value ); |
282 |
260 |
283 // |
261 // |
284 // state change (EPbStateBuffering) |
262 // state change (EPbStateBuffering) |
864 |
842 |
865 cleanup(); |
843 cleanup(); |
866 } |
844 } |
867 |
845 |
868 // ------------------------------------------------------------------------------------------------- |
846 // ------------------------------------------------------------------------------------------------- |
|
847 // TestMPXVideoPlaybackControlsController::testIsAttachOperation |
|
848 // ------------------------------------------------------------------------------------------------- |
|
849 // |
|
850 void TestMPXVideoPlaybackControlsController::testIsAttachOperation() |
|
851 { |
|
852 MPX_DEBUG(_L("TestMPXVideoPlaybackControlsController::testIsAttachOperation()") ); |
|
853 |
|
854 // |
|
855 // get access to XQServiceUtilXtra stub |
|
856 // |
|
857 XQServiceUtilXtra* extraUtil = XQServiceUtilXtra::instance(); |
|
858 |
|
859 // |
|
860 // set service enable |
|
861 // |
|
862 extraUtil->setCurrentService( true ); |
|
863 |
|
864 // |
|
865 // initialize controlscontroller |
|
866 // |
|
867 init(); |
|
868 |
|
869 // |
|
870 // verify 'mIsAttachOperation' flag is enabled |
|
871 // |
|
872 QVERIFY( mController->mIsAttachOperation == true ); |
|
873 |
|
874 // |
|
875 // clean up |
|
876 // |
|
877 cleanup(); |
|
878 |
|
879 // |
|
880 // set service disable |
|
881 // |
|
882 extraUtil->setCurrentService( false ); |
|
883 |
|
884 // |
|
885 // initialize controlscontroller |
|
886 // |
|
887 init(); |
|
888 |
|
889 // |
|
890 // verify 'mIsAttachOperation' flag is disabled |
|
891 // |
|
892 QVERIFY( mController->mIsAttachOperation == false ); |
|
893 |
|
894 // |
|
895 // clean up |
|
896 // |
|
897 cleanup(); |
|
898 |
|
899 // |
|
900 // dereference extraUtil count |
|
901 // |
|
902 extraUtil->decreaseReferenceCount(); |
|
903 |
|
904 } |
|
905 |
|
906 // ------------------------------------------------------------------------------------------------- |
869 // TestMPXVideoPlaybackControlsController::testslot_skipToNextVideoItem |
907 // TestMPXVideoPlaybackControlsController::testslot_skipToNextVideoItem |
870 // ------------------------------------------------------------------------------------------------- |
908 // ------------------------------------------------------------------------------------------------- |
871 // |
909 // |
872 void TestMPXVideoPlaybackControlsController::testslot_skipToNextVideoItem() |
910 void TestMPXVideoPlaybackControlsController::testslot_skipToNextVideoItem() |
873 { |
911 { |
905 disconnect( this, SIGNAL( commandSignal() ), mController, SLOT( skipToPreviousVideoItem() ) ); |
943 disconnect( this, SIGNAL( commandSignal() ), mController, SLOT( skipToPreviousVideoItem() ) ); |
906 |
944 |
907 cleanup(); |
945 cleanup(); |
908 } |
946 } |
909 |
947 |
|
948 // ------------------------------------------------------------------------------------------------- |
|
949 // TestMPXVideoPlaybackControlsController::testslot_attachVideo |
|
950 // ------------------------------------------------------------------------------------------------- |
|
951 // |
|
952 void TestMPXVideoPlaybackControlsController::testslot_attachVideo() |
|
953 { |
|
954 MPX_DEBUG(_L("TestMPXVideoPlaybackControlsController::testslot_attachVideo()") ); |
|
955 |
|
956 // |
|
957 // get access to XQServiceUtilXtra stub to enable XQServiceUtil::isService() method |
|
958 // |
|
959 XQServiceUtilXtra* extraUtil = XQServiceUtilXtra::instance(); |
|
960 |
|
961 // |
|
962 // set service enable |
|
963 // |
|
964 extraUtil->setCurrentService( true ); |
|
965 |
|
966 // |
|
967 // initialize controlscontroller |
|
968 // |
|
969 init(); |
|
970 |
|
971 // |
|
972 // connect signal with controller attachVideo() slot |
|
973 // |
|
974 bool res = connect( this, SIGNAL( commandSignal() ), mController, SLOT( attachVideo() ) ); |
|
975 |
|
976 // |
|
977 // emit signal, this will in turns invoke videoservices itemSelected() slot |
|
978 // |
|
979 emit commandSignal(); |
|
980 |
|
981 // |
|
982 // verify command EMPXPbvCmdClose has been issued |
|
983 // |
|
984 QVERIFY( mViewWrapper->mCommandId == EMPXPbvCmdClose ); |
|
985 |
|
986 // |
|
987 // verify videoservices itemSelected() slot is called |
|
988 // |
|
989 QVERIFY( mController->mVideoServices->mItemSelected == true ); |
|
990 |
|
991 // |
|
992 // disconnect signal |
|
993 // |
|
994 disconnect( this, SIGNAL( commandSignal() ), mController, SLOT( attachVideo() ) ); |
|
995 |
|
996 // |
|
997 // clean up |
|
998 // |
|
999 cleanup(); |
|
1000 |
|
1001 // |
|
1002 // dereference extraUtil count |
|
1003 // |
|
1004 extraUtil->decreaseReferenceCount(); |
|
1005 |
|
1006 } |
|
1007 |
|
1008 |
910 // End of file |
1009 // End of file |
911 |
1010 |
912 |
1011 |
913 |
1012 |