mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/src/testvideoplayer.cpp
branchRCL_3
changeset 49 735348f59235
parent 40 f429a0a2075b
child 50 948c7f65f6d4
equal deleted inserted replaced
40:f429a0a2075b 49:735348f59235
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
  1129     
  1129     
  1130     TPoint clipOrigin(10, 10);
  1130     TPoint clipOrigin(10, 10);
  1131     TSize clipSize(176, 144);
  1131     TSize clipSize(176, 144);
  1132     TRect clipRect(clipOrigin, clipSize);
  1132     TRect clipRect(clipOrigin, clipSize);
  1133     
  1133     
  1134     // first call tests creation of display instance
       
  1135     TRAPD(err, aPlayer->SetDisplayWindowL(iWs, *iScreen, *iWindow, rect, clipRect));
  1134     TRAPD(err, aPlayer->SetDisplayWindowL(iWs, *iScreen, *iWindow, rect, clipRect));
  1136     INFO_PRINTF1(_L("Test : Made first call to SetDisplayWindowL()"));
       
  1137     if(err)
  1135     if(err)
  1138         {
  1136         {
  1139         ERR_PRINTF2(_L("First call to SetDisplayWindowL() failed, error %d"), err);
  1137         ERR_PRINTF2(_L("SetDisplayWindowL() failed, error %d"), err);
  1140         CActiveScheduler::Stop();
       
  1141         return EFail;
       
  1142         }
       
  1143 
       
  1144     // second call tests update of display instance
       
  1145     TRAP(err, aPlayer->SetDisplayWindowL(iWs, *iScreen, *iWindow, rect, clipRect));
       
  1146     INFO_PRINTF1(_L("Test : Made second call to SetDisplayWindowL()"));
       
  1147     if(err)
       
  1148         {
       
  1149         ERR_PRINTF2(_L("Second call to SetDisplayWindowL() failed, error %d"), err);
       
  1150         ret = EFail;
  1138         ret = EFail;
  1151         }
  1139         }
  1152     else
  1140     else
  1153         {
  1141         {
  1154         ret = EPass;
  1142         ret = EPass;
  1155         }
  1143         }
  1156 
  1144 
  1157     CActiveScheduler::Stop();
  1145     CActiveScheduler::Stop();
       
  1146         
  1158     return ret;
  1147     return ret;
  1159     }
  1148     }
  1160 
  1149 
  1161 
  1150 
  1162 //
  1151 //
  1828                 }
  1817                 }
  1829             }    
  1818             }    
  1830         
  1819         
  1831         TInt failCount = 1;
  1820         TInt failCount = 1;
  1832         TBool completed = EFalse;
  1821         TBool completed = EFalse;
  1833         iAllocTestStepResult = EPass; // TODO check?? assume pass
  1822         iAllocTestStepResult = EPass; // XXX check?? assume pass
  1834         TBool reachedEnd = EFalse; // Note: declare outside loop to help with debugging
  1823         TBool reachedEnd = EFalse; // Note: declare outside loop to help with debugging
  1835         for(;;)    
  1824         for(;;)    
  1836             {
  1825             {
  1837             __UHEAP_SETFAIL(RHeap::EFailNext, failCount);
  1826             __UHEAP_SETFAIL(RHeap::EFailNext, failCount);
  1838             __MM_HEAP_MARK;
  1827             __MM_HEAP_MARK;