uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomavkonpsln/src/bctestdomakncase.cpp
changeset 21 558113899881
parent 14 3320e4e6e8bb
child 22 75713bee6484
child 33 b3425bf29f82
equal deleted inserted replaced
14:3320e4e6e8bb 21:558113899881
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <w32std.h>
       
    20 #include <e32const.h>
       
    21 #include <coecntrl.h>
       
    22 #include <barsread.h>
       
    23 #include <badesca.h>
       
    24 #include <fbs.h>
       
    25 #include <aknskinnableclock.h>
       
    26 #include <aknsmallindicator.h>
       
    27 /*
       
    28 The "class TAknWindowComponentLayout;" and "class CAknStylusActivatedItem;" 
       
    29 should be added when "aknstylusactivatedpopupcontent.h" is used.
       
    30 */
       
    31 class CAknStylusActivatedItem;
       
    32 class TAknWindowComponentLayout;
       
    33 #include <aknstylusactivatedpopupcontent.h>
       
    34 #include <aknsoftnotificationparameters.h>
       
    35 #include <aknnotedialog.h>
       
    36 #include <aknsoftnotifier.h>
       
    37 #include <aknstatuspaneutils.h>
       
    38 #include <aknsyncdraw.h>
       
    39 #include <akntasklist.h>
       
    40 #include <akntransitionutils.h>
       
    41 #include <aknvolumepopup.h>
       
    42 #include <aknform.h> 
       
    43 #include <aknsystemfont.h>
       
    44 #include <s32file.h>
       
    45 #include <s32strm.h>
       
    46 
       
    47 #include <avkon.mbg>
       
    48 #include <bctestdomavkonpsln.rsg>
       
    49 
       
    50 #include "bctestdomakncase.h"
       
    51 #include "bctestdomavkonpslncontainer.h"
       
    52 #include "bctestdomavkonpslnext.h"
       
    53 #include "bctestdomavkonpsln.hrh"
       
    54 
       
    55 
       
    56 //CONSTANTS
       
    57 
       
    58 const TInt KWidth = 25;
       
    59 const TInt KHeight = 25;
       
    60 const TInt KShareVolumeUid = 0x000000001;
       
    61 const TInt KViewerUid = 0x10282D0A;
       
    62 const TInt KVolumeMaxValue = 10;
       
    63 const TInt KVolumeMinValue = 0;
       
    64 const TInt KDesLength = 24;
       
    65 const TInt KTimeOut = 5;
       
    66 const TInt KStepSize = 2;
       
    67 const TInt KGraphicMode = 100;
       
    68 
       
    69 _LIT( KFilePath, "c:\\bctestlog\\rest.txt" );
       
    70 _LIT8( KMessage, "Message Descriptor" );
       
    71 _LIT( KTitle, "Title" );
       
    72 _LIT( KText, "Text" );
       
    73 _LIT( KDriver, "C:" );
       
    74 
       
    75 
       
    76 
       
    77 // ======== MEMBER FUNCTIONS ========
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // Symbian 2nd static Constructor
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 CBCTestDomAknCase* CBCTestDomAknCase::NewL( CBCTestDomAvkonPslnContainer* 
       
    84     aContainer )
       
    85     {
       
    86     CBCTestDomAknCase* self = new( ELeave ) CBCTestDomAknCase( 
       
    87         aContainer );
       
    88     CleanupStack::PushL( self );
       
    89     self->ConstructL();
       
    90     CleanupStack::Pop( self );
       
    91     return self;
       
    92     }
       
    93     
       
    94 // ---------------------------------------------------------------------------
       
    95 // C++ default constructor
       
    96 // ---------------------------------------------------------------------------
       
    97 //
       
    98 CBCTestDomAknCase::CBCTestDomAknCase( CBCTestDomAvkonPslnContainer* 
       
    99     aContainer )
       
   100     : iContainer( aContainer )
       
   101     {    
       
   102     }
       
   103     
       
   104 // ---------------------------------------------------------------------------
       
   105 // Destructor
       
   106 // ---------------------------------------------------------------------------
       
   107 //
       
   108 CBCTestDomAknCase::~CBCTestDomAknCase()
       
   109     {  
       
   110     }
       
   111     
       
   112 // ---------------------------------------------------------------------------
       
   113 // Symbian 2nd Constructor
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 void CBCTestDomAknCase::ConstructL()
       
   117     {    
       
   118     BuildScriptL();    
       
   119     }
       
   120     
       
   121 // ---------------------------------------------------------------------------
       
   122 // CBCTestDomAknCase::BuildScriptL
       
   123 // ---------------------------------------------------------------------------
       
   124 //
       
   125 void CBCTestDomAknCase::BuildScriptL()
       
   126     { 
       
   127     const TInt scripts[] =
       
   128         {
       
   129         DELAY(2),   // delay between commands is 1*0.1 seconds = 0.1 seconds  
       
   130         LeftCBA,
       
   131         KeyOK,
       
   132         KeyOK,
       
   133         KeyOK
       
   134         };
       
   135     AddTestScriptL( scripts, sizeof(scripts)/sizeof(TInt) );    
       
   136     }
       
   137     
       
   138 // ---------------------------------------------------------------------------
       
   139 // CBCTestDomAknCase::RunL
       
   140 // ---------------------------------------------------------------------------
       
   141 //
       
   142 void CBCTestDomAknCase::RunL( TInt aCmd )
       
   143     {
       
   144     if ( aCmd != EBCTestCmdOutline1 )
       
   145         {
       
   146         return;
       
   147         }
       
   148     switch ( aCmd )  
       
   149         {
       
   150         case EBCTestCmdOutline1:
       
   151             TestSkinnableClockL();
       
   152             TestSmallIndicatorL();
       
   153             TestSoftNotifierL();
       
   154             TestStatuspaneUtilsL();
       
   155             TestPopupContentL();
       
   156             TestTransitionL();
       
   157             TestCameraSettingPageL();
       
   158             TestAknVolumePopupL();
       
   159             TestLafSystemFontL();
       
   160             TestTaskListL();
       
   161             break;
       
   162         default:
       
   163             break;
       
   164         }
       
   165     }
       
   166 
       
   167 // ---------------------------------------------------------------------------
       
   168 // CBCTestDomAknCase::TestSkinnableClock()
       
   169 // ---------------------------------------------------------------------------
       
   170 //    
       
   171 void CBCTestDomAknCase::TestSkinnableClockL()
       
   172     {
       
   173     // Test some API here
       
   174     _LIT( KNewL, "CAknSkinnableClock::NewL invoked" );
       
   175     _LIT( KUpdateDisplay, "CAknSkinnableClock::NewL UpdateDisplay invoked" );
       
   176     _LIT( KSetFormatL, "CAknSkinnableClock::NewL SetFormatL invoked" );
       
   177     _LIT( KDes, "CAknSkinnableClock::~CAknSkinnableClock invoked" );
       
   178     
       
   179     CAknSkinnableClock* clock = 
       
   180         CAknSkinnableClock::NewL( iContainer, ETrue, ETrue );
       
   181     CleanupStack::PushL( clock );
       
   182     AssertNotNullL( clock, KNewL );
       
   183     
       
   184     clock->UpdateDisplay();
       
   185     AssertTrueL( ETrue, KUpdateDisplay );
       
   186     
       
   187     clock->SetFormatL( EClockDigital );
       
   188     AssertTrueL( ETrue, KSetFormatL );
       
   189     
       
   190     clock->PositionChanged();
       
   191     TPointerEvent event;
       
   192     event.iType = TPointerEvent::EButton1Down;
       
   193     event.iModifiers = 0;
       
   194     TPoint eventPos( KWidth, KHeight );
       
   195     event.iPosition = eventPos;
       
   196     event.iParentPosition = eventPos;
       
   197     
       
   198     clock->HandlePointerEventL( event );
       
   199     CleanupStack::Pop( clock );
       
   200     delete clock;
       
   201     AssertTrueL( ETrue, KDes );
       
   202     
       
   203     }
       
   204  
       
   205 // ---------------------------------------------------------------------------
       
   206 // CBCTestDomAknCase::TestSmallIndicator
       
   207 // ---------------------------------------------------------------------------
       
   208 //       
       
   209 void CBCTestDomAknCase::TestSmallIndicatorL()
       
   210     {
       
   211     // Test some API here
       
   212     _LIT( KNewL, "CAknSmallIndicator::NewL invoked" );
       
   213     _LIT( KDes, "CAknSmallIndicator::~CAknSmallIndicator invoked" );
       
   214     _LIT( KNewLC, "CAknSmallIndicator::NewLC invoked" );
       
   215     _LIT( KSetIndicatorStateL, 
       
   216         "CAknSmallIndicator::SetIndicatorStateL invoked" );
       
   217     _LIT( KHandleIndicatorTapL, 
       
   218         "CAknSmallIndicator::HandleIndicatorTapL invoked" );
       
   219     
       
   220     CAknSmallIndicator* indicator = 
       
   221         CAknSmallIndicator::NewL( TUid::Uid( KViewerUid ) );
       
   222     CleanupStack::PushL( indicator );
       
   223     AssertNotNullL( indicator, KNewL );
       
   224     
       
   225     CleanupStack::Pop( indicator );
       
   226     delete indicator;
       
   227     AssertTrueL( ETrue, KDes );
       
   228     
       
   229     indicator = CAknSmallIndicator::NewLC( TUid::Uid( KViewerUid ) );
       
   230     AssertNotNullL( indicator, KNewLC );
       
   231     
       
   232     indicator->SetIndicatorStateL( 0 );
       
   233     AssertTrueL( ETrue, KSetIndicatorStateL );
       
   234     
       
   235     indicator->HandleIndicatorTapL();
       
   236     AssertTrueL( ETrue, KHandleIndicatorTapL );
       
   237     
       
   238     CleanupStack::PopAndDestroy( indicator );
       
   239     
       
   240     }
       
   241  
       
   242 // ---------------------------------------------------------------------------
       
   243 // CBCTestDomAknCase::TestSoftNotifier
       
   244 // ---------------------------------------------------------------------------
       
   245 //    
       
   246 void CBCTestDomAknCase::TestSoftNotifierL()
       
   247     {
       
   248     
       
   249     _LIT( KNewL, "CAknSoftNotificationParameters::NewL invoked" );
       
   250     _LIT( KDes, 
       
   251         "CAknSoftNotificationParameters::~CAknSNParameters invoked" );
       
   252     _LIT( KNewLOver, "CAknSoftNotificationParameters::NewL overload invoked" );
       
   253     _LIT( KNewLOverLoad, 
       
   254         "CAknSoftNotificationParameters::NewL overload invoked" );
       
   255     _LIT( KNotifierNewL, "CAknSoftNotifier::NewL invoked" );
       
   256     _LIT( KNotifierDes, "CAknSoftNotifier::~CAknSoftNotifier invoked" );
       
   257     _LIT( KNewLC, "CAknSoftNotifier::NewLC invoked" );
       
   258     _LIT( KAddNotificationL, "CAknSoftNotifier::AddNotificationL invoked" );
       
   259     _LIT( KAddNotificationLOverLoad, 
       
   260         "CAknSoftNotifier::AddNotificationL overload invoked" );
       
   261     _LIT( KSetNotificationCountL, 
       
   262         "CAknSoftNotifier::SetNotificationCountL invoked" );
       
   263     _LIT( KCancelSoftNotificationL, 
       
   264         "CAknSoftNotifier::CancelSoftNotificationL invoked" );
       
   265     _LIT( KAddCustomNotificationL, 
       
   266         "CAknSoftNotifier::AddCustomNotificationL invoked" );
       
   267     _LIT( KSetCustomNotificationCountL, 
       
   268         "CAknSoftNotifier::SetCustomNotificationCountL invoked" );
       
   269     _LIT( KCancelCustomSoftNotificationL, 
       
   270         "CAknSoftNotifier::CancelCustomSoftNotificationL invoked" );
       
   271     
       
   272                 
       
   273     CAknSoftNotificationParameters* parameters =
       
   274         CAknSoftNotificationParameters::NewL();
       
   275     CleanupStack::PushL( parameters );
       
   276     AssertNotNullL( parameters, KNewL );
       
   277     
       
   278     CleanupStack::Pop( parameters );
       
   279     delete parameters;
       
   280     AssertTrueL( ETrue, KDes );
       
   281     
       
   282 
       
   283     parameters = CAknSoftNotificationParameters::
       
   284         NewL( KFilePath, 0, 0, 0, CAknNoteDialog::ENoTone);
       
   285     CleanupStack::PushL( parameters ); 
       
   286     AssertTrueL( ETrue, KNewLOver );
       
   287     CleanupStack::Pop( parameters );
       
   288     delete parameters;
       
   289     
       
   290     parameters = CAknSoftNotificationParameters::NewL( KDriver, 0, 0, 0,
       
   291         CAknNoteDialog::ENoTone,
       
   292         KNullViewId, KNullUid,
       
   293         0, KMessage );
       
   294     CleanupStack::PushL( parameters );
       
   295     AssertNotNullL( parameters, KNewLOverLoad );
       
   296     
       
   297     CAknSoftNotifier* notifier = CAknSoftNotifier::NewL();
       
   298     CleanupStack::PushL( notifier );
       
   299     AssertNotNullL( notifier, KNotifierNewL );
       
   300     CleanupStack::Pop( notifier );
       
   301     delete notifier;
       
   302     AssertTrueL( ETrue, KNotifierDes );
       
   303     
       
   304     notifier = CAknSoftNotifier::NewLC();
       
   305     AssertNotNullL( notifier, KNewLC );
       
   306     
       
   307     notifier->AddNotificationL( ENetworkInformationNotification );
       
   308     AssertTrueL( ETrue, KAddNotificationL );
       
   309     
       
   310     notifier->AddNotificationL( ENetworkInformationNotification, 1 );
       
   311     AssertTrueL( ETrue, KAddNotificationLOverLoad );
       
   312     
       
   313     notifier->SetNotificationCountL( ENetworkInformationNotification, 1 );
       
   314     AssertTrueL( ETrue, KSetNotificationCountL );
       
   315     
       
   316     notifier->CancelSoftNotificationL( ENetworkInformationNotification );
       
   317     AssertTrueL( ETrue, KCancelSoftNotificationL );
       
   318     
       
   319     notifier->AddCustomNotificationL( *parameters );
       
   320     AssertTrueL( ETrue, KAddCustomNotificationL );
       
   321     
       
   322     notifier->SetCustomNotificationCountL( *parameters, 1 );
       
   323     AssertTrueL( ETrue, KSetCustomNotificationCountL );
       
   324     
       
   325     notifier->CancelCustomSoftNotificationL( *parameters );
       
   326     AssertTrueL( ETrue, KCancelCustomSoftNotificationL );
       
   327     
       
   328     CleanupStack::PopAndDestroy( notifier );
       
   329     CleanupStack::PopAndDestroy( parameters );
       
   330     
       
   331     }
       
   332 
       
   333 // ---------------------------------------------------------------------------
       
   334 // CBCTestDomAknCase::TestStatuspaneUtils
       
   335 // ---------------------------------------------------------------------------
       
   336 //
       
   337 void CBCTestDomAknCase::TestStatuspaneUtilsL()
       
   338     {
       
   339     
       
   340     _LIT( KStaconPaneActive, "AknStatuspaneUtils::StaconPaneActive invoked" );
       
   341     _LIT( KStaconSoftKeysLeft, 
       
   342         "AknStatuspaneUtils::StaconSoftKeysLeft invoked" );
       
   343     _LIT( KStaconSoftKeysRight, 
       
   344         "AknStatuspaneUtils::StaconSoftKeysRight invoked" );
       
   345     _LIT( KIdleLayoutActive, "AknStatuspaneUtils::IdleLayoutActive invoked" );
       
   346     _LIT( KFlatLayoutActive, "AknStatuspaneUtils::FlatLayoutActive invoked" );
       
   347     _LIT( KUsualLayoutActive, 
       
   348         "AknStatuspaneUtils::UsualLayoutActive invoked" );
       
   349     _LIT( KSmallLayoutActive, 
       
   350         "AknStatuspaneUtils::SmallLayoutActive invoked" );
       
   351     _LIT( KTouchPaneCompatibleLayoutActive, 
       
   352         "AknStatuspaneUtils::TouchPaneCompatibleLayoutActive invoked" );
       
   353     _LIT( KExtendedStaconPaneActive, 
       
   354         "AknStatuspaneUtils::ExtendedStaconPaneActive invoked" );
       
   355     _LIT( KExtendedFlatLayoutActive, 
       
   356         "AknStatuspaneUtils::ExtendedFlatLayoutActive invoked" );
       
   357     
       
   358     TBool val = AknStatuspaneUtils::StaconPaneActive();
       
   359     AssertTrueL( ETrue, KStaconPaneActive );
       
   360     
       
   361     val = AknStatuspaneUtils::StaconSoftKeysLeft();
       
   362     AssertTrueL( ETrue, KStaconSoftKeysLeft );
       
   363     
       
   364     val = AknStatuspaneUtils::StaconSoftKeysRight();
       
   365     AssertTrueL( ETrue, KStaconSoftKeysRight );
       
   366     
       
   367     val = AknStatuspaneUtils::IdleLayoutActive();
       
   368     AssertTrueL( ETrue, KIdleLayoutActive );
       
   369     
       
   370     val = AknStatuspaneUtils::FlatLayoutActive();
       
   371     AssertTrueL( ETrue, KFlatLayoutActive );
       
   372     
       
   373     val = AknStatuspaneUtils::UsualLayoutActive();
       
   374     AssertTrueL( ETrue, KUsualLayoutActive );
       
   375     
       
   376     val = AknStatuspaneUtils::SmallLayoutActive();
       
   377     AssertTrueL( ETrue, KSmallLayoutActive );
       
   378     
       
   379     val = AknStatuspaneUtils::TouchPaneCompatibleLayoutActive();
       
   380     AssertTrueL( ETrue, KTouchPaneCompatibleLayoutActive );
       
   381     
       
   382     val = AknStatuspaneUtils::ExtendedStaconPaneActive();
       
   383     AssertTrueL( ETrue, KExtendedStaconPaneActive );
       
   384     
       
   385     val = AknStatuspaneUtils::ExtendedFlatLayoutActive();
       
   386     AssertTrueL( ETrue, KExtendedFlatLayoutActive );
       
   387     }
       
   388 
       
   389 // ---------------------------------------------------------------------------
       
   390 // CBCTestDomAknCase::TestPopupContent()
       
   391 // ---------------------------------------------------------------------------
       
   392 //
       
   393 void CBCTestDomAknCase::TestPopupContentL()
       
   394     {
       
   395     
       
   396     _LIT( KNewL, "CAknStylusActivatedPopUpContent::NewL invoked" );
       
   397     _LIT( KNewLOverload, 
       
   398         "CAknStylusActivatedPopUpContent::NewL overload invoked" );
       
   399     _LIT( KNewLRes, 
       
   400         "CAknStylusActivatedPopUpContent::NewL int resid overload invoked" );
       
   401     _LIT( KNewLReader, 
       
   402         "CAknStylusActivatedPopUpContent::NewL reader resid overload invoked" );
       
   403     _LIT( KDes, 
       
   404         "CAknStylusActivatedPopUpContent::~CAknStylusContent invoked" );
       
   405     _LIT( KComponentControl, 
       
   406         "CAknStylusActivatedPopUpContent::ComponentControl invoked" );
       
   407     _LIT( KCountComponentControls, 
       
   408           "CAknStylusActivatedPopUpContent::CountComponentControls invoked" );
       
   409     _LIT( KMinimumSize, 
       
   410           "CAknStylusActivatedPopUpContent::MinimumSize invoked" );
       
   411     _LIT( KHandleResourceChange, 
       
   412           "CAknStylusActivatedPopUpContent::HandleResourceChange() invoked" );
       
   413     _LIT( KSetContainerWindowL, 
       
   414           "CAknStylusActivatedPopUpContent::SetContainerWindowL() invoked" );
       
   415     _LIT( KSetCommandObserver, 
       
   416           "CAknStylusActivatedPopUpContent::SetCommandObserver invoked" );
       
   417     _LIT( KHandlePointerEventL, 
       
   418           "CAknStylusActivatedPopUpContent::HandlePointerEventL invoked" );
       
   419     _LIT( KHandleControlEventL, 
       
   420           "CAknStylusActivatedPopUpContent::HandleControlEventL invoked" );
       
   421 
       
   422     CAknStylusActivatedPopUpContent* content 
       
   423         = CAknStylusActivatedPopUpContent::NewL( KTitle, KText );
       
   424     CleanupStack::PushL( content );
       
   425     AssertNotNullL( content, KNewL );
       
   426     
       
   427     CleanupStack::Pop( content );
       
   428     delete content;
       
   429     AssertTrueL( ETrue, KDes );
       
   430     
       
   431     TBuf<KDesLength> linktxt( KTitle );
       
   432     RArray<TAknContentLink> array;
       
   433     TAknContentLink link;
       
   434     link.iLinkText = &linktxt;
       
   435     CleanupClosePushL( array );
       
   436     array.Append( link );
       
   437     content = CAknStylusActivatedPopUpContent::NewL( KTitle, KText, array );
       
   438     CleanupStack::PushL( content );
       
   439     AssertNotNullL( content, KNewLOverload );
       
   440     CleanupStack::Pop( content );
       
   441     delete content;
       
   442     CleanupStack::PopAndDestroy( &array );
       
   443     
       
   444     content = CAknStylusActivatedPopUpContent::
       
   445               NewL( R_BCTESTDOMAVKONPSLN_AVKON_CONTENT );
       
   446     CleanupStack::PushL( content );
       
   447     AssertNotNullL( content, KNewLRes );
       
   448     
       
   449     CAknForm* frm = new ( ELeave ) CAknForm();
       
   450     CleanupStack::PushL( frm );
       
   451     frm->ConstructL();
       
   452     
       
   453     content->SetCommandObserver( *frm );
       
   454     AssertTrueL( ETrue, KSetCommandObserver );
       
   455     
       
   456     content->HandleResourceChange( 0 );
       
   457     AssertTrueL( ETrue, KHandleResourceChange );
       
   458     
       
   459     content->SetContainerWindowL( *iContainer );
       
   460     AssertTrueL( ETrue, KSetContainerWindowL );
       
   461     
       
   462     TPointerEvent event;
       
   463     event.iType = TPointerEvent::EButton1Down;
       
   464     event.iModifiers = 0;
       
   465     TPoint eventPos( KWidth, KHeight );
       
   466     event.iPosition = eventPos;
       
   467     event.iParentPosition = eventPos;
       
   468     content->HandlePointerEventL( event );
       
   469     AssertTrueL( ETrue, KHandlePointerEventL );
       
   470     
       
   471     content->HandleControlEventL( iContainer, 
       
   472         MCoeControlObserver::EEventRequestExit );
       
   473     AssertTrueL( ETrue, KHandleControlEventL );
       
   474     
       
   475     CleanupStack::Pop( frm );
       
   476     CleanupStack::Pop( content );
       
   477 
       
   478     delete content;
       
   479     delete frm;
       
   480     
       
   481     TResourceReader reader;
       
   482     CCoeEnv::Static()->CreateResourceReaderLC( reader, 
       
   483         R_BCTESTDOMAVKONPSLN_AVKON_CONTENT );
       
   484     CCoeControl* ctrl = CAknStylusActivatedPopUpContent::NewL( reader );
       
   485     CleanupStack::PushL( ctrl );
       
   486     AssertNotNullL( ctrl, KNewLReader );
       
   487     
       
   488     ctrl->ComponentControl( 0 );
       
   489     AssertTrueL( ETrue, KComponentControl );
       
   490     
       
   491     ctrl->CountComponentControls();
       
   492     AssertTrueL( ETrue, KCountComponentControls );
       
   493     
       
   494     ctrl->MinimumSize();
       
   495     AssertTrueL( ETrue, KMinimumSize );
       
   496     
       
   497     CleanupStack::PopAndDestroy( ctrl );
       
   498     CleanupStack::PopAndDestroy(); // reader
       
   499     
       
   500     }
       
   501 
       
   502 
       
   503 // ---------------------------------------------------------------------------
       
   504 // CBCTestDomAknCase::TestSyncDraw()
       
   505 // ---------------------------------------------------------------------------
       
   506 //
       
   507 void CBCTestDomAknCase::TestSyncDrawL()
       
   508     {
       
   509     
       
   510     _LIT( KConstruct, "TAknSyncControlDrawer::TAknSyncControlDrawer invoked" );
       
   511     _LIT( KSetControl, "TAknSyncControlDrawer::SetControl invoked" );
       
   512     _LIT( KMasrPrepareForDraw, 
       
   513         "TAknSyncControlDrawer::MasrPrepareForDraw invoked" );
       
   514     _LIT( KMasrDraw, "TAknSyncControlDrawer::MasrDraw invoked" );
       
   515     _LIT( KMasrDeactivateGc, 
       
   516         "TAknSyncControlDrawer::MasrDeactivateGc invoked" );
       
   517     _LIT( KMasrActivateGc,
       
   518         "TAknSyncControlDrawer::MasrActivateGc invoked" );
       
   519     _LIT( KNewL, "CAknDrawSynchronizer::NewL invoked" );
       
   520     _LIT( KAddL, "CAknDrawSynchronizer::AddL invoked" ); 
       
   521     _LIT( KSignal, "CAknDrawSynchronizer::Signal invoked" );
       
   522     _LIT( KRemove, "CAknDrawSynchronizer::Remove invoked" );
       
   523     _LIT( KDes, "CAknDrawSynchronizer::~CAknDrawSynchronizer invoked" );
       
   524           
       
   525     TAknSyncControlDrawer drawer;
       
   526     AssertTrueL( ETrue, KConstruct );
       
   527     
       
   528     drawer.SetControl( iContainer );
       
   529     AssertTrueL( ETrue, KSetControl );
       
   530     
       
   531     drawer.MasrPrepareForDraw();
       
   532     AssertTrueL( ETrue, KMasrPrepareForDraw );
       
   533     
       
   534     drawer.MasrDraw();
       
   535     AssertTrueL( ETrue, KMasrDraw );
       
   536     
       
   537     drawer.MasrDeactivateGc();
       
   538     AssertTrueL( ETrue, KMasrDeactivateGc );
       
   539     
       
   540     drawer.MasrActivateGc();
       
   541     AssertTrueL( ETrue, KMasrActivateGc );
       
   542     
       
   543     CAknDrawSynchronizer* sync = CAknDrawSynchronizer::NewL();
       
   544     CleanupStack::PushL( sync );
       
   545     AssertNotNullL( sync, KNewL );
       
   546 
       
   547     sync->AddL( &drawer );
       
   548     AssertTrueL( ETrue, KAddL );
       
   549     
       
   550     sync->Signal( &drawer );
       
   551     AssertTrueL( ETrue, KSignal );
       
   552     
       
   553     sync->Remove( &drawer );
       
   554     AssertTrueL( ETrue, KRemove );
       
   555     
       
   556     CleanupStack::PopAndDestroy( sync );
       
   557     AssertTrueL( ETrue, KDes );
       
   558     
       
   559     }
       
   560 
       
   561 // ---------------------------------------------------------------------------
       
   562 // CBCTestDomAknCase::TestTaskListL()
       
   563 // ---------------------------------------------------------------------------
       
   564 //    
       
   565 void CBCTestDomAknCase::TestTaskListL()
       
   566     {
       
   567     
       
   568     _LIT( KNewL, "CAknTaskList::NewL invoked" );
       
   569     _LIT( KNewLC, "CAknTaskList::NewLC invoked" );
       
   570     _LIT( KDes, "CAknTaskList::~CAknTaskList invoked" );
       
   571     _LIT( KUpdateListL, "CAknTaskList::UpdateListL invoked" );
       
   572     _LIT( KWgArray, "CAknTaskList::WgArray invoked" );
       
   573     _LIT( KFindRootApp, "CAknTaskList::FindRootApp invoked" );   
       
   574     _LIT( KIsRootWindowGroup, "CAknTaskList::IsRootWindowGroup invoked" );   
       
   575     
       
   576     CAknTaskList* tasklist = 
       
   577         CAknTaskList::NewL( CCoeEnv::Static()->WsSession() );
       
   578     CleanupStack::PushL( tasklist );
       
   579     AssertNotNullL( tasklist, KNewL );
       
   580     
       
   581     CleanupStack::Pop( tasklist );
       
   582     delete tasklist;
       
   583     AssertTrueL( ETrue, KDes );
       
   584     
       
   585     tasklist = CAknTaskList::NewLC( CCoeEnv::Static()->WsSession() );
       
   586     AssertNotNullL( tasklist, KNewLC );
       
   587     
       
   588     tasklist->UpdateListL();
       
   589     AssertTrueL( ETrue, KUpdateListL );
       
   590     
       
   591     tasklist->WgArray();
       
   592     AssertTrueL( ETrue, KWgArray );
       
   593     
       
   594     tasklist->FindRootApp( KNullUid );
       
   595     AssertTrueL( ETrue, KFindRootApp );
       
   596     
       
   597     TBool val = tasklist->IsRootWindowGroup( 0 );
       
   598     AssertTrueL( ETrue, KIsRootWindowGroup );
       
   599     
       
   600     CleanupStack::PopAndDestroy( tasklist );
       
   601     }
       
   602     
       
   603 // ---------------------------------------------------------------------------
       
   604 // CBCTestDomAknCase::TestTransitionL()
       
   605 // ---------------------------------------------------------------------------
       
   606 //    
       
   607 void CBCTestDomAknCase::TestTransitionL()
       
   608     {
       
   609     
       
   610     _LIT( KCAknTransition, "CAknTransition::CAknTransition invoked" );
       
   611     _LIT( KAddObserver, "CAknTransitionUtils::AddObserver invoked" );
       
   612     _LIT( KRemoveObserver, "CAknTransitionUtils::RemoveObserver invoked" );
       
   613     _LIT( KGetState, "CAknTransitionUtils::GetState invoked" );
       
   614     _LIT( KSetData, "CAknTransitionUtils::SetData invoked" );
       
   615     _LIT( KGetData, "CAknTransitionUtils::GetData invoked" );
       
   616     _LIT( KRemoveData, "CAknTransitionUtils::RemoveData invoked" );
       
   617     _LIT( KSetAllParents, "CAknTransitionUtils::SetAllParents invoked" );
       
   618     _LIT( KTransitionsEnabled, 
       
   619         "CAknTransitionUtils::TransitionsEnabled invoked" );
       
   620     _LIT( KMakeVisibleSubComponents, 
       
   621         "CAknTransitionUtils::MakeVisibleSubComponents invoked" );
       
   622     _LIT( KGetDemarcation, "CAknTransitionUtils::GetDemarcation invoked" );
       
   623     _LIT( KDes, "CAknTransition::~CAknTransition invoked" );
       
   624     
       
   625     CAknTransitionExt* observer = new ( ELeave ) CAknTransitionExt;
       
   626     CleanupStack::PushL( observer );
       
   627     AssertNotNullL( observer, KCAknTransition );
       
   628     
       
   629     TInt res = CAknTransitionUtils::AddObserver( observer, 
       
   630         CAknTransitionUtils::EEventWsBufferRedirection );
       
   631     AssertTrueL( ETrue, KAddObserver );
       
   632     
       
   633     CAknTransitionUtils::RemoveObserver( observer, 
       
   634         CAknTransitionUtils::EEventWsBufferRedirection );
       
   635     AssertTrueL( ETrue, KRemoveObserver );
       
   636     
       
   637     TInt stat;
       
   638     CAknTransitionUtils::GetState( 
       
   639         CAknTransitionUtils::EEventWsBufferRedirection, 
       
   640         &stat );
       
   641     AssertTrueL( ETrue, KGetState );
       
   642     
       
   643     TInt skey( 0 ),sdata( 0 );
       
   644     CAknTransitionUtils::SetData( skey, &sdata );
       
   645     AssertTrueL( ETrue, KSetData );
       
   646     
       
   647     CAknTransitionUtils::GetData( skey );
       
   648     AssertTrueL( ETrue, KGetData );
       
   649     
       
   650     CAknTransitionUtils::RemoveData( skey );
       
   651     AssertTrueL( ETrue, KRemoveData );
       
   652     
       
   653     CAknTransitionUtils::SetAllParents( iContainer );
       
   654     AssertTrueL( ETrue, KSetAllParents );
       
   655     
       
   656     CAknTransitionUtils::TransitionsEnabled( sdata );
       
   657     AssertTrueL( ETrue, KTransitionsEnabled );
       
   658     
       
   659     CAknTransitionUtils::MakeVisibleSubComponents( iContainer, 
       
   660 		CAknTransitionUtils::EForceInvisible );
       
   661     AssertTrueL( ETrue, KMakeVisibleSubComponents );
       
   662     
       
   663     TRect rect;
       
   664     CAknTransitionUtils::GetDemarcation( 
       
   665         CAknTransitionUtils::EOptionsMenu, 
       
   666         rect );
       
   667     AssertTrueL( ETrue, KGetDemarcation );
       
   668     
       
   669     CleanupStack::PopAndDestroy( observer );
       
   670     AssertTrueL( ETrue, KDes );
       
   671     
       
   672     }
       
   673     
       
   674 // ---------------------------------------------------------------------------
       
   675 // CBCTestDomAknCase::TestCameralSettingPageL()
       
   676 // ---------------------------------------------------------------------------
       
   677 //    
       
   678 void CBCTestDomAknCase::TestCameraSettingPageL()
       
   679     {
       
   680     
       
   681     _LIT( KCAknTransparentCameraSettingPage, 
       
   682         "CAknTransparentCameraSettingPage::\
       
   683         CAknTransparentCameraSettingPage invoked" );
       
   684     _LIT( KCAknTransparentCameraSettingPageDes,
       
   685         "CAknTransparentCameraSettingPage::\
       
   686         ~CAknTransparentCameraSettingPage invoked" );
       
   687     _LIT( KCAknTransparentCameraSettingPageOverload,
       
   688         "CAknTransparentCameraSettingPage::\
       
   689         CAknTransparentCameraSettingPage overload invoked" );
       
   690     _LIT( KConstructL,
       
   691         "CAknTransparentCameraSettingPage::Constructor invoked" );
       
   692     _LIT( KListBoxControl,
       
   693         "CAknTransparentCameraSettingPage::ListBoxControl invoked" );
       
   694     _LIT( KSetItemArrayAndSelectionL,
       
   695         "CAknTransparentCameraSettingPage::\
       
   696         SetItemArrayAndSelectionL invoked" );
       
   697     _LIT( KChangeBackground,
       
   698         "CAknTransparentCameraSettingPage::ChangeBackground invoked" );
       
   699     _LIT( KSetBitmapPositionAndClipRect,
       
   700         "CAknTransparentCameraSettingPage::\
       
   701         SetBitmapPositionAndClipRect invoked" );
       
   702     _LIT( KUpdateSettingL,
       
   703         "CAknTransparentCameraSettingPage::UpdateSettingL invoked" );
       
   704     _LIT( KDynamicInitL,
       
   705         "CAknTransparentCameraSettingPage::DynamicInitL invoked" );
       
   706     _LIT( KSelectCurrentItemL,
       
   707         "CAknTransparentCameraSettingPage::SelectCurrentItemL invoked" );
       
   708     _LIT( KProcessCommandL,
       
   709         "CAknTransparentCameraSettingPage::ProcessCommandL invoked" );
       
   710     _LIT( KOfferKeyEventL,
       
   711         "CAknTransparentCameraSettingPage::OfferKeyEventL invoked" );
       
   712     _LIT( KSizeChanged,
       
   713         "CAknTransparentCameraSettingPage::SizeChanged invoked" );
       
   714     _LIT( KDraw,
       
   715         "CAknTransparentCameraSettingPage::Draw invoked" );
       
   716     _LIT( KExecuteLD,
       
   717         "CAknTransparentCameraSettingPage::ExecuteLD invoked" );
       
   718     _LIT( KHandleListBoxEventL,
       
   719         "CAknTransparentCameraSettingPage::HandleListBoxEventL invoked" );
       
   720     _LIT( KHandleResourceChange,
       
   721         "CAknTransparentCameraSettingPage::HandleResourceChange invoked" );
       
   722     _LIT( KHandleControlEventL,
       
   723         "CAknTransparentCameraSettingPage::HandleControlEventL invoked" );
       
   724     _LIT( KWriteInternalStateL,
       
   725         "CAknTransparentCameraSettingPage::WriteInternalStateL invoked" );
       
   726        
       
   727     TInt index( 0 );
       
   728     CPtrCArray* array = new ( ELeave ) CPtrCArray( 1 );
       
   729     TBuf<KDesLength> txt( KTitle );
       
   730     array->AppendL( txt );
       
   731     CleanupStack::PushL( array );
       
   732     
       
   733     CAknTransparentCameraSettingPageExt* settingpage = 
       
   734         new ( ELeave ) CAknTransparentCameraSettingPageExt( 
       
   735         R_BCTESTDOMAVKONPSLN_CHECKBOX_SETTING_PAGE, 
       
   736         index, 
       
   737         array );
       
   738     CleanupStack::PushL( settingpage ); 
       
   739     AssertNotNullL( settingpage, KCAknTransparentCameraSettingPage );
       
   740     
       
   741 
       
   742     settingpage->ConstructL();
       
   743     CleanupStack::Pop( settingpage );
       
   744     
       
   745     TRect rect( 0, 0, 0, 0 );
       
   746     settingpage->Draw( rect );
       
   747     AssertTrueL( ETrue, KDraw );
       
   748     settingpage->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted );
       
   749     AssertTrueL( ETrue, KExecuteLD );
       
   750     
       
   751     settingpage = NULL;
       
   752     AssertTrueL( ETrue, KCAknTransparentCameraSettingPageDes );
       
   753 
       
   754     settingpage = new ( ELeave ) CAknTransparentCameraSettingPageExt(
       
   755         &KTitle,
       
   756         0,
       
   757         0,
       
   758         0,
       
   759         R_BCTESTDOMAVKONPSLN_CHECKBOX_SETTING_PAGE,
       
   760         index,
       
   761         array );
       
   762     CleanupStack::PushL( settingpage );
       
   763     AssertNotNullL( settingpage, KCAknTransparentCameraSettingPageOverload );
       
   764     
       
   765     settingpage->ConstructL();
       
   766     AssertTrueL( ETrue, KConstructL );
       
   767     
       
   768     settingpage->ListBoxControl();
       
   769     AssertTrueL( ETrue, KListBoxControl );
       
   770     
       
   771     CEikListBox* list = new ( ELeave ) CEikListBox();
       
   772     CleanupStack::PushL( list );
       
   773     settingpage->HandleListBoxEventL( list, 
       
   774         MEikListBoxObserver::
       
   775         EEventEnterKeyPressed );
       
   776     AssertTrueL( ETrue, KHandleListBoxEventL );
       
   777     CleanupStack::PopAndDestroy( list );
       
   778     
       
   779     settingpage->SetItemArrayAndSelectionL( array, 0 );
       
   780     AssertTrueL( ETrue, KSetItemArrayAndSelectionL );
       
   781     
       
   782     TPoint point( 0, 0 );
       
   783     settingpage->SetBitmapPositionAndClipRect( point, rect );
       
   784     AssertTrueL( ETrue, KSetBitmapPositionAndClipRect );
       
   785     
       
   786     settingpage->HandleResourceChange( index );
       
   787     AssertTrueL( ETrue, KHandleResourceChange );
       
   788     
       
   789     settingpage->UpdateSettingL();
       
   790     AssertTrueL( ETrue, KUpdateSettingL );
       
   791     
       
   792     settingpage->DynamicInitL();
       
   793     AssertTrueL( ETrue, KDynamicInitL );
       
   794     
       
   795     settingpage->SelectCurrentItemL();
       
   796     AssertTrueL( ETrue, KSelectCurrentItemL );
       
   797     
       
   798     settingpage->HandleControlEventL( iContainer, 
       
   799         MCoeControlObserver::EEventRequestCancel );
       
   800     AssertTrueL( ETrue, KHandleControlEventL );
       
   801     
       
   802     TKeyEvent keyEvent = { EKeyPause, EStdKeySpace, 0, 0  };
       
   803     
       
   804     settingpage->OfferKeyEventL( keyEvent, EEventKey );
       
   805     AssertTrueL( ETrue, KOfferKeyEventL );
       
   806     
       
   807     settingpage->SizeChanged();
       
   808     AssertTrueL( ETrue, KSizeChanged );
       
   809     
       
   810     CFbsBitmap* bmp = NULL;
       
   811     bmp = AknIconUtils::CreateIconL( AknIconUtils::AvkonIconFileName(), 
       
   812         EMbmAvkonQgn_prop_nrtyp_note );
       
   813     CleanupStack::PushL( bmp );
       
   814     AssertNotNullL( bmp );
       
   815     
       
   816     settingpage->SetBitmapPositionAndClipRect( point, rect, ETrue );
       
   817     AssertTrueL( ETrue, KSetBitmapPositionAndClipRect );
       
   818     
       
   819     settingpage->ChangeBackground( bmp );
       
   820     AssertTrueL( ETrue, KChangeBackground );
       
   821     
       
   822     CCoeEnv::Static()->AppUi()->AddToStackL( settingpage );
       
   823     settingpage->ProcessCommandL( EAknSoftkeyHide );
       
   824     AssertTrueL( ETrue, KProcessCommandL );
       
   825     
       
   826     CCoeEnv::Static()->AppUi()->RemoveFromStack( settingpage );
       
   827     
       
   828     RFileWriteStream stream;
       
   829     stream.PushL();
       
   830     stream.Replace( CCoeEnv::Static()->FsSession(), KFilePath, EFileWrite );
       
   831     settingpage->WriteInternalStateL( stream );
       
   832     AssertTrueL( ETrue, KWriteInternalStateL );
       
   833     stream.Pop();
       
   834     stream.Close();
       
   835     
       
   836     CleanupStack::PopAndDestroy( bmp );
       
   837     CleanupStack::PopAndDestroy( settingpage );
       
   838     CleanupStack::PopAndDestroy( array );
       
   839     
       
   840     }
       
   841     
       
   842 // ----------------------------------------------------------------------------
       
   843 // Test AknVolumePopup.
       
   844 // ----------------------------------------------------------------------------
       
   845 //    
       
   846 void CBCTestDomAknCase::TestAknVolumePopupL()
       
   847     {
       
   848     _LIT( KNewL, "CAknVolumePopup::NewL invoked" );
       
   849     _LIT( KNewLOverLoad, "CAknVolumePopup::NewL overload invoked" );
       
   850     _LIT( KConstructFromResource, 
       
   851         "CAknVolumePopup::ConstructFromResourceL invoked" );
       
   852     _LIT( KCountComponentControls, 
       
   853         "CAknVolumePopup::CountComponentControls invoked" );
       
   854     _LIT( KComponentControl, 
       
   855         "CAknVolumePopup::ComponentControl() invoked" );
       
   856     _LIT( KHandlePointerEventL, 
       
   857         "CAknVolumePopup::HandlePointerEventL() invoked" );
       
   858     _LIT( KOfferKeyEventL, "CAknVolumePopup::OfferKeyEventL invoked" );
       
   859     _LIT( KHandleControlEventL, 
       
   860         "CAknVolumePopup::HandleControlEventL() invoked" );
       
   861     _LIT( KHandleVolumeKeyEventL, 
       
   862         "CAknVolumePopup::HandleVolumeKeyEventL() invoked" );
       
   863     _LIT( KSetRange, "CAknVolumePopup::SetRange() invoked" );
       
   864     _LIT( KGetRange, "CAknVolumePopup::GetRange() invoked" );
       
   865     _LIT( KValue, "CAknVlumePopup::Value() invoked" );
       
   866     _LIT( KSetTitleTextL, "CAknVlumePopup::SetTitleTextL() invoked" );
       
   867     _LIT( KShowProfileName, "CAknVlumePopup::ShowProfileName() invoked" );
       
   868     _LIT( KShowVolumePopupL, "CAknVlumePopup::ShowVolumePopupL() invoked" );
       
   869     _LIT( KCloseVolumePopup, "CAknVlumePopup::CloseVolumePopup() invoked" );
       
   870     _LIT( KSetDecimalPlaces, "CAknVlumePopup::SetDecimalPlaces() invoked" );
       
   871     _LIT( KSetGraphics, "CAknVlumePopup::SetGraphics() invoked" );
       
   872     _LIT( KSetTimeOutAsSecond, 
       
   873         "CAknVlumePopup::SetTimeOutAsSecond() invoked" );
       
   874     _LIT( KSetAdjustmentIndicatorDisplay, 
       
   875         "CAknVlumePopup::SetAdjustmentIndicatorDisplay() invoked" );
       
   876     _LIT( KSetStepSize, "CAknVlumePopup::SetStepSize() invoked" );
       
   877     _LIT( KSetValueType, "CAknVlumePopup::ValueType() invoked" );
       
   878          
       
   879     TUid uid = TUid::Uid( KShareVolumeUid );
       
   880     CAknVolumePopup* vol = CAknVolumePopup
       
   881          ::NewL( uid, KTitle, KVolumeMaxValue );
       
   882     CleanupStack::PushL( vol );
       
   883     AssertNotNullL( vol, KNewL );
       
   884     CleanupStack::Pop( vol );
       
   885     delete vol;
       
   886     vol = NULL;
       
   887     
       
   888     vol =  CAknVolumePopup::NewL( iContainer, ETrue );
       
   889     CleanupStack::PushL( vol );
       
   890     AssertNotNullL( vol, KNewL );
       
   891     CleanupStack::PopAndDestroy( vol );
       
   892     vol = NULL;
       
   893    
       
   894     vol = CAknVolumePopup
       
   895         ::ConstructFromResourceL( R_AVKON_POPUP_VOLUME_INDICATOR );
       
   896     CleanupStack::PushL( vol );
       
   897     AssertNotNullL( vol, KConstructFromResource );
       
   898     CleanupStack::Pop( vol );
       
   899     delete vol;
       
   900     vol = NULL;
       
   901     
       
   902     vol = CAknVolumePopup::NewL( KVolumeMaxValue );
       
   903     CleanupStack::PushL( vol );
       
   904     AssertNotNullL( vol, KNewLOverLoad );
       
   905  
       
   906     TInt val = vol->CountComponentControls();
       
   907     AssertTrueL( ETrue, KCountComponentControls );
       
   908     
       
   909     vol->ComponentControl( val );
       
   910     AssertTrueL( ETrue, KComponentControl );
       
   911     
       
   912     TWsEvent wsEvent;
       
   913     TPointerEvent* ptEvent = wsEvent.Pointer();
       
   914     vol->HandlePointerEventL( *ptEvent );
       
   915     AssertTrueL( ETrue, KHandlePointerEventL );
       
   916     
       
   917     TKeyEvent keyEvent = { EKeyPause, EStdKeySpace, 0, 0  };
       
   918     
       
   919     vol->OfferKeyEventL( keyEvent, EEventKey );
       
   920     AssertTrueL( ETrue, KOfferKeyEventL );
       
   921     
       
   922     vol->HandleControlEventL( iContainer, 
       
   923         MCoeControlObserver::EEventRequestCancel );
       
   924     AssertTrueL( ETrue, KHandleControlEventL );
       
   925     
       
   926     vol->HandleVolumeKeyEventL( keyEvent, EEventKey );
       
   927     AssertTrueL( ETrue, KHandleVolumeKeyEventL );
       
   928     
       
   929     vol->SetRange( KVolumeMinValue, KVolumeMaxValue );
       
   930     AssertTrueL( ETrue, KSetRange );
       
   931     
       
   932     TInt maxVal, minVal;
       
   933     vol->GetRange( minVal, maxVal );
       
   934     AssertTrueL( ETrue, KGetRange );
       
   935     
       
   936     vol->Value();
       
   937     AssertTrueL( ETrue, KValue );
       
   938     
       
   939     vol->SetTitleTextL( KTitle );
       
   940     AssertTrueL( ETrue, KSetTitleTextL );
       
   941     
       
   942     vol->ShowProfileName( ETrue );
       
   943     AssertTrueL( ETrue, KShowProfileName );
       
   944     
       
   945     vol->ShowVolumePopupL();
       
   946     AssertTrueL( ETrue, KShowVolumePopupL );
       
   947     
       
   948     CFbsBitmap* bitmap = new (ELeave) CFbsBitmap();
       
   949     CleanupStack::PushL( bitmap );
       
   950     vol->SetGraphics( KGraphicMode, bitmap, bitmap );
       
   951     AssertTrueL( ETrue, KSetGraphics );
       
   952     
       
   953     vol->CloseVolumePopup();
       
   954     AssertTrueL( ETrue, KCloseVolumePopup );
       
   955     
       
   956     vol->SetDecimalPlaces( 0 );
       
   957     AssertTrueL( ETrue, KSetDecimalPlaces );
       
   958     vol->SetTimeOutAsSecond( KTimeOut );
       
   959     AssertTrueL( ETrue, KSetTimeOutAsSecond );
       
   960     vol->SetAdjustmentIndicatorDisplay( ETrue );
       
   961     AssertTrueL( ETrue, KSetAdjustmentIndicatorDisplay );
       
   962     vol->SetStepSize( KStepSize );
       
   963     AssertTrueL( ETrue, KSetStepSize );
       
   964     vol->SetValueType( 0 );
       
   965     AssertTrueL( ETrue, KSetValueType );
       
   966     
       
   967     CleanupStack::Pop( bitmap );
       
   968     CleanupStack::Pop( vol );//vol
       
   969     delete vol;
       
   970     
       
   971     }
       
   972     
       
   973 // ----------------------------------------------------------------------------
       
   974 // TestLafSystemFontL
       
   975 // ----------------------------------------------------------------------------
       
   976 //    
       
   977 void CBCTestDomAknCase::TestLafSystemFontL()
       
   978     {
       
   979     _LIT( KNewL, "CLafSystemFont::NewL() invoked" );
       
   980     _LIT( KFont, "CLafSystemFont::Font() invoked" );
       
   981     _LIT( KUid, "CLafSystemFont::Uid() invoked" );
       
   982     _LIT( KDes, "CLafSystemFont::~CLafSystemFont() invoked" );
       
   983     CLafSystemFont* font = CLafSystemFont::NewL( KNullUid, NULL );
       
   984     CleanupStack::PushL( font );
       
   985     AssertNotNullL( font, KNewL );
       
   986     
       
   987     font->Font();
       
   988     AssertTrueL( ETrue, KFont );
       
   989     
       
   990     font->Uid();
       
   991     AssertTrueL( ETrue, KUid );
       
   992     
       
   993     CleanupStack::Pop( font );
       
   994     delete font;
       
   995     AssertTrueL( ETrue, KDes );
       
   996     }
       
   997 //end of file