videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/src/testmpxvideoplaybackcontrolbar.cpp
equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: tester for methods in TestMPXVideoPlaybackControlBar |
14 * Description: tester for methods in TestMPXVideoPlaybackControlBar |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: 1 % |
18 // Version : %version: 2 % |
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> |
24 |
24 |
25 #include "mpxvideoplaybackbuttonbar.h" |
25 #include "mpxvideoplaybacktoolbar.h" |
26 #include "mpxvideoplaybackprogressbar.h" |
26 #include "mpxvideoplaybackprogressbar.h" |
27 #include "testmpxvideoplaybackcontrolbar.h" |
27 #include "testmpxvideoplaybackcontrolbar.h" |
28 #include "mpxvideoplaybackviewfiledetails.h" |
28 #include "mpxvideoplaybackviewfiledetails.h" |
29 #include "mpxvideoplaybackcontrolscontroller.h" |
29 #include "mpxvideoplaybackcontrolscontroller.h" |
30 |
30 |
101 |
101 |
102 init(); |
102 init(); |
103 |
103 |
104 TMPXPlaybackState state = EPbStatePlaying; |
104 TMPXPlaybackState state = EPbStatePlaying; |
105 mControlBar->updateState( state ); |
105 mControlBar->updateState( state ); |
106 QVERIFY( mControlBar->mButtonBar->mState == EPbStatePlaying ); |
106 QVERIFY( mControlBar->mToolBar->mState == EPbStatePlaying ); |
107 |
107 |
108 state = EPbStatePaused; |
108 state = EPbStatePaused; |
109 mControlBar->updateState( state ); |
109 mControlBar->updateState( state ); |
110 QVERIFY( mControlBar->mButtonBar->mState == EPbStatePaused ); |
110 QVERIFY( mControlBar->mToolBar->mState == EPbStatePaused ); |
111 |
111 |
112 cleanup(); |
112 cleanup(); |
113 } |
113 } |
114 |
114 |
115 // --------------------------------------------------------------------------- |
115 // --------------------------------------------------------------------------- |
122 |
122 |
123 init(); |
123 init(); |
124 |
124 |
125 int aspectRatio = 1; |
125 int aspectRatio = 1; |
126 mControlBar->aspectRatioChanged( aspectRatio ); |
126 mControlBar->aspectRatioChanged( aspectRatio ); |
127 QVERIFY( mControlBar->mButtonBar->mAspectRatio == aspectRatio ); |
127 QVERIFY( mControlBar->mToolBar->mAspectRatio == aspectRatio ); |
128 |
128 |
129 cleanup(); |
129 cleanup(); |
130 } |
130 } |
131 |
131 |
132 // --------------------------------------------------------------------------- |
132 // --------------------------------------------------------------------------- |
143 details->mSeekable = false; |
143 details->mSeekable = false; |
144 details->mVideoEnabled = true; |
144 details->mVideoEnabled = true; |
145 |
145 |
146 mControlBar->updateWithFileDetails( details ); |
146 mControlBar->updateWithFileDetails( details ); |
147 |
147 |
148 QVERIFY( mControlBar->mButtonBar->mFileDetails->mSeekable == details->mSeekable ); |
148 QVERIFY( mControlBar->mToolBar->mFileDetails->mSeekable == details->mSeekable ); |
149 QVERIFY( mControlBar->mProgressBar->mFileDetails->mVideoEnabled == details->mVideoEnabled ); |
149 QVERIFY( mControlBar->mProgressBar->mFileDetails->mVideoEnabled == details->mVideoEnabled ); |
150 |
150 |
151 cleanup(); |
151 cleanup(); |
152 } |
152 } |
153 |
153 |