usbmgmt/usbmgr/test/cit/ROMConfig/src/cteststepusbromconfig003.cpp
branchRCL_3
changeset 15 f92a4f87e424
parent 14 d3e8e7d462dd
child 16 012cc2ee6408
equal deleted inserted replaced
14:d3e8e7d462dd 15:f92a4f87e424
     1 /*
       
     2 * Copyright (c) 2005-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "cteststepusbromconfig003.h"
       
    19 #include <c32comm.h>
       
    20 #include <AcmInterface.h>
       
    21 
       
    22 CTestStepUsbRomConfig003::~CTestStepUsbRomConfig003()
       
    23 	{
       
    24     }
       
    25 	
       
    26 CTestStepUsbRomConfig003::CTestStepUsbRomConfig003
       
    27 	(CTestServer& aParent) 
       
    28 	: CTestStepUsbRomConfigBase(aParent)
       
    29 	{
       
    30 	SetTestStepName(KTestName003);
       
    31 	}
       
    32 
       
    33 /**
       
    34 Static Constructor
       
    35 Note the lack of ELeave. This means that having insufficient memory will return NULL;
       
    36 */
       
    37 CTestStepUsbRomConfig003* CTestStepUsbRomConfig003::New
       
    38 	(CTestServer& aParent)
       
    39 	{
       
    40 	return new CTestStepUsbRomConfig003(aParent); 
       
    41 	}
       
    42 	
       
    43 /**
       
    44 See USB_ROMCONFIG_003.script
       
    45 */
       
    46 TVerdict CTestStepUsbRomConfig003::doTestStepL()
       
    47 	{
       
    48 	INFO_PRINTF1(\
       
    49 		_L("&gt;&gt;CTestStepUsbRomConfig003::doTestStepL()"));
       
    50 	
       
    51 	const TInt expectedError = ( iUsbExcluded ? KErrNotFound : KErrNone );
       
    52 	const TDesC* expectedErrorDesPtr = ( iUsbExcluded ? &KErrNotFoundLit : &KErrNoneLit );
       
    53 	
       
    54 	RCommServ commServ;
       
    55 	commServ.Connect();
       
    56 	TInt err = commServ.LoadCommModule(KAcmCsyName);
       
    57 	if ( err!=expectedError )
       
    58 		{
       
    59 		INFO_PRINTF5(\
       
    60 			_L("Failed: Expected %S(%d) and got %d when calling LoadCommModule(%S)"),\
       
    61 			expectedErrorDesPtr, expectedError, err, &KAcmCsyName);
       
    62 		SetTestStepResult(EFail);
       
    63 		}
       
    64 	commServ.Close();
       
    65 		
       
    66 	INFO_PRINTF1(\
       
    67 		_L("&lt;&lt;CTestStepUsbRomConfig003::doTestStepL()"));
       
    68 	CheckAndSetTestResult();
       
    69 	return TestStepResult(); 
       
    70 	}
       
    71 
       
    72 // EOF