videoplayback/videoplaybackview/tsrc/testcontrolbar/src/testcontrolbar.cpp
changeset 62 0e1e938beb1a
parent 52 e3cecb93e76a
equal deleted inserted replaced
59:a76e86df7ccd 62:0e1e938beb1a
     1 /**
     1 /**
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   tester for methods in TestVideoPlaybackControlBar
    14 * Description:   tester for methods in TestVideoPlaybackControlBar
    15 * 
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  3 %
    18 // Version : %version:  4 %
    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>
    47 
    47 
    48     char *pass[3];
    48     char *pass[3];
    49     pass[0] = argv[0];
    49     pass[0] = argv[0];
    50     pass[1] = "-o";
    50     pass[1] = "-o";
    51     pass[2] = "c:\\data\\testcontrolbar.txt";
    51     pass[2] = "c:\\data\\testcontrolbar.txt";
    52     
    52 
    53     int res = QTest::qExec(&tv, 3, pass);
    53     int res = QTest::qExec(&tv, 3, pass);
    54     
    54 
    55     return res;
    55     return res;
    56 }
    56 }
    57 
    57 
    58 
    58 
    59 // ---------------------------------------------------------------------------
    59 // ---------------------------------------------------------------------------
    62 //
    62 //
    63 void TestControlBar::init()
    63 void TestControlBar::init()
    64 {
    64 {
    65     MPX_ENTER_EXIT(_L("TestControlBar::init()"));
    65     MPX_ENTER_EXIT(_L("TestControlBar::init()"));
    66 
    66 
    67     mController = new VideoPlaybackControlsController();   
    67     mController = new VideoPlaybackControlsController();
    68     mControlBar = new VideoPlaybackControlBar( mController );
    68     mControlBar = new VideoPlaybackControlBar( mController );
    69 
    69 
    70     mControlBar->initialize();
    70     mControlBar->initialize();
    71 }
    71 }
    72 
    72 
   210     QVERIFY( mControlBar->mProgressBar->mPosition == position );
   210     QVERIFY( mControlBar->mProgressBar->mPosition == position );
   211 
   211 
   212     cleanup();
   212     cleanup();
   213 }
   213 }
   214 
   214 
       
   215 // ---------------------------------------------------------------------------
       
   216 // testResetControl
       
   217 // ---------------------------------------------------------------------------
       
   218 //
       
   219 void TestControlBar::testResetControl()
       
   220 {
       
   221     MPX_ENTER_EXIT(_L("TestControlBar::testResetControl()"));
       
   222 
       
   223     init();
       
   224 
       
   225     QVERIFY( ! mControlBar->mProgressBar->mReset );
       
   226     QVERIFY( ! mControlBar->mToolBar->mReset );
       
   227 
       
   228     mControlBar->resetControl();
       
   229 
       
   230     QVERIFY( mControlBar->mProgressBar->mReset );
       
   231     QVERIFY( mControlBar->mToolBar->mReset );
       
   232 
       
   233     cleanup();
       
   234 }
       
   235 
   215 // End of file
   236 // End of file