diff -r 345b1ca54e88 -r 039a3e647356 kerneltest/e32test/power/t_domain.cpp --- a/kerneltest/e32test/power/t_domain.cpp Wed Sep 15 13:42:27 2010 +0300 +++ b/kerneltest/e32test/power/t_domain.cpp Wed Oct 13 16:04:24 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -806,9 +806,7 @@ void Perform(); void Release(); TInt TransitionNotification(MDmDomainMember& aDomainMember); - void TransitionRequestComplete(); - void RunTestOnGetTransitionFailures(RArray& aTransitionFailure); - + void TransitionRequestComplete(); CDmTest5(TDmDomainId aPowerId, TDmDomainId aTestId, TDmDomainState aPowerState, TDmDomainState aTestState) : CActive(CActive::EPriorityStandard), iPowerDomainId(aPowerId), iTestDomainId(aTestId), iPowerState(aPowerState), iTestState(aTestState) {} @@ -848,28 +846,7 @@ TInt iTransitionsExpected; }; -void CDmTest5::RunTestOnGetTransitionFailures(RArray& aTransitionFailure) - { - //************************************************* - // Test - OOM Testing on GetTransitionFailures() - // Simulates heap failure in GetTransitionFailures() - //************************************************* - TInt error = 0; - TInt count = 0; - do - { - __UHEAP_SETFAIL(RHeap::EFailNext, ++count); - error = iTestDomainManager.GetTransitionFailures(aTransitionFailure); - test.Printf( _L( "CDmTest5::RunTestOnGetTransitionFailures, simulating heap failure on GetTransitionFailures(), Error=%d, Run=%d\n" ), error, count ); - }while(error == KErrNoMemory); - - __UHEAP_RESET; - - //Actual count of heap failure as the final iteration which terminates the loop would not return KErrNoMemory - --count; - test(count > 0); - test.Printf( _L( "Out of memory tests on GetTransitionFailures() succeeded at heap failure rate of %i\n" ), count ); - } + //! @SYMTestCaseID PBASE-T_DOMAIN-5 //! @SYMTestType CT @@ -1129,18 +1106,6 @@ testFailureCount = iTestDomainManager.GetTransitionFailureCount(); test (testFailureCount == 1); -#ifdef _DEBUG - //*************************************************************** - // OOM Testing: Simulates heap failure in GetTransitionFailures() - //*************************************************************** - __UHEAP_MARK; - RArray oomTestFailures; - RunTestOnGetTransitionFailures(oomTestFailures); - test(oomTestFailures.Count()==1); - oomTestFailures.Close(); - __UHEAP_MARKEND; -#endif - r = iTestDomainManager.GetTransitionFailures(testFailures); test(r == KErrNone); test(testFailureCount == testFailures.Count()); @@ -2246,6 +2211,7 @@ { MDmTest* tests[] = { + new CDmTest1(KDmIdRoot, EPwStandby), new CDmTest1(KDmIdRoot, EPwOff), new CDmTest1(KDmIdRoot, EPwActive),