uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomnotifier/src/bctestdomnotifiercase.cpp
changeset 0 2f259fa3e83a
child 21 558113899881
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  test case
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <aknlayoutscalable_avkon.cdl.h>
       
    20 #include <AknLayout2ScalableDef.h>
       
    21 #include <AknLayout2ScalableDataDef.h>
       
    22 #include <AknLayout2ScalableDecode.h>
       
    23 #include <eikcolib.h>
       
    24 
       
    25 #include <badesca.h>
       
    26 #include <w32std.h>
       
    27 #include <coecntrl.h>
       
    28 #include <eikenv.h>
       
    29 #include <barsread.h>
       
    30 #include <coemain.h>
       
    31 #include <eikdialg.h>
       
    32 #include <akndialog.h>
       
    33 #include <AknOpenFileService.h>
       
    34 #include <AknReadingConverter.h>
       
    35 #include <aknnavi.h>
       
    36 #include <eiktxlbm.h> // CTextListBoxModel
       
    37 #include <eiktxlbx.h>
       
    38 #include <eiklbi.h>
       
    39 #include <s32file.h>
       
    40 #include <f32file.h>
       
    41 #include <AiwGenericParam.h>
       
    42 
       
    43 #include <AknNotifierAppServer.h>
       
    44 #include <AknNotiferAppServerApplication.h>
       
    45 #include <AknNotifierAppServerSession.h>
       
    46 #include <aknnotifiercontroller.h>
       
    47 #include <AknNotifierControllerPlugin.h>
       
    48 #include <AknNotifierControllerUtilities.h>
       
    49 #include <AknNotifierWrapper.h>
       
    50 #include <AknNullService.h>
       
    51 
       
    52 #include <aknsignal.h>
       
    53 #include <AknSignalNotify.h>
       
    54 #include <AknSignalNotifyAddition.h>
       
    55 
       
    56 #include <aknlongtapanimation.h>
       
    57 #include <AknMarqueeControl.h>
       
    58 #include <AknMediatorFacade.h>
       
    59 #include <aknMemoryCardDialog.h>
       
    60 #include <aknlistloadertfx.h>
       
    61 #include <AknPhoneNumberGrouping.h>
       
    62 #include <AknPhoneNumberTextUtils.h>
       
    63 #include <AknPhoneNumberEditor.h>
       
    64 #include <aknnoteattributes.h>
       
    65 #include <eikdialg.h>
       
    66 #include <eikmenup.h>
       
    67 
       
    68 #include <bctestdomnotifier.rsg>
       
    69 #include "PslnModel.h"
       
    70 #include "bctestdomnotifiercase.h"
       
    71 #include "bctestdomnotifiercontainer.h"
       
    72 #include "bctestdomnotifier.hrh"
       
    73 #include "bctestdomnotifierview.h"
       
    74 #include "bctestdomnotifierapp.h"
       
    75 
       
    76 // ======== MEMBER FUNCTIONS ========
       
    77 // ---------------------------------------------------------------------------
       
    78 // Symbian 2nd static Constructor
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 CBCDomainTestNotifierCase* CBCDomainTestNotifierCase::NewL( CBCDomainTestNotifierContainer*
       
    82     aContainer )
       
    83     {
       
    84     CBCDomainTestNotifierCase* self = new( ELeave ) CBCDomainTestNotifierCase(
       
    85         aContainer );
       
    86     CleanupStack::PushL( self );
       
    87     self->ConstructL();
       
    88     CleanupStack::Pop( self );
       
    89     return self;
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 // C++ default constructor
       
    94 // ---------------------------------------------------------------------------
       
    95 //
       
    96 CBCDomainTestNotifierCase::CBCDomainTestNotifierCase( CBCDomainTestNotifierContainer*
       
    97     aContainer )
       
    98     : iContainer( aContainer )
       
    99     {
       
   100     }
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // Destructor
       
   104 // ---------------------------------------------------------------------------
       
   105 //
       
   106 CBCDomainTestNotifierCase::~CBCDomainTestNotifierCase()
       
   107     {
       
   108     }
       
   109 
       
   110 // ---------------------------------------------------------------------------
       
   111 // Symbian 2nd Constructor
       
   112 // ---------------------------------------------------------------------------
       
   113 //
       
   114 void CBCDomainTestNotifierCase::ConstructL()
       
   115     {
       
   116     BuildScriptL();
       
   117     }
       
   118 
       
   119 // ---------------------------------------------------------------------------
       
   120 // CBCDomainTestNotifierCase::BuildScriptL
       
   121 // ---------------------------------------------------------------------------
       
   122 //
       
   123 void CBCDomainTestNotifierCase::BuildScriptL()
       
   124     {
       
   125     // Add script as your need.
       
   126     AddTestL( DELAY(1), LeftCBA, KeyOK, LeftCBA, Down, KeyOK, LeftCBA, Down,
       
   127         Down, KeyOK, DELAY(3), RightCBA, LeftCBA, Down, Down, Down, KeyOK, DELAY(3), RightCBA,
       
   128         TEND  );
       
   129     }
       
   130 
       
   131 // ---------------------------------------------------------------------------
       
   132 // CBCDomainTestNotifierCase::RunL
       
   133 // ---------------------------------------------------------------------------
       
   134 //
       
   135 void CBCDomainTestNotifierCase::RunL( TInt aCmd )
       
   136     {
       
   137     if ( aCmd < EBCTestCmdOutline1 || aCmd > EBCTestCmdOutline4 )
       
   138         {
       
   139         return;
       
   140         }
       
   141     // Call release before prepare to let container has time to draw the
       
   142     // control created in PrepareCaseL.
       
   143     ReleaseCaseL();
       
   144     PrepareCaseL( aCmd );
       
   145     switch ( aCmd )
       
   146         {
       
   147         case EBCTestCmdOutline1:
       
   148             TestFunctionL();
       
   149             break;
       
   150         case EBCTestCmdOutline2:
       
   151 // TestSignalL() has some problem, so comment it currently.
       
   152 //            TestSignalL();
       
   153             break;
       
   154         case EBCTestCmdOutline3:
       
   155             TestOtherL();
       
   156             break;
       
   157         case EBCTestCmdOutline4:
       
   158             TestPhoneL();
       
   159 			break;
       
   160         default:
       
   161             break;
       
   162         }
       
   163     }
       
   164 
       
   165 // ---------------------------------------------------------------------------
       
   166 // CBCDomainTestNotifierCase::PrepareCaseL
       
   167 // ---------------------------------------------------------------------------
       
   168 //
       
   169 void CBCDomainTestNotifierCase::PrepareCaseL( TInt aCmd )
       
   170     {
       
   171     switch ( aCmd )
       
   172         {
       
   173         case EBCTestCmdOutline1:
       
   174             // Here is a simple demo. You should create your control
       
   175             // instead of this.
       
   176             iControl = new( ELeave ) CCoeControl();
       
   177             iControl->SetContainerWindowL( *iContainer );
       
   178             iControl->MakeVisible( ETrue );
       
   179             break;
       
   180         default:
       
   181             break;
       
   182         }
       
   183     // Pass the owner of iControl to iContainer.
       
   184     iContainer->SetControl( iControl );
       
   185     }
       
   186 
       
   187 // ---------------------------------------------------------------------------
       
   188 // CBCDomainTestNotifierCase::ReleaseCaseL
       
   189 // ---------------------------------------------------------------------------
       
   190 //
       
   191 void CBCDomainTestNotifierCase::ReleaseCaseL()
       
   192     {
       
   193     // let container delete the component control.
       
   194     iContainer->ResetControl();
       
   195     iControl = NULL;
       
   196     }
       
   197 
       
   198 // ---------------------------------------------------------------------------
       
   199 // CBCDomainTestNotifierCase::TestFunctionL
       
   200 // ---------------------------------------------------------------------------
       
   201 //
       
   202 void CBCDomainTestNotifierCase::TestFunctionL()
       
   203     {
       
   204     //aknopenfileservice.h
       
   205 
       
   206     RFs& fs = CEikonEnv::Static()->FsSession();
       
   207     RFile rfile;
       
   208     _LIT( KFilePath, "c:\\BCTestLog\\test.txt" );
       
   209     rfile.Create( fs, KFilePath, EFileWrite | EFileShareAny );
       
   210     CleanupClosePushL( rfile );
       
   211 
       
   212     CAiwGenericParamList* aiwparalist = CAiwGenericParamList::NewL();
       
   213     CPslnModel* psmodel= CPslnModel::NewL();
       
   214     MAknServerAppExitObserver* serappexit =
       
   215         static_cast<MAknServerAppExitObserver*> ( psmodel );
       
   216 
       
   217     CAknOpenFileService* fileserv = NULL;
       
   218     TRAPD( err, fileserv = CAknOpenFileService::NewL(
       
   219         KFilePath, serappexit, aiwparalist ) );
       
   220     _LIT( KCAknOpenFileServiceNewL, "CAknOpenFileService::NewL()" );
       
   221     AssertTrueL( ETrue, KCAknOpenFileServiceNewL );
       
   222     delete fileserv;
       
   223     fileserv = NULL;
       
   224 
       
   225     TUid KUid = { 0xA0004001 };
       
   226     TInt err1;
       
   227     TRAP( err1, fileserv = CAknOpenFileService::NewL(
       
   228         KUid, rfile, serappexit, aiwparalist ) );
       
   229     _LIT( KCAknOpenFileServiceNewLOver, "CAknOpenFileService::NewL()" );
       
   230     AssertTrueL( ETrue, KCAknOpenFileServiceNewLOver );
       
   231 
       
   232     CleanupStack::PopAndDestroy(); // rfile 
       
   233     delete fileserv;
       
   234     delete psmodel;
       
   235     delete aiwparalist;
       
   236     _LIT( KCAknNotifierAppServerAppUi,"CAknNotifierAppServerAppUi" );
       
   237     // AknNotiferAppServerApplication.h
       
   238 
       
   239     CBCNotifierAppServer *notifierapp = new ( ELeave )
       
   240          CBCNotifierAppServer();
       
   241     CleanupStack::PushL( notifierapp );
       
   242     CApaDocument* tmp = notifierapp->CreateDocumentL();
       
   243 
       
   244     CApaAppServer* appserver = NULL;
       
   245     notifierapp->NewAppServerL( appserver );
       
   246 
       
   247     delete tmp;
       
   248     delete appserver;
       
   249     CleanupStack::PopAndDestroy( notifierapp );
       
   250 
       
   251     _LIT( KHandleCommandL, "HandleCommandL" );
       
   252     _LIT( KSetFadedL, "SetFadedL" );
       
   253     _LIT( KHandleKeyEventL, "HandleKeyEventL" );
       
   254     _LIT( KHandleError, "HandleError" );
       
   255     _LIT( KHandleSystemEventL, "HandleSystemEventL" );
       
   256     _LIT( KManager, "Manager" );
       
   257     _LIT( KSetManager, "SetManager" );
       
   258     _LIT( KEikSrvBlocked, "EikSrvBlocked" );
       
   259 
       
   260     CAknNotifierAppServerAppUi* notifier = static_cast<CAknNotifierAppServerAppUi*>
       
   261         ( CEikonEnv::Static()->AppUi() );
       
   262 
       
   263     notifier->CAknNotifierAppServerAppUi::HandleCommandL( EEikCmdCanceled );
       
   264     AssertTrueL( ETrue, KHandleCommandL );
       
   265 
       
   266     notifier->SetFadedL( EFalse );
       
   267     AssertTrueL( ETrue, KSetFadedL );
       
   268 
       
   269     TKeyEvent keyevent = { EKeyEnter, EStdKeyEnter, 0, 0  };
       
   270     notifier->HandleKeyEventL( keyevent, EEventNull );
       
   271     AssertTrueL( ETrue, KHandleKeyEventL );
       
   272 
       
   273     TInt handleErr = 0;
       
   274     SExtendedError exterr;
       
   275     TBuf<32> errbuf( KCAknNotifierAppServerAppUi );
       
   276     notifier->HandleError( handleErr, exterr , errbuf , errbuf );
       
   277     AssertTrueL( ETrue, KHandleError );
       
   278 
       
   279     TWsEvent wsevent;
       
   280     notifier->HandleSystemEventL( wsevent );
       
   281     AssertTrueL( ETrue, KHandleSystemEventL );
       
   282 
       
   283     MEikSrvNotifierManager* manager = notifier->Manager();
       
   284     AssertTrueL( ETrue, KManager );
       
   285 
       
   286     notifier->SetManager( manager );
       
   287     AssertTrueL( ETrue, KSetManager );
       
   288 
       
   289     notifier->EikSrvBlocked();
       
   290     AssertTrueL( ETrue, KEikSrvBlocked );
       
   291 
       
   292     //notifier->SuppressAppSwitching( ETrue );
       
   293     //_LIT( KSuppressAppSwitching, "SuppressAppSwitching" );
       
   294     //AssertTrueL( ETrue, KSuppressAppSwitching );
       
   295 
       
   296     // AknNotiferAppServer.h
       
   297     _LIT( KNotiServer, "CAknNotifierAppServer");
       
   298     _LIT( KStartNotifierL, "StartNotifierL");
       
   299     _LIT( KUpdateNotifierL, "UpdateNotifierL");
       
   300     _LIT( KCancelNotifier, "CancelNotifier");
       
   301     _LIT( KStartNotifierAndGetResponseL, "StartNotifierAndGetResponseL");
       
   302     _LIT( KAppendNotifierLibNameL, "AppendNotifierLibNameL");
       
   303     _LIT( KSetImplementationFinderL, "SetImplementationFinderL");
       
   304     _LIT( KUnbalanceReferenceCountForNotif, "UnbalanceReferenceCountForNotif");
       
   305     _LIT( KCreateServiceL, "CreateServiceL");
       
   306     _LIT( KLoadNotifiersL, "LoadNotifiersL");
       
   307     _LIT( KCAknNotifierAppServerDestroy, "SCAknNotifierAppServerDestroy" );
       
   308     _LIT( KUpdateNotifierAndGetResponseL, "UpdateNotifierAndGetResponseL" );
       
   309 ////////////////////////////////////////////////////////////////////////////////////////////////
       
   310     CAknNotifierAppServer *notiserver = new ( ELeave ) CAknNotifierAppServer();
       
   311     CleanupStack::PushL( notiserver );
       
   312     AssertNotNullL( notiserver, KNotiServer );
       
   313     
       
   314     _LIT(KLabName, "ictsuiutilsnotif.dll");
       
   315 	//_LIT(KLabName, "aknoldstylenotif.dll");
       
   316     notiserver->AppendNotifierLibNameL( KLabName );
       
   317     AssertTrueL( ETrue,KAppendNotifierLibNameL );
       
   318     
       
   319     //TRAP( err, notiserver->LoadNotifiersL() );
       
   320     //AssertTrueL( ETrue,KLoadNotifiersL );
       
   321 
       
   322     TBuf8<32> bf;
       
   323     TRAP( err,notiserver->StartNotifierL(
       
   324         KUidBCDomainTestNotifier, bf, bf ) );
       
   325     AssertTrueL( ETrue,KStartNotifierL );
       
   326 
       
   327     TRAP( err, notiserver->UpdateNotifierL(
       
   328         KUidBCDomainTestNotifier, bf, bf ) );
       
   329     AssertTrueL( ETrue,KUpdateNotifierL );
       
   330 
       
   331     notiserver->CancelNotifier( KUidBCDomainTestNotifier );
       
   332     AssertTrueL( ETrue,KCancelNotifier );
       
   333 
       
   334     RMessagePtr2 msg;
       
   335     TInt replyslot = 1;
       
   336     TRAP( err, notiserver->StartNotifierAndGetResponseL(
       
   337         KUidBCDomainTestNotifier, bf, msg, replyslot ) );
       
   338     AssertTrueL( ETrue, KStartNotifierAndGetResponseL );
       
   339 
       
   340 
       
   341     MNotifLibraryOwningServer* pFinder = NULL;
       
   342     notiserver->SetImplementationFinderL( pFinder );
       
   343     AssertTrueL( ETrue, KSetImplementationFinderL );
       
   344 
       
   345     notiserver->UnbalanceReferenceCountForNotif(
       
   346         KUidBCDomainTestNotifier, EFalse );
       
   347     AssertTrueL( ETrue,KUnbalanceReferenceCountForNotif );
       
   348 
       
   349     TRAP( err, notiserver->CreateServiceL( KUidBCDomainTestNotifier ) );
       
   350     AssertTrueL( ETrue, KCreateServiceL );
       
   351 
       
   352 
       
   353 
       
   354     TRAP( err, notiserver->UpdateNotifierAndGetResponseL(
       
   355         KUidBCDomainTestNotifier, bf, msg, replyslot ) );
       
   356     AssertTrueL( ETrue, KUpdateNotifierAndGetResponseL );
       
   357 
       
   358     CleanupStack::PopAndDestroy( notiserver );
       
   359     AssertTrueL( ETrue,KCAknNotifierAppServerDestroy );
       
   360 ////////////////////////////////////////////////////////////////////////////////////
       
   361     // AknNotifierAppServerSession.h
       
   362     // aknnotifiercontrollerutilities.h
       
   363 
       
   364     CAknNotifierControllerUtility* ntf =
       
   365                 new ( ELeave )CAknNotifierControllerUtility(0);
       
   366     CleanupStack::PushL( ntf );
       
   367     ntf->DoStopNotifications();
       
   368     CleanupStack::PopAndDestroy( ntf );
       
   369 
       
   370     _LIT( KCAknNotifierControllerUtility,
       
   371                 "CAknNotifierControllerUtility::DoStopNotifications()" );
       
   372     AssertTrueL( ETrue, KCAknNotifierControllerUtility );
       
   373 
       
   374     // aknnotifiercontroller.h
       
   375     _LIT( KCancelAllNotifications, "CancelAllNotifications" );
       
   376     _LIT( KHideAllNotifications, "HideAllNotifications" );
       
   377 
       
   378     AknNotifierController::HideAllNotifications( EFalse );
       
   379     AssertTrueL( ETrue, KHideAllNotifications );
       
   380 
       
   381     AknNotifierController::CancelAllNotifications();
       
   382     AssertTrueL( ETrue, KCancelAllNotifications );
       
   383 
       
   384     // aknnullservice.h
       
   385 
       
   386     _LIT( KCAknNullService, "CAknNullService" );
       
   387     _LIT( KCAknNullServiceDestroy, "CAknNullServiceDestroy" );
       
   388 
       
   389     MAknServerAppExitObserver* os = new ( ELeave ) CBCserverAppExitObserver();
       
   390     TUid KUidTest = { 0xA004000 };
       
   391     CAknNullService* nullserv = NULL;
       
   392     TRAP( err, nullserv = CAknNullService::NewL( KUidTest, os ) );
       
   393     CleanupStack::PushL( nullserv );
       
   394     AssertTrueL( ETrue,KCAknNullService );
       
   395     CleanupStack::Pop();
       
   396     AssertTrueL( ETrue,KCAknNullServiceDestroy );
       
   397     delete os;
       
   398 
       
   399 
       
   400     CAknLongTapAnimation* ltAnimation = CAknLongTapAnimation::NewL();
       
   401     CleanupStack::PushL( ltAnimation );
       
   402     _LIT( KCAknLongTapAnimationNewL, "CAknLongTapAnimation::NewL()" );
       
   403     AssertTrueL( ETrue, KCAknLongTapAnimationNewL );
       
   404 
       
   405     if (ltAnimation)
       
   406         {
       
   407         ltAnimation->ShowAnimationL( 10, 10 );
       
   408         _LIT( KCAknLongTapAnimationShowAnimationL,
       
   409             "CAknLongTapAnimation::ShowAnimationL()" );
       
   410         AssertTrueL( ETrue, KCAknLongTapAnimationShowAnimationL );
       
   411 
       
   412         ltAnimation->HideAnimation();
       
   413         _LIT( KCAknLongTapAnimationHideAnimation,
       
   414             "CAknLongTapAnimation::HideAnimation()" );
       
   415         AssertTrueL( ETrue, KCAknLongTapAnimationHideAnimation );
       
   416         }
       
   417 
       
   418     CleanupStack::PopAndDestroy();//ltAnimation
       
   419 
       
   420     }
       
   421 
       
   422 // ---------------------------------------------------------------------------
       
   423 // CBCDomainTestNotifierCase::TestSignalL
       
   424 // ---------------------------------------------------------------------------
       
   425 //
       
   426 void CBCDomainTestNotifierCase::TestSignalL()
       
   427     {
       
   428     // aknsignal.h
       
   429     _LIT( KCAknSignalPane, "CAknSignalPane" );
       
   430     _LIT( KConstructFromResourceL, "ConstructFromResourceL" );
       
   431     _LIT( KSetSignalLevel, "SetSignalLevel" );
       
   432     _LIT( KShowGprsIcon, "ShowGprsIcon" );
       
   433     _LIT( KShowCommonPacketDataIcon, "ShowCommonPacketDataIcon" );
       
   434     _LIT( KShowWcdmaIcon, "ShowWcdmaIcon" );
       
   435     _LIT( KShowHsdpaIcon, "ShowHsdpaIcon" );
       
   436     _LIT( KShowEdgeIcon, "ShowEdgeIcon" );
       
   437     _LIT( KCAknSignalPaneDestroy, "SCAknSignalPaneDestroy" );
       
   438 
       
   439     CAknSignalPane* signalpane = new ( ELeave ) CAknSignalPane();
       
   440     CleanupStack::PushL( signalpane );
       
   441     AssertNotNullL( signalpane, KCAknSignalPane );
       
   442 
       
   443     TResourceReader reader;
       
   444     CEikonEnv::Static()->CreateResourceReaderLC( reader,
       
   445         R_BCTESTDOMNOTIFIER_VIEW );
       
   446 
       
   447     signalpane->ConstructFromResourceL( reader );
       
   448     AssertTrueL( ETrue, KConstructFromResourceL );
       
   449 
       
   450     signalpane->SetSignalLevel( 5 );
       
   451     AssertTrueL( ETrue, KSetSignalLevel );
       
   452 
       
   453     signalpane->ShowGprsIcon( EAknSignalGprsIndicatorOff );
       
   454     AssertTrueL( ETrue, KShowGprsIcon );
       
   455 
       
   456     signalpane->ShowCommonPacketDataIcon(
       
   457         EAknSignalCommonPacketDataIndicatorOff );
       
   458     AssertTrueL( ETrue,KShowCommonPacketDataIcon );
       
   459 
       
   460     signalpane->ShowWcdmaIcon( EAknSignalWcdmaIndicatorOff );
       
   461     AssertTrueL( ETrue, KShowWcdmaIcon );
       
   462 
       
   463     signalpane->ShowHsdpaIcon( EAknSignalHsdpaIndicatorOff );
       
   464     AssertTrueL( ETrue, KShowHsdpaIcon );
       
   465 
       
   466     signalpane->ShowCdmaIcon( EAknSignalCdmaIndicatorOff );
       
   467     AssertTrueL( ETrue, KShowHsdpaIcon );
       
   468 
       
   469     signalpane->ShowEdgeIcon( EAknSignalEdgeIndicatorOff );
       
   470     AssertTrueL( ETrue, KShowEdgeIcon );
       
   471 
       
   472     signalpane->SetNaviPaneBackgroundType( EAknNaviPaneBackgroundTypeNotDefined );
       
   473 
       
   474     // Extension Func ExtensionInterface()
       
   475     _LIT( KPositionChanged,"PositionChanged" );
       
   476 
       
   477     CleanupStack::PopAndDestroy();// reader
       
   478     CleanupStack::PopAndDestroy( signalpane );
       
   479     AssertTrueL( ETrue,KCAknSignalPaneDestroy );
       
   480 
       
   481     CBCSignalPane* bcsinpane = new ( ELeave ) CBCSignalPane();
       
   482     CEikonEnv::Static()->CreateResourceReaderLC( reader,
       
   483          R_BCTESTDOMNOTIFIER_VIEW );
       
   484     bcsinpane->ConstructFromResourceL( reader );
       
   485 
       
   486     bcsinpane->PositionChanged();
       
   487     AssertTrueL( ETrue, KPositionChanged );
       
   488 
       
   489     CleanupStack::PopAndDestroy();//reader
       
   490     delete bcsinpane;
       
   491     AssertTrueL( ETrue,KPositionChanged );
       
   492 
       
   493     // AknSignalNotifyAddition.h
       
   494     _LIT( KAknSignalNotifyAddition, "AknSignalNotifyAddition" );
       
   495 
       
   496     CAknNavigationControlContainer* navicontrol = new ( ELeave )
       
   497          CAknNavigationControlContainer();
       
   498     navicontrol->ConstructL();
       
   499     AssertTrueL( ETrue, KAknSignalNotifyAddition );
       
   500     delete navicontrol;
       
   501 
       
   502     //AknNotifierWrapper.h
       
   503     _LIT( KCAknCommonNotifierWrapper, "CAknCommonNotifierWrapper" );
       
   504     _LIT( KSetCustomSecurityHandler, "SetCustomSecurityHandler" );
       
   505     _LIT( KStartNotifierL, "StartNotifierL" );
       
   506     _LIT( KCancelNotifier, "SCancelNotifier" );
       
   507     _LIT( KStartNotifierL2, "StartNotifierL2" );
       
   508     _LIT( KUpdateNotifierL1, "UpdateNotifierL1" );
       
   509     _LIT( KUpdateNotifierL2, "UpdateNotifierL2" );
       
   510     _LIT( KDoNotifierControllerCommand, "DoNotifierControllerCommand" );
       
   511     _LIT( KStartL1, "StartL1" );
       
   512     _LIT( KStartL2, "StartL2" );
       
   513     _LIT( KUpdateL, "UpdateL" );
       
   514     _LIT( KSInfo, "Info" );
       
   515     _LIT( KNotifierCapabilites, "NotifierCapabilites" );
       
   516     _LIT( KCancel, "Cancel" );
       
   517     _LIT( KNewServerRequestL, "NewServerRequestL" );
       
   518     _LIT( KAsyncMessageCompleted, "AsyncMessageCompleted" );
       
   519 
       
   520     TBuf<32> plibaryname;
       
   521     TUid kuid = {0xA0004000};
       
   522     TUid  channel = EAknNotifierChannelNote;
       
   523 
       
   524     CAknCommonNotifierWrapper* notiwrap = CAknCommonNotifierWrapper::NewL(
       
   525         kuid, channel, MEikSrvNotifierBase2::ENotifierPriorityLowest,
       
   526         KSInfo, 64, EFalse );
       
   527     CleanupStack::PushL( notiwrap );
       
   528     AssertNotNullL( notiwrap, KCAknCommonNotifierWrapper );
       
   529 
       
   530     TBuf8<32> bf;
       
   531     RMessagePtr2 msg;
       
   532     TInt replyslot = 1;
       
   533 
       
   534     TUid KUid1 = { 0xA0004001 };
       
   535     TUid KUid2 = { 0xA0004002 };
       
   536 
       
   537     MAknNotifierCustomSecurityCheck* handler = NULL;
       
   538     notiwrap->SetCustomSecurityHandler( handler );
       
   539     AssertTrueL( ETrue, KSetCustomSecurityHandler );
       
   540     delete handler;
       
   541 
       
   542     notiwrap->StartNotifierL( KUid1, bf, replyslot, msg );
       
   543     AssertTrueL( ETrue, KStartNotifierL );
       
   544 
       
   545     TInt err = 0;
       
   546     TRAP( err, notiwrap->StartNotifierL( KUid2, bf ) );
       
   547     AssertTrueL( ETrue, KStartNotifierL2 );
       
   548 
       
   549     notiwrap->CancelNotifier( KUid1 );
       
   550     notiwrap->CancelNotifier( KUid2 );
       
   551     AssertTrueL( ETrue, KCancelNotifier );
       
   552 
       
   553     TRAP( err, notiwrap->UpdateNotifierL( KUid1, bf ) );
       
   554     AssertTrueL( ETrue, KUpdateNotifierL1 );
       
   555 
       
   556     TRAP( err, notiwrap->MAknNotifierWrapper::UpdateNotifierL( KUid2, bf, replyslot,msg ) );
       
   557     AssertTrueL( ETrue, KUpdateNotifierL2 );
       
   558 
       
   559     notiwrap->DoNotifierControllerCommand( 1 );
       
   560     AssertTrueL( ETrue,KDoNotifierControllerCommand );
       
   561 
       
   562     notiwrap->StartL( bf,replyslot,msg );
       
   563     AssertTrueL( ETrue,KStartL1 );
       
   564 
       
   565     notiwrap->Info();
       
   566     AssertTrueL( ETrue,KSInfo );
       
   567 
       
   568     TRAP( err, notiwrap->UpdateL( bf ) );
       
   569     AssertTrueL( ETrue,KUpdateL );
       
   570 
       
   571     notiwrap->NotifierCapabilites();
       
   572     AssertTrueL( ETrue,KNotifierCapabilites );
       
   573 
       
   574     TRAP( err, notiwrap->StartL( bf ) );
       
   575     AssertTrueL( ETrue,KStartL2 );
       
   576 
       
   577     MAknNotifierWrapper* owner = NULL;
       
   578     RMessagePtr2 ptr;
       
   579     CAknNotifierMessageObserver* notimessa = CAknNotifierMessageObserver::
       
   580         NewServerRequestL( KUidBCDomainTestNotifier, owner, ptr, replyslot );
       
   581     CleanupStack::PushL( notimessa );
       
   582     AssertNotNullL( notimessa, KNewServerRequestL );
       
   583 
       
   584     notiwrap->AsyncMessageCompleted( notimessa );
       
   585     AssertTrueL( ETrue, KAsyncMessageCompleted );
       
   586 
       
   587     CleanupStack::PopAndDestroy( notimessa );
       
   588 
       
   589     notiwrap->Cancel();
       
   590     AssertTrueL( ETrue, KCancel );
       
   591 
       
   592     notiwrap->Release();
       
   593     _LIT( KRelease, "Release" );
       
   594     AssertTrueL( ETrue, KRelease );
       
   595     CleanupStack::Pop( notiwrap );    
       
   596 
       
   597     TUid ntfUid = { 0x10aa0d10 };
       
   598     CAknNotifierWrapper* notifierWrap =
       
   599             CAknNotifierWrapper::NewL( ntfUid , ntfUid,  0,  ntfUid, 0);
       
   600     CleanupStack::PushL( notifierWrap );
       
   601 
       
   602     TBuf8<10> buf;
       
   603     RMessagePtr2 message;
       
   604     notifierWrap->StartNotifierL( ntfUid, buf,  0,  message );
       
   605 
       
   606     TInt errno;
       
   607     TRAP( errno, notifierWrap->StartNotifierL( ntfUid, buf ) );
       
   608 
       
   609     CleanupStack::PopAndDestroy( notifierWrap );
       
   610 
       
   611     _LIT( KCAknNotifierWrapper, "CAknNotifierWrapper::StartNotifierL(4)" );
       
   612     AssertTrueL( ETrue, KCAknNotifierWrapper );
       
   613     _LIT( KCAknNotifierWrapper2, "CAknNotifierWrapper::StartNotifierL(2)" );
       
   614     AssertTrueL( ETrue, KCAknNotifierWrapper2 );
       
   615 
       
   616     // AknSignalNotify.h
       
   617     }
       
   618 
       
   619 // ---------------------------------------------------------------------------
       
   620 // CBCDomainTestNotifierCase::TestOtherL
       
   621 // ---------------------------------------------------------------------------
       
   622 //
       
   623 void CBCDomainTestNotifierCase::TestOtherL()
       
   624     {
       
   625 
       
   626     // AknMarqueeControl.h
       
   627 
       
   628     _LIT( KCAknMarqueeControl, "CAknMarqueeControl" );
       
   629     _LIT( KStart, "Start" );
       
   630     _LIT( KReset, "Reset" );
       
   631     _LIT( KStop, "Stop" );
       
   632     _LIT( KIsMarqueeOn, "IsMarqueeOn" );
       
   633     _LIT( KUseLogicalToVisualConversion, "UseLogicalToVisualConversion" );
       
   634     _LIT( KSetSpeedInPixels, "SetSpeedInPixels" );
       
   635     _LIT( KSetDelay, "SetDelay" );
       
   636     _LIT( KSetInterval, "SetInterval" );
       
   637     _LIT( KSetLoops, "SetLoops" );
       
   638     _LIT( KEnableMarquee, "EnableMarquee" );
       
   639     _LIT( KSCAknMarqueeControlDestroy, "SSCAknMarqueeControlDestroy" );
       
   640 
       
   641     CAknMarqueeControl* marcontrol = CAknMarqueeControl::NewL();
       
   642     CleanupStack::PushL( marcontrol );
       
   643     AssertNotNullL( marcontrol, KCAknMarqueeControl );
       
   644     marcontrol->Start();
       
   645     AssertTrueL( ETrue, KStart );
       
   646     marcontrol->Reset();
       
   647     AssertTrueL( ETrue, KReset );
       
   648     marcontrol->Stop();
       
   649     AssertTrueL( ETrue, KStop );
       
   650     marcontrol->IsMarqueeOn();
       
   651     AssertTrueL( ETrue, KIsMarqueeOn );
       
   652     marcontrol->UseLogicalToVisualConversion( EFalse );
       
   653     AssertTrueL( ETrue, KUseLogicalToVisualConversion );
       
   654     marcontrol->SetSpeedInPixels( 4 );
       
   655     AssertTrueL( ETrue, KSetSpeedInPixels );
       
   656     marcontrol->SetDelay( 8 );
       
   657     AssertTrueL( ETrue, KSetDelay );
       
   658     marcontrol->SetInterval( 8 );
       
   659     AssertTrueL( ETrue, KSetInterval );
       
   660     marcontrol->SetLoops( 1 );
       
   661     AssertTrueL( ETrue, KSetLoops );
       
   662     marcontrol->EnableMarquee( EFalse );
       
   663     AssertTrueL( ETrue, KEnableMarquee );
       
   664 
       
   665     const TBuf<32>  txt( KStart );
       
   666     const TInt      baselineoffset = 8;
       
   667     const CGraphicsContext::TTextAlign align( CGraphicsContext::ELeft );
       
   668     TRect rect( TRect(1,1,99,99) );
       
   669     const CFont* font = CEikonEnv::Static()->NormalFont();
       
   670     TAknTextComponentLayout textlayout;
       
   671 
       
   672     marcontrol->SetContainerWindowL( *iContainer );
       
   673     CWindowGc& gc = marcontrol->SystemGc();
       
   674 
       
   675     marcontrol->DrawText( gc, rect, txt, baselineoffset, align, *font );
       
   676     //marcontrol->DrawText( gc, rect, textlayout, txt, font );
       
   677 
       
   678     CleanupStack::PopAndDestroy( marcontrol );
       
   679     AssertTrueL( ETrue, KSCAknMarqueeControlDestroy );
       
   680 
       
   681     //  AknMediatorFacade.h
       
   682     CEikDialog *dialog = new ( ELeave ) CEikDialog();
       
   683     CleanupStack::PushL( dialog );
       
   684     CAknMediatorFacade* mediatorFacade = CAknMediatorFacade::NewL( dialog );
       
   685     CleanupStack::PushL( mediatorFacade );
       
   686     _LIT( KCAknMediatorFacade, "CAknMediatorFacade::CAknMediatorFacade()" );
       
   687     AssertTrueL( ETrue, KCAknMediatorFacade );
       
   688 
       
   689     mediatorFacade->ResetBuffer();
       
   690     _LIT( KCMFacadeResetBuffer, "CAknMediatorFacade::ResetBuffer()" );
       
   691     AssertTrueL( ETrue, KCMFacadeResetBuffer );
       
   692 
       
   693     mediatorFacade->PostUpdatedDataL();
       
   694     _LIT( KCMFacadePostUpdatedDataL, "CAknMediatorFacade::PostUpdatedDataL()" );
       
   695     AssertTrueL( ETrue, KCMFacadePostUpdatedDataL );
       
   696 
       
   697     AknMediatorFacade( dialog );
       
   698     _LIT( KGlobalAknMediatorFacade, "Global::AknMediatorFacade" );
       
   699     AssertTrueL( ETrue, KGlobalAknMediatorFacade );
       
   700 
       
   701 
       
   702     TInt& index = mediatorFacade->DialogIndex();
       
   703     index = 1;
       
   704     mediatorFacade->IssueCommand();
       
   705     _LIT( KCMFacadeIssueCommand, "CAknMediatorFacade::IssueCommand()" );
       
   706     AssertTrueL( ETrue, KCMFacadeIssueCommand );
       
   707 
       
   708     mediatorFacade->CancelCommand();
       
   709     _LIT( KCMFacadeCancelCommand, "CAknMediatorFacade::CancelCommand()" );
       
   710     AssertTrueL( ETrue, KCMFacadeCancelCommand );
       
   711 
       
   712     mediatorFacade->SetObserver( NULL );
       
   713     _LIT( KCMFacadeSetObserver, "CAknMediatorFacade::SetObserver()" );
       
   714     AssertTrueL( ETrue, KCMFacadeSetObserver );
       
   715 
       
   716     CleanupStack::PopAndDestroy( mediatorFacade );
       
   717     CleanupStack::PopAndDestroy( dialog );
       
   718 
       
   719     //  aknlistloadertfx.h
       
   720     _LIT( KTfxApiInternal, "TfxApiInternal" );
       
   721     _LIT( KTfxApi, "TfxApi" );
       
   722     _LIT( KRemoveTfxGc, "RemoveTfxGc" );
       
   723     _LIT( KCreateTfxGc, "CreateTfxGc" );
       
   724     _LIT( KInvalidateAll, "InvalidateAll" );
       
   725 
       
   726     CAknListLoader::TfxApiInternal( &gc );
       
   727     AssertTrueL( ETrue, KTfxApiInternal );
       
   728     CAknListLoader::TfxApi( &gc );
       
   729     AssertTrueL( ETrue, KTfxApi );
       
   730 
       
   731 
       
   732     CAknDialog* dlg = new ( ELeave ) CAknDialog();
       
   733 	CleanupStack::PushL( dlg );
       
   734     CEikMenuPane* menupane = new (ELeave) CEikMenuPane(dlg);
       
   735 	CleanupStack::PushL( menupane );
       
   736     TInt topindex = 0;
       
   737     TInt itemsthatfitinview = 1;
       
   738     CAknListLoader::CreateTfxGc( *menupane, topindex, itemsthatfitinview );
       
   739 
       
   740 	
       
   741     //CDesCArray* txtarray = new (ELeave) CDesCArraySeg(1);
       
   742 	//CleanupStack::PushL( txtarray );
       
   743     //TBuf<32> item( KStart );
       
   744     //txtarray->AppendL( item );
       
   745     
       
   746 
       
   747     //CTextListBoxModel* model = new( ELeave ) CTextListBoxModel();
       
   748     //CleanupStack::PushL( model );
       
   749     //model->ConstructL();
       
   750 	
       
   751 
       
   752     //CTextListItemDrawer* drawer = new( ELeave ) CTextListItemDrawer();
       
   753     //CleanupStack::PushL( drawer );
       
   754     //drawer->ConstructL( CEikonEnv::Static()->NormalFont() );
       
   755 
       
   756     //CEikListBox* lstbox = new ( ELeave ) CEikListBox();
       
   757     //CleanupStack::PushL( lstbox );
       
   758 
       
   759     //TGulBorder tborder( TGulBorder::ESingleGray );
       
   760     //lstbox->ConstructL(  iContainer );
       
   761      //   EAknListBoxSelectionList | EAknListBoxViewerFlags );
       
   762 
       
   763     //CAknListLoader::CreateTfxGc( *lstbox );
       
   764     //AssertTrueL( ETrue, KCreateTfxGc );
       
   765 
       
   766     
       
   767        
       
   768     CAknListLoader::RemoveTfxGc( &gc );
       
   769     AssertTrueL( ETrue, KRemoveTfxGc );
       
   770     
       
   771 	
       
   772     CAknListLoader::InvalidateAll();
       
   773     AssertTrueL( ETrue, KInvalidateAll );
       
   774 	
       
   775 	//CleanupStack::PopAndDestroy( lstbox );
       
   776 	//CleanupStack::PopAndDestroy( drawer );
       
   777 	//CleanupStack::PopAndDestroy( model );
       
   778 	//CleanupStack::PopAndDestroy( txtarray );
       
   779 	
       
   780 	CleanupStack::PopAndDestroy( menupane);
       
   781 	CleanupStack::PopAndDestroy( dlg );
       
   782     // AknReadingConverter.h
       
   783     _LIT( KCReadingConverter, "CReadingConverter" );
       
   784     _LIT( KHandleCompletionOfTransactionL, "HandleCompletionOfTransactionL" );
       
   785     _LIT( KMainEditor, "MainEditor" );
       
   786     _LIT( KReadingEditor, "ReadingEditor" );
       
   787     _LIT( KSetReadingEditor, "SetReadingEditor" );
       
   788     _LIT( KSetMainEditor, "SetMainEditor" );
       
   789 
       
   790 
       
   791     CReadingConverter* rdconver = CReadingConverter::NewL();
       
   792     CleanupStack::PushL( rdconver );
       
   793     AssertNotNullL( rdconver, KCReadingConverter );
       
   794     CleanupStack::PopAndDestroy();
       
   795 
       
   796     CEikEdwin* maineditor = NULL;
       
   797     rdconver = CReadingConverter::NewL( *maineditor, *maineditor );
       
   798     CleanupStack::PushL( rdconver );
       
   799 
       
   800     rdconver->HandleCompletionOfTransactionL();
       
   801     AssertTrueL( ETrue, KHandleCompletionOfTransactionL );
       
   802 
       
   803     rdconver->MainEditor();
       
   804     AssertTrueL( ETrue, KMainEditor );
       
   805 
       
   806     rdconver->ReadingEditor();
       
   807     AssertTrueL( ETrue, KReadingEditor );
       
   808 
       
   809     rdconver->SetReadingEditor( *maineditor );
       
   810     AssertTrueL( ETrue, KSetReadingEditor );
       
   811 
       
   812     rdconver->SetMainEditor( *maineditor );
       
   813     AssertTrueL( ETrue, KSetMainEditor );
       
   814 
       
   815     CleanupStack::PopAndDestroy( rdconver );
       
   816 
       
   817     //  aknMemoryCardDialog.h
       
   818     _LIT( KCAknMemoryCardDialog, "CAknMemoryCardDialog" );
       
   819     _LIT( KSetSelfPointer, "SetSelfPointer" );
       
   820     _LIT( KUnlockCardLD, "UnlockCardLD" );
       
   821     _LIT( KNotifierArray, "NotifierArray" );
       
   822 
       
   823     CAknMemoryCardDialog* memdlg = CAknMemoryCardDialog::NewLC();
       
   824     AssertTrueL( ETrue, KCAknMemoryCardDialog );
       
   825 
       
   826     CArrayPtr<MEikSrvNotifierBase2>* notifies = NotifierArray();
       
   827     AssertTrueL( ETrue, KNotifierArray );
       
   828 
       
   829     memdlg->SetSelfPointer( &memdlg );
       
   830     AssertTrueL( ETrue, KSetSelfPointer );
       
   831     memdlg->UnlockCardLD( EDriveE );
       
   832     AssertTrueL( ETrue, KUnlockCardLD );
       
   833 
       
   834     }
       
   835 
       
   836 // ---------------------------------------------------------------------------
       
   837 // CBCDomainTestNotifierCase::TestPhoneL
       
   838 // ---------------------------------------------------------------------------
       
   839 //
       
   840 void CBCDomainTestNotifierCase::TestPhoneL()
       
   841     {
       
   842   // AknPhoneNumberGrouping.h
       
   843 
       
   844     _LIT( KSet, "Set" );
       
   845     _LIT( KFormattedNumber, "FormattedNumber" );
       
   846     _LIT( KCopyFormattedNumber, "CopyFormattedNumber" );
       
   847     _LIT( KGrouphonenumber, "Grouphonenumber" );
       
   848     _LIT( KCreateGroupedPhoneNumberL, "CreateGroupedPhoneNumberL" );
       
   849     _LIT( KCAknPhoneNumberGroupingDestroy, "CAknPhoneNumberGroupingDestroy" );
       
   850     _LIT( KNumberGroup, "NuberGroup::NewL" );
       
   851 
       
   852     TBuf<32>  num( KNumberGroup );
       
   853     CAknPhoneNumberGrouping* phonenumber = CAknPhoneNumberGrouping::NewL( 10 );
       
   854     CleanupStack::PushL( phonenumber );
       
   855     AssertNotNullL( phonenumber,KNumberGroup );
       
   856 
       
   857     phonenumber->Set( num );
       
   858     AssertTrueL( ETrue, KSet );
       
   859     phonenumber->FormattedNumber();
       
   860     AssertTrueL( ETrue, KFormattedNumber );
       
   861 
       
   862     TBuf<32>  tarea( KNumberGroup );
       
   863     phonenumber->CopyFormattedNumber( tarea );
       
   864     AssertTrueL( ETrue, KCopyFormattedNumber );
       
   865     phonenumber->GroupPhoneNumber( tarea,num );
       
   866     AssertTrueL( ETrue, KGrouphonenumber );
       
   867     phonenumber->GroupPhoneNumber( num );
       
   868     AssertTrueL( ETrue, KGrouphonenumber );
       
   869     HBufC* rturn = phonenumber->CreateGroupedPhoneNumberL( num );
       
   870     AssertTrueL( ETrue, KCreateGroupedPhoneNumberL );
       
   871 
       
   872     delete rturn;
       
   873     CleanupStack::PopAndDestroy();
       
   874     AssertTrueL( ETrue, KCAknPhoneNumberGroupingDestroy );
       
   875 
       
   876     // AknPhoneNumberTextUtils.h
       
   877     _LIT( KWrapPhonenumberToArrayL, "WrapPhonenumberToArrayL" );
       
   878     _LIT( KClipLineOnLeft, "ClipLineOnLeft" );
       
   879     _LIT( KCharsThatFitOnRight, "CharsThatFitOnRight" );
       
   880 
       
   881     TBuf<32> tbuf( KNumberGroup );
       
   882     const CFont *tfont = CEikonEnv::Static()->NormalFont();
       
   883     CArrayFix<TPtrC>* ary = new ( ELeave ) CArrayFixFlat<TPtrC>( 32 );
       
   884 	CleanupStack::PushL( ary );
       
   885     TPtrC tptr( tbuf );
       
   886 
       
   887     AknPhoneNumberTextUtils::WrapPhoneNumberToArrayL(
       
   888         tarea, 2, 16, *tfont, *ary );
       
   889     AssertTrueL( ETrue, KWrapPhonenumberToArrayL );
       
   890     AknPhoneNumberTextUtils::ClipLineOnLeft( tptr, tbuf, 1, *tfont );
       
   891     AssertTrueL( ETrue, KClipLineOnLeft );
       
   892     AknPhoneNumberTextUtils::CharsThatFitOnRight( tarea, 2, *tfont );
       
   893     AssertTrueL( ETrue, KCharsThatFitOnRight );
       
   894 	CleanupStack::PopAndDestroy( ary );
       
   895     //delete ary;
       
   896 
       
   897     // AknPhoneNumberEditor.h
       
   898     _LIT( KCAknPhoneNumberEditor, "CAknPhoneNumberEditor" );
       
   899     _LIT( KConstructFromResourceL, "ConstructFromResourceL" );
       
   900     _LIT( KFormat, "Format" );
       
   901     _LIT( KWouldTextFitInFormat, "WouldTextFitInFormat" );
       
   902     _LIT( KCurrentFormatIndex, "CurrentFormatIndex" );
       
   903     _LIT( KSetFormat, "SetFormat" );
       
   904     _LIT( KText, "Text" );
       
   905     _LIT( KSizeChanged, "SizeChanged" );
       
   906     _LIT( KMinimumSize, "MinimumSize" );
       
   907     _LIT( KInputCapabilities, "InputCapabilities" );
       
   908     _LIT( KTextLength, "TextLength" );
       
   909     _LIT( KCursorPos, "CursorPos" );
       
   910     _LIT( KSelectionLength, "SelectionLength" );
       
   911     _LIT( KSelection, "Selection" );
       
   912     _LIT( KClearSelectionL, "ClearSelectionL" );
       
   913     _LIT( KSetSelectionL, "SetSelectionL" );
       
   914     _LIT( KSetCursorPosL, "SetCursorPosL" );
       
   915     _LIT( KSelectAllL, "SelectAllL" );
       
   916     _LIT( KGetText, "GetText" );
       
   917     _LIT( KGetTextInHBufL, "GetTextInHBufL" );
       
   918     _LIT( KSetTextL, "SetTextL" );
       
   919     _LIT( KSetText, "SetText" );
       
   920     _LIT( KGetEditorMode, "KGetEditorMode" );
       
   921     _LIT( KCancelFepTransaction, "CancelFepTransaction" );
       
   922     _LIT( KUpdateScrollBarsL, "UpdateScrollBarsL" );
       
   923     _LIT( KCreateScrollBarFrameL, "CreateScrollBarFrameL" );
       
   924     _LIT( KLineCursorWidth, "LineCursorWidth" );
       
   925     _LIT( KMargins, "Margins" );
       
   926     _LIT( KChangeEditorMode, "ChangeEditorMode" );
       
   927     _LIT( KResetEditorToDefaultValues, "ResetEditorToDefaultValues" );
       
   928     _LIT( KOfferKeyEventL, "OfferKeyEventL" );
       
   929     _LIT( KFocusChanged, "FocusChanged" );
       
   930     _LIT( KCAknPhoneNumberEditorDestroy, "KCAknPhoneNumberEditorDestroy" );
       
   931     _LIT( KCAknPhoneNumberEditorDraw, "Draw" );
       
   932 
       
   933     CAknPhoneNumberEditor* phonenumeditor =
       
   934         new ( ELeave ) CAknPhoneNumberEditor;
       
   935     CleanupStack::PushL( phonenumeditor );
       
   936     //AssertNotNullL( phonenumeditor,KCAknPhoneNumberEditor  );
       
   937     phonenumeditor->SetContainerWindowL( *iContainer );
       
   938     TResourceReader reader;
       
   939     CEikonEnv::Static()->CreateResourceReaderLC( reader,
       
   940 	          R_PHONEEDAPP_RESEDIT );
       
   941 
       
   942 
       
   943     phonenumeditor->ConstructFromResourceL( reader );
       
   944     AssertTrueL( ETrue,KConstructFromResourceL  );
       
   945     CleanupStack::PopAndDestroy();//reader
       
   946 	
       
   947     phonenumeditor->Format( 0 );
       
   948     AssertTrueL( ETrue, KFormat );
       
   949 
       
   950     //Draw() function will be called.
       
   951     iContainer->SetControl( phonenumeditor ); 
       
   952     AssertTrueL( ETrue, KCAknPhoneNumberEditorDraw );
       
   953 
       
   954     TInt tcount = phonenumeditor->CountFormats();
       
   955     phonenumeditor->WouldTextFitInFormat( tcount-1 );
       
   956     AssertTrueL( ETrue, KWouldTextFitInFormat );
       
   957     tcount = phonenumeditor->CurrentFormatIndex();
       
   958     AssertTrueL( ETrue, KCurrentFormatIndex );
       
   959     phonenumeditor->SetFormat( tcount );
       
   960     AssertTrueL( ETrue, KSetFormat );
       
   961     phonenumeditor->Text();
       
   962     AssertTrueL( ETrue, KText );
       
   963     phonenumeditor->SizeChanged();
       
   964     AssertTrueL( ETrue, KSizeChanged );
       
   965     phonenumeditor->MinimumSize();
       
   966     AssertTrueL( ETrue, KMinimumSize );
       
   967     phonenumeditor->InputCapabilities();
       
   968     AssertTrueL( ETrue, KInputCapabilities );
       
   969 
       
   970     phonenumeditor->TextLength();
       
   971     AssertTrueL( ETrue, KTextLength );
       
   972     phonenumeditor->CursorPos();
       
   973     AssertTrueL( ETrue, KCursorPos );
       
   974     phonenumeditor->SelectionLength();
       
   975     AssertTrueL( ETrue, KSelectionLength );
       
   976     phonenumeditor->Selection();
       
   977     AssertTrueL( ETrue, KSelection );
       
   978     phonenumeditor->ClearSelectionL();
       
   979     AssertTrueL( ETrue, KClearSelectionL );
       
   980     phonenumeditor->SetSelectionL( 0,0 );
       
   981     AssertTrueL( ETrue, KSetSelectionL );
       
   982     phonenumeditor->SetCursorPosL( 0,0 );
       
   983     AssertTrueL( ETrue, KSetCursorPosL );
       
   984     phonenumeditor->SelectAllL();
       
   985     AssertTrueL( ETrue, KSelectAllL );
       
   986     phonenumeditor->GetText( tarea );
       
   987     AssertTrueL( ETrue, KGetText );
       
   988     HBufC* temp = phonenumeditor->GetTextInHBufL();
       
   989 	CleanupStack::PushL( temp );
       
   990     AssertTrueL( ETrue, KGetTextInHBufL );
       
   991 	CleanupStack::PopAndDestroy( temp );
       
   992 
       
   993     phonenumeditor->SetTextL( &tarea );
       
   994     AssertTrueL( ETrue, KSetTextL );
       
   995 
       
   996     phonenumeditor->SetText( tarea );
       
   997     AssertTrueL( ETrue, KSetText );
       
   998 
       
   999     phonenumeditor->CancelFepTransaction();
       
  1000     AssertTrueL( ETrue, KCancelFepTransaction );
       
  1001 
       
  1002     phonenumeditor->UpdateScrollBarsL();
       
  1003     AssertTrueL( ETrue, KUpdateScrollBarsL );
       
  1004     CEikScrollBarFrame* pScrBar = phonenumeditor->CreateScrollBarFrameL();
       
  1005 	CleanupStack::PushL( pScrBar );
       
  1006     AssertTrueL( ETrue, KCreateScrollBarFrameL );
       
  1007     CleanupStack::PopAndDestroy( pScrBar );
       
  1008     phonenumeditor->LineCursorWidth();
       
  1009     AssertTrueL( ETrue, KLineCursorWidth );
       
  1010     phonenumeditor->Margins();
       
  1011     AssertTrueL( ETrue, KMargins );
       
  1012 
       
  1013     phonenumeditor->ChangeEditorMode();
       
  1014     AssertTrueL( ETrue, KChangeEditorMode );
       
  1015     phonenumeditor->GetEditorMode();
       
  1016     AssertTrueL( ETrue, KGetEditorMode );
       
  1017     phonenumeditor->ResetEditorToDefaultValues();
       
  1018     AssertTrueL( ETrue, KResetEditorToDefaultValues );
       
  1019 
       
  1020     TKeyEvent keyevent = { EKeyEnter, EStdKeyEnter, 0, 0  };
       
  1021     phonenumeditor->OfferKeyEventL( keyevent,EEventKey );
       
  1022     AssertTrueL( ETrue, KOfferKeyEventL );
       
  1023     phonenumeditor->FocusChanged( EDrawNow );//Draw() function will be called.
       
  1024     AssertTrueL( ETrue, KFocusChanged );
       
  1025 
       
  1026     iContainer->ResetControl();
       
  1027 	CleanupStack::Pop();
       
  1028     //CleanupStack::PopAndDestroy();
       
  1029     AssertTrueL( ETrue, KCAknPhoneNumberEditorDestroy );
       
  1030 
       
  1031     TestFormatL();
       
  1032     }
       
  1033 
       
  1034 // ---------------------------------------------------------------------------
       
  1035 // CBCDomainTestNotifierCase::TestFormatL
       
  1036 // ---------------------------------------------------------------------------
       
  1037 //
       
  1038 void  CBCDomainTestNotifierCase::TestFormatL()
       
  1039     {
       
  1040     _LIT( KCAknPhoneNumberEditor, "CAknPhoneNumberEditor" );
       
  1041     _LIT( KConstructL, "ConstructL" );
       
  1042     _LIT( KString, "..." );
       
  1043     _LIT( KTFormat, "TFormat" );
       
  1044     _LIT( KAddFormat, "AddFormat" );
       
  1045     _LIT( KCAknPhoneNumberEditorDestroy, "CAknPhoneNumberEditorDestroy" );
       
  1046     _LIT( KCAknMemoryCardDialog, "CAknMemoryCardDialog" );
       
  1047     _LIT( KGetSkinnedBitmapID, "GetSkinnedBitmapID" );
       
  1048     _LIT( KUnlockCardLD, "UnlockCardLD" );
       
  1049 
       
  1050     CAknPhoneNumberEditor* phonenumeditor = new ( ELeave ) CAknPhoneNumberEditor;
       
  1051     AssertNotNullL( phonenumeditor, KCAknPhoneNumberEditor );
       
  1052 
       
  1053     phonenumeditor->SetContainerWindowL( *iContainer );
       
  1054     phonenumeditor->ConstructL(  30, 3, 3, KString);
       
  1055     AssertTrueL( ETrue, KConstructL );
       
  1056 
       
  1057     const CFont *tfont = CEikonEnv::Static()->NormalFont();
       
  1058     CAknPhoneNumberEditor::TFormat tformat( CAknPhoneNumberEditor::TFormat(
       
  1059         TRect( 10, 10, 70, 55 ), 0, 3, 3, 15, tfont ) );
       
  1060     AssertTrueL( ETrue, KTFormat );
       
  1061 
       
  1062     phonenumeditor->AddFormat( tformat );
       
  1063     AssertTrueL( ETrue, KAddFormat );
       
  1064 
       
  1065     TResourceReader reader;
       
  1066     CEikonEnv::Static()->CreateResourceReaderLC( reader,
       
  1067          R_NUMBER_FIELD_FORM );
       
  1068     CAknPhoneNumberEditor::TFormat readformat( reader );
       
  1069     AssertTrueL( ETrue, KTFormat );
       
  1070 
       
  1071     CleanupStack::PopAndDestroy( );//reader
       
  1072     delete phonenumeditor;    
       
  1073     AssertTrueL( ETrue, KCAknPhoneNumberEditorDestroy  );
       
  1074 
       
  1075 
       
  1076     CAknNoteAttributes::GetSkinnedBitmapID( 0 );
       
  1077     AssertTrueL( ETrue, KGetSkinnedBitmapID  );
       
  1078 
       
  1079     //aknmemorycarddialog.h
       
  1080     CAknMemoryCardDialog* memdlg = CAknMemoryCardDialog::NewLC();
       
  1081     AssertNotNullL( memdlg, KCAknMemoryCardDialog );
       
  1082 
       
  1083     memdlg->UnlockCardLD( ETrue );
       
  1084     AssertTrueL( ETrue, KUnlockCardLD );
       
  1085 
       
  1086     }