videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/src/userinputhandlertestBlocks.cpp
branchRCL_3
changeset 8 ce5ada96ab30
parent 0 96612d01cf9f
child 9 5294c000a26d
equal deleted inserted replaced
6:7d91903f795f 8:ce5ada96ab30
    13 *
    13 *
    14 * Description:  Video Playback User Input Handler Test class for STIF unit testing
    14 * Description:  Video Playback User Input Handler Test class for STIF unit testing
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: ou1cpsw#5 %
    18 // Version : %version: 6 %
    19 
    19 
    20 
    20 
    21 // [INCLUDE FILES] - do not remove
    21 // [INCLUDE FILES] - do not remove
    22 #include <e32svr.h>
    22 #include <e32svr.h>
    23 #include <e32std.h>
    23 #include <e32std.h>
    31 #include "videoplaybackcontainer_stub.h"
    31 #include "videoplaybackcontainer_stub.h"
    32 #include "videoplaybackcontrol_stub.h"
    32 #include "videoplaybackcontrol_stub.h"
    33 #include "mpxvideoplaybackuserinputhandler.h"
    33 #include "mpxvideoplaybackuserinputhandler.h"
    34 #include "mpxvideo_debug.h"
    34 #include "mpxvideo_debug.h"
    35 #include "hal_stub.h"
    35 #include "hal_stub.h"
    36 #include <hal_data.h>
       
    37 
    36 
    38 //
    37 //
    39 // pre-define
    38 // pre-define
    40 //
    39 //
    41 _LIT( KPtrTypeParameter, "ptrtype=" );
    40 _LIT( KPtrTypeParameter, "ptrtype=" );
   577 //
   576 //
   578 TInt CUserinputhandlertest::CheckBacklightState( CStifItemParser& aItem )
   577 TInt CUserinputhandlertest::CheckBacklightState( CStifItemParser& aItem )
   579 {
   578 {
   580     MPX_DEBUG(_L("CUserinputhandlertest::CheckBacklightState()"));
   579     MPX_DEBUG(_L("CUserinputhandlertest::CheckBacklightState()"));
   581 
   580 
   582     TBool backlightState;
   581     TLightStatus backlightState = ELightStatusUnknown;
   583     TInt status;
   582     TInt status;
   584     
   583     
   585     HAL::Get( HALData::EBacklightState, backlightState );    
   584     CHWRMLight* light = NULL;
       
   585     MPX_TRAPD( err, light = CHWRMLight::NewL() );
       
   586     backlightState = light->LightStatus( CHWRMLight::EPrimaryDisplay );
       
   587     delete light;
   586 
   588 
   587     TInt result = aItem.GetNextInt( status );
   589     TInt result = aItem.GetNextInt( status );
   588 
   590 
   589     if ( result == KErrNone && status == backlightState )
   591     if ( result == KErrNone && status == backlightState )
   590     {
   592     {