sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // TSIMmfCtlfrmNeg.cpp sl@0: // Negative integration testing for MMF CTLFRM sl@0: // sl@0: // sl@0: sl@0: // EPOC includes sl@0: #include sl@0: sl@0: // Test system includes sl@0: #include sl@0: #include "TSI_MmfCtlfrmNeg.h" sl@0: #include "TSI_MmfCtlfrmStep.h" sl@0: #include "TSI_MmfCtlfrmSuite.h" sl@0: #include "TSI_MmfCodes.h" sl@0: #include "TSI_MmfEventIds.h" sl@0: #include "ActrlTestUids.h" sl@0: sl@0: #include sl@0: #include sl@0: sl@0: //const TUid KTestControllerUid = {KTSIMmfControllerUid}; // EABI warning removal sl@0: //const TUid KTestController2Uid = {KTSIMmfController2Uid}; // EABI warning removal sl@0: const TUid KTestDataSourceUid = {KTSIMmfDataSourceUid}; sl@0: //const TUid KTestDataSinkUid = {KTSIMmfDataSinkUid}; // EABI warning removal sl@0: sl@0: // audio controller, from mmfControllerImplementationUIDs.hrh sl@0: //const TUid KTestAudioControllerUid = {KMmfUidControllerAudio}; // EABI warning removal sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0502 sl@0: // sl@0: // Load controller plugin for unsupported file format sl@0: // sl@0: // REQ172.5.3 sl@0: sl@0: RTestMmfCtlfrmI0502* RTestMmfCtlfrmI0502::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0502* self = new(ELeave) RTestMmfCtlfrmI0502; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0502::RTestMmfCtlfrmI0502() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0502"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0502::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("open controller by unsupported extension")); sl@0: sl@0: // TO DO sl@0: // This test needs to be looked at to clarify if we need TMMFPrioritySettings sl@0: // sl@0: // TMMFPrioritySettings settings; sl@0: sl@0: // settings.iPriority = ETSIMmfPriorityLow; sl@0: // settings.iPref = EMdaPriorityPreferenceTime; sl@0: // settings.iState = EMMFStateIdle; sl@0: sl@0: CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC(); sl@0: CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC(); sl@0: sl@0: // Set the format match data sl@0: fSelect->SetMatchToFileNameL(_L("test.xls")); sl@0: // Set the controller plugin play format match data sl@0: cSelect->SetRequiredPlayFormatSupportL(*fSelect); sl@0: sl@0: RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data sl@0: CleanupResetAndDestroyPushL(controllers); sl@0: cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers sl@0: TInt numControllers = controllers.Count(); sl@0: if(numControllers) sl@0: { sl@0: ERR_PRINTF1(_L("Error : found a suitable controller")); sl@0: CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Success : found no suitable controllers")); sl@0: CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0504 sl@0: // sl@0: // Load a controller by preferred supplier where only compatible controller sl@0: // available is from a rival sl@0: // sl@0: // REQ172.5.5.1 sl@0: sl@0: RTestMmfCtlfrmI0504* RTestMmfCtlfrmI0504::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0504* self = new(ELeave) RTestMmfCtlfrmI0504; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0504::RTestMmfCtlfrmI0504() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0504"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0504::DoTestStepL() sl@0: { sl@0: // try to open a controller by preferred supplier sl@0: // where only a rival's is available sl@0: sl@0: INFO_PRINTF1(_L("open controller by preferred supplier")); sl@0: sl@0: CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC(); sl@0: CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC(); sl@0: sl@0: // Set the format match data sl@0: fSelect->SetMatchToFileNameL(_L("test.wav")); sl@0: // Set the controller plugin play format match data sl@0: cSelect->SetRequiredPlayFormatSupportL(*fSelect); sl@0: sl@0: // Set for only those plugins supplied by "ACME Industries" sl@0: _LIT(KPrefSupplierAcme, "ACME Industries"); sl@0: cSelect->SetPreferredSupplierL(KPrefSupplierAcme, CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned); sl@0: sl@0: RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data sl@0: CleanupResetAndDestroyPushL(controllers); sl@0: cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers sl@0: TInt numControllers = controllers.Count(); sl@0: if(numControllers) sl@0: { sl@0: ERR_PRINTF1(_L("Error : found a suitable controller")); sl@0: CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Success : found no suitable controllers")); sl@0: CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0511 sl@0: // sl@0: // Add a data source to a controller which does not support dynamic addition of sources / sinks sl@0: // sl@0: // REQ172.5.5.1 sl@0: sl@0: RTestMmfCtlfrmI0511* RTestMmfCtlfrmI0511::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0511* self = new(ELeave) RTestMmfCtlfrmI0511; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0511::RTestMmfCtlfrmI0511() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0511"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0511::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("add data source where not supported")); sl@0: sl@0: // TSI_MmfController2 does not support adding source / sink sl@0: sl@0: sl@0: // first : add a data source without a handle sl@0: _LIT8(KInitData,"TEST"); sl@0: sl@0: TInt error = KErrNone; sl@0: error = iController.AddDataSource(KTestDataSourceUid, KInitData); sl@0: if (!error) sl@0: { sl@0: ERR_PRINTF1(_L("Error : AddDataSource succeeded")); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: else if (error != KErrNotSupported) sl@0: { sl@0: ERR_PRINTF2(_L("AddDataSource failed with unexpected error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("AddDataSource failed, error KErrNotSupported")); sl@0: sl@0: // next : add a data source with a handle sl@0: TMMFMessageDestination* sourceHandlePtr = new (ELeave) TMMFMessageDestination(); sl@0: TMMFMessageDestination& sourceHandle = *sourceHandlePtr; sl@0: error = iController.AddDataSource(KTestDataSourceUid, KInitData, sourceHandle); sl@0: if (!error) sl@0: { sl@0: ERR_PRINTF1(_L("Error : AddDataSource (with handle) succeeded")); sl@0: delete sourceHandlePtr; sl@0: return iTestStepResult = EFail; sl@0: } sl@0: else if (error != KErrNotSupported) sl@0: { sl@0: ERR_PRINTF2(_L("AddDataSource (with handle) failed with unexpected error %d"), error); sl@0: delete sourceHandlePtr; sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("AddDataSource (with handle) failed, error KErrNotSupported")); sl@0: delete sourceHandlePtr; sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0512 sl@0: // sl@0: // Add a data source which has already been added to a controller sl@0: // sl@0: // REQ172.5.5.1 sl@0: sl@0: RTestMmfCtlfrmI0512* RTestMmfCtlfrmI0512::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0512* self = new(ELeave) RTestMmfCtlfrmI0512; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0512::RTestMmfCtlfrmI0512() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0512"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0512::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("add data source where already added")); sl@0: TInt error = KErrNone; sl@0: sl@0: // this source already exists in the controller sl@0: _LIT(KTestWavFile, "c:\\TsiMmfCtlfrmData\\test.wav"); sl@0: iFileConfig().iPath = KTestWavFile; sl@0: error = iController.AddDataSource(KUidMmfFileSource, iFileConfig); sl@0: if (!error) sl@0: { sl@0: ERR_PRINTF1(_L("Error : AddDataSource succeeded")); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: else if (error != KErrAlreadyExists) sl@0: { sl@0: ERR_PRINTF2(_L("AddDataSource failed with unexpected error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("AddDataSource failed, error KErrAlreadyExists")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0513 sl@0: // sl@0: // Remove a source or sink which is currently in use (track playing) sl@0: // sl@0: // REQ172.5.5.1 sl@0: sl@0: RTestMmfCtlfrmI0513* RTestMmfCtlfrmI0513::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0513* self = new(ELeave) RTestMmfCtlfrmI0513; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0513::RTestMmfCtlfrmI0513() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0513"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0513::DoTestStepL() sl@0: { sl@0: //XXX : we may have problems here. the only controller we have is the sl@0: // Audio Controller and this does not yet support removal of sources/sinks, sl@0: // whether it's playing or not... sl@0: sl@0: INFO_PRINTF1(_L("remove a source / sink when track playing")); sl@0: sl@0: TInt error = KErrNone; sl@0: sl@0: // set it playing sl@0: error = iController.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Play failed, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // wait a little sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: sl@0: // try and remove the data source sl@0: TMMFMessageDestination& sourceHandle = *iSourceHandlePtr; sl@0: error = iController.RemoveDataSource(sourceHandle); sl@0: if (error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : RemoveDataSource returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("RemoveDataSource returned KErrNotReady")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0514 sl@0: // sl@0: // Remove a source or sink which is not present in controller sl@0: // sl@0: // REQ172.5.5.2 sl@0: sl@0: RTestMmfCtlfrmI0514* RTestMmfCtlfrmI0514::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0514* self = new(ELeave) RTestMmfCtlfrmI0514; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0514::RTestMmfCtlfrmI0514() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0514"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0514::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("remove a nonexistent source / sink")); sl@0: sl@0: TInt error = KErrNone; sl@0: sl@0: // reset will remove the sources/sinks we added in the preamble sl@0: error = iController.Reset(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : Reset failed, error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: // try and remove the data source sl@0: TMMFMessageDestination& sourceHandle = *iSourceHandlePtr; sl@0: error = iController.RemoveDataSource(sourceHandle); sl@0: if (!error) sl@0: { sl@0: ERR_PRINTF1(_L("Error : RemoveDataSource succeeded")); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: else if (error != KErrNotFound) sl@0: { sl@0: ERR_PRINTF2(_L("RemoveDataSource failed with unexpected error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("RemoveDataSource failed with error KErrNotFound")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0515 sl@0: // sl@0: // Add a data source by UID, but with source info incompatible with the plugin sl@0: // sl@0: // REQ172.5.5.2 sl@0: sl@0: RTestMmfCtlfrmI0515* RTestMmfCtlfrmI0515::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0515* self = new(ELeave) RTestMmfCtlfrmI0515; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0515::RTestMmfCtlfrmI0515() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0515"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0515::OpenL() sl@0: { sl@0: return iTestStepResult = EPass; sl@0: // so we don't run the parent preamble sl@0: } sl@0: sl@0: void RTestMmfCtlfrmI0515::Close() sl@0: { sl@0: // so we don't run the parent postamble sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0515::DoTestStepL() sl@0: { sl@0: // NB : this test is no longer valid - see DEF001550 in TeamTrack. sl@0: sl@0: // Reject Report : sl@0: // This is 'as designed' behaviour. The CMMFAudioController::AddDataSourceL function traps sl@0: // the call to CMMFFormatDecode::NewL, which leaves in this instance with error KErrNotSupported. sl@0: // However it completes silently if KErrNotSupported is the error (see the comment on line 182 sl@0: // of MmfAudioController.cpp) sl@0: sl@0: INFO_PRINTF1(_L("add incompatible data source by UID")); sl@0: INFO_PRINTF1(_L("test no longer valid - see DEF001550 in TeamTrack")); sl@0: /* sl@0: TInt error = KErrNone; sl@0: sl@0: iSettings.iPriority = ETSIMmfPriorityHigh; sl@0: iSettings.iPref = EMdaPriorityPreferenceQuality; sl@0: iSettings.iState = EMMFStateIdle; sl@0: sl@0: // Open a controller sl@0: error = iController.Open(KTestAudioControllerUid, iSettings); sl@0: if (error) sl@0: { sl@0: ERR_PRINTF2(_L("controller failed to open, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // Attempt to add an incompatible source and sink sl@0: _LIT(KTestXlsFile, "c:\\TsiMmfCtlfrmData\\test.xls"); sl@0: iFileConfig().iPath = KTestXlsFile; sl@0: error = iController.AddDataSource(KUidMmfFileSource, iFileConfig); sl@0: if (!error) sl@0: { sl@0: ERR_PRINTF1(_L("Error : AddDataSource succeeded")); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: else if (error != KErrNotSupported) sl@0: { sl@0: ERR_PRINTF2(_L("AddDataSource failed with unexpected error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("AddDataSource failed, error KErrNotSupported")); sl@0: sl@0: error = iController.AddDataSink(KUidMmfFileSource, iFileConfig); sl@0: if (!error) sl@0: { sl@0: ERR_PRINTF1(_L("Error : AddDataSink succeeded")); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: else if (error != KErrNotSupported) sl@0: { sl@0: ERR_PRINTF2(_L("AddDataSink failed with unexpected error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("AddDataSink failed, error KErrNotSupported")); sl@0: */ sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0521 sl@0: // sl@0: // Play an unprimed controller sl@0: // sl@0: // REQ172.5.5.6 sl@0: sl@0: RTestMmfCtlfrmI0521* RTestMmfCtlfrmI0521::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0521* self = new(ELeave) RTestMmfCtlfrmI0521; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0521::RTestMmfCtlfrmI0521() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0521"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0521::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("play an unprimed controller")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, but not primed sl@0: // try to set it playing sl@0: error = iController.Play(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Play failed with error KErrNotReady")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0522 sl@0: // sl@0: // Prime a controller which is already primed sl@0: // sl@0: // REQ172.5.5.6 sl@0: sl@0: RTestMmfCtlfrmI0522* RTestMmfCtlfrmI0522::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0522* self = new(ELeave) RTestMmfCtlfrmI0522; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0522::RTestMmfCtlfrmI0522() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0522"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0522::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("prime an already primed controller")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, but not primed sl@0: // prime it, then prime it again sl@0: error = iController.Prime(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : first prime returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // wait a while, to give it chance to prime sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: sl@0: // prime a second time. this should succeed (KErrNone) sl@0: // (defined in Audio Controller) sl@0: error = iController.Prime(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : second prime returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Second prime returned success")); sl@0: sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0523 sl@0: // sl@0: // Play a controller where there is no defined source sl@0: // sl@0: // REQ172.5.5.6 sl@0: sl@0: RTestMmfCtlfrmI0523* RTestMmfCtlfrmI0523::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0523* self = new(ELeave) RTestMmfCtlfrmI0523; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0523::RTestMmfCtlfrmI0523() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0523"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0523::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("play a controller with no defined source")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is setup in the preamble, but has no source sl@0: // try to set it playing sl@0: error = iController.Play(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Play failed with error KErrNotReady")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0524 sl@0: // sl@0: // Play a controller which is already playing sl@0: // sl@0: // REQ172.5.5.6 sl@0: sl@0: RTestMmfCtlfrmI0524* RTestMmfCtlfrmI0524::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0524* self = new(ELeave) RTestMmfCtlfrmI0524; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0524::RTestMmfCtlfrmI0524() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0524"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0524::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("play a controller which is already playing")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // set it playing sl@0: error = iController.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // wait a while, to give it chance to start playing sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: sl@0: // do it again :- should return KErrNotReady (this is defined in the sl@0: // Audio Controller) sl@0: error = iController.Play(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : second play returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Second play returned KErrNotReady")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0525 sl@0: // sl@0: // Stop a controller which is not playing sl@0: // sl@0: // REQ172.5.5.7 sl@0: sl@0: RTestMmfCtlfrmI0525* RTestMmfCtlfrmI0525::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0525* self = new(ELeave) RTestMmfCtlfrmI0525; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0525::RTestMmfCtlfrmI0525() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0525"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0525::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("stop a controller which is not playing")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // play it, stop, try and stop again sl@0: error = iController.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: // wait a while, to give it chance to start playing sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: // stop it sl@0: error = iController.Stop(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : stop returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // wait a while, to give it chance to stop sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: sl@0: // now try and stop it a second time - should return KErrNone sl@0: // (this is defined in Audio Controller) sl@0: error = iController.Stop(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : stop returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Stop returned KErrNone")); sl@0: sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0526 sl@0: // sl@0: // Stop a controller where there is no defined source sl@0: // sl@0: // REQ172.5.5.7 sl@0: sl@0: RTestMmfCtlfrmI0526* RTestMmfCtlfrmI0526::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0526* self = new(ELeave) RTestMmfCtlfrmI0526; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0526::RTestMmfCtlfrmI0526() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0526"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0526::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("stop a controller with no defined source")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is setup in the preamble, but has no source sl@0: // try to stop it sl@0: error = iController.Stop(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : stop returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Stop returned KErrNone")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0527 sl@0: // sl@0: // Pause a controller which is stopped sl@0: // sl@0: // REQ172.5.5.8 sl@0: sl@0: RTestMmfCtlfrmI0527* RTestMmfCtlfrmI0527::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0527* self = new(ELeave) RTestMmfCtlfrmI0527; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0527::RTestMmfCtlfrmI0527() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0527"); sl@0: } sl@0: sl@0: sl@0: TVerdict RTestMmfCtlfrmI0527::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("pause a controller which is stopped")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // play it, stop, try and pause sl@0: error = iController.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: // wait a while, to give it chance to start playing sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: // stop it sl@0: error = iController.Stop(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : stop returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: // wait a while, to give it chance to stop sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: sl@0: // now try and pause. this should return KErrNotReady sl@0: error = iController.Pause(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : pause returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Pause returned KErrNotReady")); sl@0: sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0531 sl@0: // sl@0: // Assign a priority to a controller where it is the only controller loaded sl@0: // sl@0: // REQ172.5.5.9 sl@0: sl@0: RTestMmfCtlfrmI0531* RTestMmfCtlfrmI0531::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0531* self = new(ELeave) RTestMmfCtlfrmI0531; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0531::RTestMmfCtlfrmI0531() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0531"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0531::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Assign priority to lone controller")); sl@0: TInt error = KErrNone; sl@0: sl@0: // this will succeed - priorities are relative, not absolute sl@0: iSettings.iPriority = ETSIMmfPriorityLow; sl@0: iSettings.iPref = EMdaPriorityPreferenceTime; sl@0: iSettings.iState = EMMFStateIdle; sl@0: sl@0: // NB controller should be Stopped (not Primed) to do this) sl@0: error = iController.SetPrioritySettings(iSettings); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : SetPrioritySettings returned %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("SetPrioritySettings succeeded")); sl@0: sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0532 sl@0: // sl@0: // Assign identical or conflicting priorities to two controllers sl@0: // sl@0: // REQ172.5.5.9 sl@0: sl@0: RTestMmfCtlfrmI0532* RTestMmfCtlfrmI0532::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0532* self = new(ELeave) RTestMmfCtlfrmI0532; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0532::RTestMmfCtlfrmI0532() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0532"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0532::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Assign identical priority to two controllers")); sl@0: TInt error = KErrNone; sl@0: sl@0: // NB : the preamble for this class sets the controllers with identical settings sl@0: // including priority sl@0: sl@0: // prime them sl@0: error = iController1.Prime(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("controller1 prime failed, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: error = iController2.Prime(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("controller2 prime failed, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // at last we are ready to do the test... sl@0: // play both controllers. give the first time to start before playing the second. sl@0: // we should get an error. sl@0: error = iController1.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("iController1 play failed, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: // wait a while, to give it chance to play sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), KPlayPosition32.Int()); sl@0: User::After(KPlayPosition32); sl@0: error = iController2.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("iController2 play failed, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // search for a KErrInUse event from the MMF controller framework on controller 2 sl@0: TMMFEvent inUseEvent( KMMFEventCategoryPlaybackComplete, KErrInUse ); sl@0: TVerdict result; sl@0: result = SearchForEvent( inUseEvent, 2 ); sl@0: if( result == EFail ) sl@0: { sl@0: ERR_PRINTF1(_L("MMF controller framework did not return a KErrInUse event")); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: ERR_PRINTF1(_L("MMF controller framework returned a KErrInUse event")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0541 sl@0: // sl@0: // Get position of a source where there is no defined source sl@0: // sl@0: // REQ172.5.5.10 sl@0: sl@0: RTestMmfCtlfrmI0541* RTestMmfCtlfrmI0541::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0541* self = new(ELeave) RTestMmfCtlfrmI0541; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0541::RTestMmfCtlfrmI0541() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0541"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0541::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Get position of undefined source")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is setup in the preamble, but has no source sl@0: // try to get a clip position sl@0: TTimeIntervalMicroSeconds clipPos; sl@0: error = iController.GetPosition(clipPos); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : GetPosition returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("GetPosition returned KErrNotReady")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0542 sl@0: // sl@0: // Set position of a source to beyond the end of the data sl@0: // sl@0: // REQ172.5.5.11 sl@0: sl@0: RTestMmfCtlfrmI0542* RTestMmfCtlfrmI0542::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0542* self = new(ELeave) RTestMmfCtlfrmI0542; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0542::RTestMmfCtlfrmI0542() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0542"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0542::DoTestStepL() sl@0: { sl@0: // NB this test has changed sl@0: // originally we expected the position to set to the end of the clip. sl@0: // the Audio Controller is now in fact returning KErrArgument sl@0: INFO_PRINTF1(_L("Set position to beyond end of source data")); sl@0: TInt error = KErrNone; sl@0: sl@0: // we know our clip is 5.33 sec :- set to way past the end sl@0: const TTimeIntervalMicroSeconds KPastEndPosition(20000000); // 20 sec sl@0: const TTimeIntervalMicroSeconds KPlayPosition(5330000); sl@0: // NB allow for resolution of the controller itself sl@0: const TTimeIntervalMicroSeconds KPlayPositionPlusError(5830000); sl@0: const TTimeIntervalMicroSeconds KPlayPositionMinusError(4830000); // allow +/-0.5 sec sl@0: error = iController.SetPosition(KPastEndPosition); sl@0: if(error != KErrArgument) sl@0: { sl@0: ERR_PRINTF3(_L("SetPosition returned error %d (expected %d)"), error, KErrArgument); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("SetPosition returned KErrArgument")); sl@0: // now set it to the actual end of the clip, and try again sl@0: error = iController.SetPosition(KPlayPosition); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF3(_L("SetPosition returned error %d (expected %d)"), error, KErrNone); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: TTimeIntervalMicroSeconds clipPos; sl@0: error = iController.GetPosition(clipPos); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : GetPosition failed, error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: INFO_PRINTF3(_L("Clip position : %ld Expected : %ld"), I64LOW(clipPos.Int64()), I64LOW(KPlayPosition.Int64())); sl@0: if( (clipPos < (KPlayPositionMinusError)) || (clipPos > (KPlayPositionPlusError)) ) sl@0: { sl@0: ERR_PRINTF1(_L("Error : clip position not set correctly")); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: // EPass if we got here sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0551 sl@0: // sl@0: // Close a controller when source is still playing sl@0: // sl@0: // REQ172.5.5.12 sl@0: sl@0: RTestMmfCtlfrmI0551* RTestMmfCtlfrmI0551::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0551* self = new(ELeave) RTestMmfCtlfrmI0551; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0551::RTestMmfCtlfrmI0551() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0551"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0551::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Close controller while still playing")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // play it, then close sl@0: error = iController.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // wait a while, to give it chance to start playing sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), I64LOW(KPlayPosition32.Int())); sl@0: User::After(KPlayPosition32); sl@0: sl@0: iController.Close(); sl@0: sl@0: // Close() returns void - so instead demonstrate that the controller sl@0: // has been closed - Reset will return KErrNotReady on a closed controller; sl@0: // on an open controller it will succeed in any state. sl@0: sl@0: error = iController.Reset(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : reset returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Reset returned KErrNotReady; close succeeded")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0552 sl@0: // sl@0: // Reset a controller when source is still playing sl@0: // sl@0: // REQ172.5.5.12 sl@0: sl@0: RTestMmfCtlfrmI0552* RTestMmfCtlfrmI0552::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0552* self = new(ELeave) RTestMmfCtlfrmI0552; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0552::RTestMmfCtlfrmI0552() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0552"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0552::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Reset controller while still playing")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // play it, then reset sl@0: error = iController.Play(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : play returned error %d"), error); sl@0: return iTestStepResult = EInconclusive; sl@0: } sl@0: sl@0: // wait a while, to give it chance to start playing sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), I64LOW(KPlayPosition32.Int())); sl@0: User::After(KPlayPosition32); sl@0: sl@0: error = iController.Reset(); sl@0: if(error) sl@0: { sl@0: ERR_PRINTF2(_L("Error : Reset failed, error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Reset succeeded")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0553 sl@0: // sl@0: // Close an already closed controller sl@0: // sl@0: // REQ172.5.5.12 sl@0: sl@0: RTestMmfCtlfrmI0553* RTestMmfCtlfrmI0553::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0553* self = new(ELeave) RTestMmfCtlfrmI0553; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0553::RTestMmfCtlfrmI0553() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0553"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0553::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Close an already closed controller")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // close it, check that code on reset is KErrNotReady, sl@0: // then close it again sl@0: sl@0: iController.Close(); sl@0: error = iController.Reset(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : reset returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: INFO_PRINTF1(_L("Reset (1) returned KErrNotReady; close succeeded")); sl@0: sl@0: // if the second close caused problems, we will leave or get an error from Reset sl@0: iController.Close(); sl@0: error = iController.Reset(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: ERR_PRINTF2(_L("Error : reset returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Reset (2) returned KErrNotReady; close succeeded")); sl@0: sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // --------------------------- sl@0: // RTestMmfCtlfrmI0554 sl@0: // sl@0: // Reset an already closed controller sl@0: // sl@0: // REQ172.5.5.12 sl@0: sl@0: RTestMmfCtlfrmI0554* RTestMmfCtlfrmI0554::NewL() sl@0: { sl@0: RTestMmfCtlfrmI0554* self = new(ELeave) RTestMmfCtlfrmI0554; sl@0: return self; sl@0: } sl@0: sl@0: RTestMmfCtlfrmI0554::RTestMmfCtlfrmI0554() sl@0: { sl@0: iTestStepName = _L("MM-MMF-CTLFRM-I-0554"); sl@0: } sl@0: sl@0: TVerdict RTestMmfCtlfrmI0554::DoTestStepL() sl@0: { sl@0: INFO_PRINTF1(_L("Reset an already closed controller")); sl@0: TInt error = KErrNone; sl@0: sl@0: // controller is fully setup in the preamble, and primed sl@0: // close it, then attempt a reset sl@0: sl@0: iController.Close(); sl@0: // Close() returns void sl@0: // wait a while, to give it a chance to complete sl@0: const TTimeIntervalMicroSeconds32 KPlayPosition32 = 500000L; sl@0: INFO_PRINTF2(_L("Waiting %d mcs..."), I64LOW(KPlayPosition32.Int())); sl@0: User::After(KPlayPosition32); sl@0: sl@0: error = iController.Reset(); sl@0: if(error != KErrNotReady) sl@0: { sl@0: // this will fail if the controller hasn't been closed sl@0: ERR_PRINTF2(_L("Error : reset returned error %d"), error); sl@0: return iTestStepResult = EFail; sl@0: } sl@0: sl@0: INFO_PRINTF1(_L("Reset returned KErrNotReady")); sl@0: return iTestStepResult = EPass; sl@0: } sl@0: