diff -r 558113899881 -r b3425bf29f82 classicui_pub/tsrc/bc/apps/S60_SDK3.0/bctestcmdlg/src/bctestmemselpage.cpp --- a/classicui_pub/tsrc/bc/apps/S60_SDK3.0/bctestcmdlg/src/bctestmemselpage.cpp Mon May 03 12:45:33 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: test case -* -*/ - - - - - - - - - -#include -#include - -#include "BCTestMemSelPage.h" -#include "BCTestCmDlg.hrh" -#include "streamlogger.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Symbian 2nd static Constructor -// --------------------------------------------------------------------------- -// -CBCTestMemSelSettingPage* CBCTestMemSelSettingPage::NewL() - { - CBCTestMemSelSettingPage* self = new( ELeave ) CBCTestMemSelSettingPage(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// C++ default constructor -// --------------------------------------------------------------------------- -// -CBCTestMemSelSettingPage::CBCTestMemSelSettingPage():iDlg(0) - { - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CBCTestMemSelSettingPage::~CBCTestMemSelSettingPage() - { - delete iDlg; - } - -// --------------------------------------------------------------------------- -// Symbian 2nd Constructor -// --------------------------------------------------------------------------- -// -void CBCTestMemSelSettingPage::ConstructL() - { - BuildScriptL(); - } - -// --------------------------------------------------------------------------- -// CBCTestMemSelSettingPage::BuildScriptL -// --------------------------------------------------------------------------- -// -void CBCTestMemSelSettingPage::BuildScriptL() - { - AddTestL( DELAY(1), TEND); - - // Add script as your need. - for(int i=0; iExecuteL( iMemory, &rootFileName, &defaultFileName ); - iDlg->GetItem( iMemory, emptyFileName ); - - TFileName msg; - msg.Format( _L("User Hit: %d, Memory is: %d, FileName: "), returnValue, iMemory ); - msg.Append( emptyFileName ); - msg.ZeroTerminate(); - AssertTrueL(ETrue, msg); - msg.Append( _L("Root: ") ); - msg.Append( rootFileName ); - msg.Append( _L(", Default: ") ); - msg.Append( defaultFileName ); - msg.ZeroTerminate(); - AssertTrueL(ETrue, msg); - } - -void CBCTestMemSelSettingPage::TestCreateL(TInt aResID) - { - iDlg = CAknMemorySelectionSettingPage::NewL( aResID ); - TInt returnValue = iDlg->ExecuteL( iMemory); - AssertTrueL( returnValue, _L("Create with Resorce ID")); - } - -void CBCTestMemSelSettingPage::TestQuickCreateL() - { - AssertTrueL(CAknMemorySelectionSettingPage::RunDlgLD(iMemory), _L("Quick create, User hit OK")); - AssertIntL( CAknMemorySelectionSettingPage::EPhoneMemory, iMemory, _L("Phone memroy created")); - } - -void CBCTestMemSelSettingPage::TestQuickCreateL(const TDesC &aTitle) - { - AssertTrueL(CAknMemorySelectionSettingPage::RunDlgLD(iMemory, aTitle), _L("Quick create with title, User hit OK")); - AssertIntL( CAknMemorySelectionSettingPage::EPhoneMemory, iMemory, _L("Phone memroy created")); - } - -void CBCTestMemSelSettingPage::TestQuickCreateL(TInt aResID) - { - AssertTrueL(CAknMemorySelectionSettingPage::RunDlgLD(iMemory, aResID), _L("Quick create with ResID, User hit OK")); - AssertIntL( CAknMemorySelectionSettingPage::EPhoneMemory, iMemory, _L("Phone memroy created")); - } - -void CBCTestMemSelSettingPage::SetupL() - { - iMemory = CAknMemorySelectionDialog::EPhoneMemory; - } -