videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/inc/testmpxvideoplaybackcontrolscontroller.h
author hgs
Fri, 16 Apr 2010 18:13:14 +0300
changeset 36 8aed59de29f9
parent 34 bbb98528c666
child 20 b9e04db066d4
permissions -rw-r--r--
201015

/**
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   tester for methods in Video Playback Controls Controller
* 
*/

// Version : %version:  2 %

#ifndef __TESTMPXVIDEOPLAYBACKCONTROLSCONTROLLER_H__
#define __TESTMPXVIDEOPLAYBACKCONTROLSCONTROLLER_H__


// INCLUDES
#include <QtTest/QtTest>
#include "mpxvideoplaybackcontrol.hrh"

// FORWARD DECLARATIONS
class HbVideoBasePlaybackView;
class CMPXVideoViewWrapper;
class QMPXVideoPlaybackControlsController;
class QMPXVideoPlaybackViewFileDetails;

class TestMPXVideoPlaybackControlsController : public QObject
{
    Q_OBJECT

public:

    /**
     * will be called before each testfunction is executed.
     *
     */
    void init(); 
    
    /**
     * will be called after every testfunction.
     *
     */
    void cleanup();
       
private:

    void verifyHandleEventStateChangedResult( int value );
    void verifyHandleEventTvOutResult( bool tvOutConnected, bool value );
    
private slots:
    
    //
    // test addFileDetails()
    //
    void testAddFileDetails();
    
    //
    // test handleEvent()
    //
    void testHandleEventSetPosition();
    void testHandleEventSetDuration();
    void testHandleEventStateChanged();
    void testHandleEventSetVolume();
    void testHandleEventSetAspectRatio();
    void testHandleEventSetDownloadSize();
    void testHandleEventDownloadUpdated();
    void testHandleEventDownloadComplete();
    void testHandleEventSetDownloadPaused();
    void testHandleEventClearDownloadPaused();
    void testHandleEventTvOutConnected();
    void testHandleEventTvOutDisconnected();
    void testHandleEventHandleErrors();
    void testHandleEventShowVolumeControls();
    
    //
    // test handleCommand()
    //
    void testHandleCommand();
    
    //
    // test handleTappedOnScreen()
    //
    void testHandleTappedOnScreen();
    
    //
    // test updateVideoRectDone()
    //
    void testUpdateVideoRectDone();

    //
    // test isAttachOperation()
    //
    void testIsAttachOperation();

    //
    // test private slot skipToNextVideoItem()
    //
    void testslot_skipToNextVideoItem();

    //
    // test private slot skipToPreviousVideoItem()
    //
    void testslot_skipToPreviousVideoItem();    
    
    //
    // test private slot attachVideo()
    //
    void testslot_attachVideo();  
  
signals:

    void commandSignal();
    
private:

    HbVideoBasePlaybackView*			    mBaseVideoView;
    CMPXVideoViewWrapper*			        mViewWrapper;
    QMPXVideoPlaybackControlsController*	mController;
    QMPXVideoPlaybackViewFileDetails*       mFileDetails;
        
};


#endif  // __TESTMPXVIDEOPLAYBACKCONTROLSCONTROLLER_H__

// End of file