os/mm/mmhais/dvbhunittest/hai/dvbh/src/dvbhhaiasynctest.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @internalComponent
sl@0
    19
 @prototype
sl@0
    20
*/
sl@0
    21
sl@0
    22
#include "dvbhhaiasynctest.h"
sl@0
    23
#include <mobiletv/hai/dvbh/dvbhtypes.h>
sl@0
    24
sl@0
    25
/**
sl@0
    26
* RDvbhHaiAsyncTest 
sl@0
    27
*	DVB-H HAI Asynchronous Unit Tests on stub implementations
sl@0
    28
*/
sl@0
    29
sl@0
    30
		
sl@0
    31
RDvbhHaiAsyncTest* RDvbhHaiAsyncTest::NewL(TBool aRequireReceiverInfo, const TDesC& aTestName)
sl@0
    32
	{
sl@0
    33
	RDvbhHaiAsyncTest* self = new (ELeave) RDvbhHaiAsyncTest(aRequireReceiverInfo, aTestName);
sl@0
    34
	return self;	
sl@0
    35
	}
sl@0
    36
	
sl@0
    37
RDvbhHaiAsyncTest::RDvbhHaiAsyncTest(TBool aRequireReceiverInfo, const TDesC& aTestName)
sl@0
    38
: RAsyncTestStep(), iExpectedNetworkTime(TDateTime(2007, EJuly, 30, 16, 35, 22, 18)),
sl@0
    39
  iInitialNetworkTime(TDateTime(1997, EMay, 10, 10, 00, 34, 02)), iInitialPlatform(),
sl@0
    40
  iExpectedPlatform(), iPreTestRun(EFalse), iRequireReceiverInfo(aRequireReceiverInfo),
sl@0
    41
  iRxInfo(NULL), i2ndRxInfo(NULL), iTestUtils(NULL), i2ndStateObserver(NULL)
sl@0
    42
	{
sl@0
    43
	iStateCallbackVerdicts[E1stStateObserver] = KNoVerdict;
sl@0
    44
	iStateCallbackVerdicts[E2ndStateObserver] = KNoVerdict;
sl@0
    45
	iTestStepName.Copy(aTestName);
sl@0
    46
	SetupParameterData();
sl@0
    47
	}
sl@0
    48
sl@0
    49
void RDvbhHaiAsyncTest::SetupParameterData()
sl@0
    50
	{
sl@0
    51
	iInitialPlatform.iPlatform.iId = KInitialPlatformId;
sl@0
    52
	iInitialPlatform.iPlatform.iName = KInitialPlatformName;
sl@0
    53
	iInitialPlatform.iEsgRoot = KInet6AddrLinkLocal;
sl@0
    54
	
sl@0
    55
	iExpectedPlatform.iPlatform.iId = KExpectedPlatformId;
sl@0
    56
	iExpectedPlatform.iPlatform.iName = KExpectedPlatformName;	
sl@0
    57
	iExpectedPlatform.iEsgRoot = KDvbhTestIpV6Addr;
sl@0
    58
	}
sl@0
    59
	
sl@0
    60
void RDvbhHaiAsyncTest::InfoPrintf3(const TDesC16& aString, TInt aInt1, TInt aInt2)
sl@0
    61
	{
sl@0
    62
	INFO_PRINTF3(aString, aInt1, aInt2);
sl@0
    63
	}
sl@0
    64
sl@0
    65
void RDvbhHaiAsyncTest::InfoPrintf4(const TDesC16& aString, TInt aInt1, TInt aInt2, TInt aInt3)
sl@0
    66
	{
sl@0
    67
	INFO_PRINTF4(aString, aInt1, aInt2, aInt3);
sl@0
    68
	}
sl@0
    69
	
sl@0
    70
/**
sl@0
    71
* Allocs objects, defines properties, etc. as needed for each test step.
sl@0
    72
* Takes the role of the Preamble in synchornous tests.  It is called once
sl@0
    73
* when a test step is first kicked off.
sl@0
    74
*/
sl@0
    75
TVerdict RDvbhHaiAsyncTest::DoPreTest()
sl@0
    76
	{
sl@0
    77
	TRAPD(result, iTestUtils = CDvbhTestUtil::NewL(*this));
sl@0
    78
	if (result != KErrNone)
sl@0
    79
		{
sl@0
    80
		INFO_PRINTF2(_L("Error %d creating CDvbhTestUtil"), result);
sl@0
    81
		return EInconclusive;		
sl@0
    82
		}
sl@0
    83
	
sl@0
    84
	if (iRequireReceiverInfo)
sl@0
    85
		{
sl@0
    86
		TRAP(result, iRxInfo = CDvbhReceiverInfo::NewL())
sl@0
    87
		if (result != KErrNone)
sl@0
    88
			{
sl@0
    89
			INFO_PRINTF2(_L("Error %d creating CDvbhReceiverInfo"), result);
sl@0
    90
			return EInconclusive;
sl@0
    91
			}
sl@0
    92
		}
sl@0
    93
		
sl@0
    94
	if (iTestStepName.Compare(_L("MM-TV-DVBH-U-111")) == 0)		
sl@0
    95
		{
sl@0
    96
		result = iTestUtils->DefineDvbhStateProperty(KInitialState);		
sl@0
    97
		}
sl@0
    98
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-112")) == 0)		
sl@0
    99
		{
sl@0
   100
		 // Receiver state must be EDvbhStateReceiving before we can do this test.
sl@0
   101
		result = iTestUtils->DefineDvbhStateProperty(EDvbhStateReceiving);
sl@0
   102
		if (result == KErrNone)
sl@0
   103
			{
sl@0
   104
			result = iTestUtils->DefineDvbhIntegerProperty(EDvbhPropertyKeySignalQuality, KInitialSignalQuality);			
sl@0
   105
			}				
sl@0
   106
		}
sl@0
   107
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-113")) == 0)		
sl@0
   108
		{
sl@0
   109
		 // Receiver state must be EDvbhStateReady or EDvbhStateReceiving before we can do this test.
sl@0
   110
		result = iTestUtils->DefineDvbhStateProperty(EDvbhStateReady);
sl@0
   111
		if (result == KErrNone)
sl@0
   112
			{
sl@0
   113
			TPckg<TDvbhPlatformProperty> initialPlatformPckg(iInitialPlatform);
sl@0
   114
			result = iTestUtils->DefineDvbhProperty(EDvbhPropertyKeyPlatform, CDvbhTestUtil::GetType(EDvbhPropertyKeyPlatform), initialPlatformPckg);			
sl@0
   115
			}		
sl@0
   116
		}
sl@0
   117
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-114")) == 0)		
sl@0
   118
		{
sl@0
   119
		 // Receiver state must be EDvbhStateReady or EDvbhStateReceiving before we can do this test.
sl@0
   120
		result = iTestUtils->DefineDvbhStateProperty(EDvbhStateReady);
sl@0
   121
		if (result == KErrNone)
sl@0
   122
			{
sl@0
   123
			TPckg<TTime> initialTimePckg(iInitialNetworkTime);
sl@0
   124
			result = iTestUtils->DefineDvbhProperty(EDvbhPropertyKeyNetworkTime, CDvbhTestUtil::GetType(EDvbhPropertyKeyNetworkTime), initialTimePckg);			
sl@0
   125
			}		
sl@0
   126
		}
sl@0
   127
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-115")) == 0)		
sl@0
   128
		{
sl@0
   129
		 // Receiver state must be EDvbhStateReady or EDvbhStateReceiving before we can do this test.
sl@0
   130
		result = iTestUtils->DefineDvbhStateProperty(EDvbhStateReady);
sl@0
   131
		if (result == KErrNone)
sl@0
   132
			{
sl@0
   133
			result = iTestUtils->DefineDvbhIntegerProperty(EDvbhPropertyKeyFrequency, KInitialFrequency);			
sl@0
   134
			}		
sl@0
   135
		}
sl@0
   136
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-116")) == 0)		
sl@0
   137
		{
sl@0
   138
		 // Receiver state must be EDvbhStateReady or EDvbhStateReceiving before we can do this test.
sl@0
   139
		result = iTestUtils->DefineDvbhStateProperty(EDvbhStateReady);
sl@0
   140
		if (result == KErrNone)
sl@0
   141
			{
sl@0
   142
			result = iTestUtils->DefineDvbhIntegerProperty(EDvbhPropertyKeyCellId, KInitialCellId);			
sl@0
   143
			}		
sl@0
   144
		}
sl@0
   145
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-117")) == 0)		
sl@0
   146
		{
sl@0
   147
		 // Receiver state must be EDvbhStateReady or EDvbhStateReceiving before we can do this test.
sl@0
   148
		result = iTestUtils->DefineDvbhStateProperty(EDvbhStateReady);
sl@0
   149
		if (result == KErrNone)
sl@0
   150
			{
sl@0
   151
			result = iTestUtils->DefineDvbhIntegerProperty(EDvbhPropertyKeyNetworkId, KInitialNetworkId);			
sl@0
   152
			}		
sl@0
   153
		}
sl@0
   154
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-125")) == 0)		
sl@0
   155
		{
sl@0
   156
		result = iTestUtils->DefineDvbhStateProperty(KInitialState);
sl@0
   157
		if (result == KErrNone)
sl@0
   158
			{
sl@0
   159
			TRAP(result, i2ndStateObserver = CAlternativeStateObserver::NewL(*this));		
sl@0
   160
			}
sl@0
   161
		}
sl@0
   162
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-126")) == 0)		
sl@0
   163
		{
sl@0
   164
		TRAP(result, i2ndStateObserver = CAlternativeStateObserver::NewL(*this));		
sl@0
   165
		}
sl@0
   166
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-127")) == 0)		
sl@0
   167
		{
sl@0
   168
		result = iTestUtils->DefineDvbhStateProperty(KInitialState);
sl@0
   169
		if (result == KErrNone)
sl@0
   170
			{
sl@0
   171
			TRAP(result, i2ndRxInfo = CDvbhReceiverInfo::NewL());
sl@0
   172
			if (result == KErrNone)
sl@0
   173
				{
sl@0
   174
				TRAP(result, i2ndStateObserver = CAlternativeStateObserver::NewL(*this));		
sl@0
   175
				}
sl@0
   176
			}
sl@0
   177
		}
sl@0
   178
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-128")) == 0)		
sl@0
   179
		{
sl@0
   180
		TRAP(result, i2ndRxInfo = CDvbhReceiverInfo::NewL());
sl@0
   181
		if (result == KErrNone)
sl@0
   182
			{
sl@0
   183
			TRAP(result, i2ndStateObserver = CAlternativeStateObserver::NewL(*this));		
sl@0
   184
			}
sl@0
   185
		}
sl@0
   186
	else if (iTestStepName.Compare(_L("MM-TV-DVBH-U-401")) == 0)		
sl@0
   187
		{
sl@0
   188
		result = iTestUtils->DefineAllDvbhProperties();		
sl@0
   189
		}
sl@0
   190
	
sl@0
   191
	iPreTestRun = ETrue;	
sl@0
   192
	return (result == KErrNone ? EPass : EInconclusive);				
sl@0
   193
	}
sl@0
   194
	
sl@0
   195
void RDvbhHaiAsyncTest::CloseTest()
sl@0
   196
	{
sl@0
   197
	delete iRxInfo;
sl@0
   198
	iRxInfo = NULL;
sl@0
   199
	delete i2ndStateObserver;
sl@0
   200
	i2ndStateObserver = NULL;
sl@0
   201
	delete i2ndRxInfo;
sl@0
   202
	i2ndRxInfo = NULL;
sl@0
   203
	
sl@0
   204
	TInt result = KErrNone;
sl@0
   205
sl@0
   206
	if (iTestStepName.Compare(_L("MM-TV-DVBH-U-111")) == 0)		
sl@0
   207
		{
sl@0
   208
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);		
sl@0
   209
		}
sl@0
   210
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-112")) == 0)		
sl@0
   211
		{
sl@0
   212
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   213
		TInt result2 = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeySignalQuality);	
sl@0
   214
		result = result2 != KErrNone ? result2 : result;		
sl@0
   215
		}
sl@0
   216
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-113")) == 0)		
sl@0
   217
		{
sl@0
   218
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   219
		TInt result2 = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyPlatform);
sl@0
   220
		result = result2 != KErrNone ? result2 : result;			
sl@0
   221
		}
sl@0
   222
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-114")) == 0)		
sl@0
   223
		{
sl@0
   224
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   225
		TInt result2 = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyNetworkTime);
sl@0
   226
		result = result2 != KErrNone ? result2 : result;			
sl@0
   227
		}
sl@0
   228
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-115")) == 0)		
sl@0
   229
		{
sl@0
   230
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   231
		TInt result2 = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyFrequency);	
sl@0
   232
		result = result2 != KErrNone ? result2 : result;		
sl@0
   233
		}
sl@0
   234
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-116")) == 0)		
sl@0
   235
		{
sl@0
   236
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   237
		TInt result2 = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyCellId);	
sl@0
   238
		result = result2 != KErrNone ? result2 : result;		
sl@0
   239
		}
sl@0
   240
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-117")) == 0)		
sl@0
   241
		{
sl@0
   242
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   243
		TInt result2 = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyNetworkId);
sl@0
   244
		result = result2 != KErrNone ? result2 : result;			
sl@0
   245
		}
sl@0
   246
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-125")) == 0)		
sl@0
   247
		{
sl@0
   248
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   249
		}
sl@0
   250
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-127")) == 0)		
sl@0
   251
		{
sl@0
   252
		result = iTestUtils->DeleteDvbhProperty(EDvbhPropertyKeyState);
sl@0
   253
		}	
sl@0
   254
	else if (iTestStepName.Compare(_L("MM-TV-DVBH-U-401")) == 0)		
sl@0
   255
		{
sl@0
   256
		result = iTestUtils->DeleteAllDvbhProperties();		
sl@0
   257
		}
sl@0
   258
sl@0
   259
	delete iTestUtils;
sl@0
   260
	iTestUtils = NULL;
sl@0
   261
sl@0
   262
	//Make sure we are not leaving anything laying around.  This is
sl@0
   263
	//to verify the integrity of the test code more than anything else.
sl@0
   264
	ASSERT(result == KErrNone);
sl@0
   265
	}
sl@0
   266
	
sl@0
   267
void RDvbhHaiAsyncTest::KickoffTestL()
sl@0
   268
	{
sl@0
   269
	//Run the pre-test set-up if it has not been run already
sl@0
   270
	if (!iPreTestRun)
sl@0
   271
		{
sl@0
   272
		TVerdict preTestResult = DoPreTest();
sl@0
   273
		if (preTestResult != EPass)
sl@0
   274
			{
sl@0
   275
			INFO_PRINTF2(_L("DoPreTest failed with error %d."), preTestResult);
sl@0
   276
			StopTest(preTestResult);
sl@0
   277
			return;
sl@0
   278
			}
sl@0
   279
		}
sl@0
   280
		
sl@0
   281
	if (iTestStepName.Compare(_L("MM-TV-DVBH-U-111")) == 0)		
sl@0
   282
		{
sl@0
   283
		DoSetStateObserverTestStep(ETrue);
sl@0
   284
		}
sl@0
   285
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-112")) == 0)		
sl@0
   286
		{
sl@0
   287
		DoSetSignalQualityObserverTestStep(ETrue);
sl@0
   288
		}
sl@0
   289
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-113")) == 0)		
sl@0
   290
		{
sl@0
   291
		DoSetPlatformObserverTestStep(ETrue);
sl@0
   292
		}
sl@0
   293
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-114")) == 0)		
sl@0
   294
		{
sl@0
   295
		DoSetNetworkTimeObserverTestStep(ETrue);
sl@0
   296
		}
sl@0
   297
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-115")) == 0)		
sl@0
   298
		{
sl@0
   299
		DoSetFrequencyObserverTestStep(ETrue);
sl@0
   300
		}
sl@0
   301
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-116")) == 0)		
sl@0
   302
		{
sl@0
   303
		DoSetCellIdObserverTestStep(ETrue);
sl@0
   304
		}
sl@0
   305
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-117")) == 0)		
sl@0
   306
		{
sl@0
   307
		DoSetNetworkIdObserverTestStep(ETrue);
sl@0
   308
		}
sl@0
   309
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-118")) == 0)		
sl@0
   310
		{
sl@0
   311
		DoSetStateObserverTestStep(EFalse);
sl@0
   312
		}
sl@0
   313
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-119")) == 0)		
sl@0
   314
		{
sl@0
   315
		DoSetSignalQualityObserverTestStep(EFalse);
sl@0
   316
		}
sl@0
   317
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-120")) == 0)		
sl@0
   318
		{
sl@0
   319
		DoSetPlatformObserverTestStep(EFalse);
sl@0
   320
		}
sl@0
   321
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-121")) == 0)		
sl@0
   322
		{
sl@0
   323
		DoSetNetworkTimeObserverTestStep(EFalse);
sl@0
   324
		}
sl@0
   325
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-122")) == 0)		
sl@0
   326
		{
sl@0
   327
		DoSetFrequencyObserverTestStep(EFalse);
sl@0
   328
		}
sl@0
   329
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-123")) == 0)		
sl@0
   330
		{
sl@0
   331
		DoSetCellIdObserverTestStep(EFalse);
sl@0
   332
		}
sl@0
   333
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-124")) == 0)		
sl@0
   334
		{
sl@0
   335
		DoSetNetworkIdObserverTestStep(EFalse);
sl@0
   336
		}
sl@0
   337
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-125")) == 0)		
sl@0
   338
		{
sl@0
   339
		DoSetMultipleStateObserversTestStep(ETrue);
sl@0
   340
		}
sl@0
   341
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-126")) == 0)		
sl@0
   342
		{
sl@0
   343
		DoSetMultipleStateObserversTestStep(EFalse);
sl@0
   344
		}
sl@0
   345
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-127")) == 0)		
sl@0
   346
		{
sl@0
   347
		DoCreateMultipleReceiverInfoTestStep(ETrue);
sl@0
   348
		}
sl@0
   349
	else if	(iTestStepName.Compare(_L("MM-TV-DVBH-U-128")) == 0)		
sl@0
   350
		{
sl@0
   351
		DoCreateMultipleReceiverInfoTestStep(EFalse);
sl@0
   352
		}
sl@0
   353
	else if (iTestStepName.Compare(_L("MM-TV-DVBH-U-401")) == 0)		
sl@0
   354
		{
sl@0
   355
		DoSetObserversNoMemory();		
sl@0
   356
		}
sl@0
   357
	else
sl@0
   358
		{
sl@0
   359
		StopTest(EInconclusive);
sl@0
   360
		}
sl@0
   361
	}
sl@0
   362
sl@0
   363
//
sl@0
   364
//
sl@0
   365
// CDvbhReceiverInfo Positive Async Tests
sl@0
   366
//
sl@0
   367
//
sl@0
   368
sl@0
   369
// 111 & 118
sl@0
   370
void RDvbhHaiAsyncTest::DoSetStateObserverTestStep(TBool aProperyExists)
sl@0
   371
	{
sl@0
   372
	TInt result = iRxInfo->SetStateObserver(*this);
sl@0
   373
	if (result != KErrNone)
sl@0
   374
		{
sl@0
   375
		INFO_PRINTF2(_L("SetStateObserver returned error %d."), result);
sl@0
   376
		StopTest(EFail);
sl@0
   377
		return;
sl@0
   378
		}
sl@0
   379
	
sl@0
   380
	if (aProperyExists)
sl@0
   381
		{
sl@0
   382
		//DoPreTest will have initialised the state to KInitialState.
sl@0
   383
		//Now change it to KExpectedState.
sl@0
   384
		if (iTestUtils->SetStateProperty(KExpectedState) != KErrNone)
sl@0
   385
			{
sl@0
   386
			StopTest(EInconclusive);
sl@0
   387
			return;		
sl@0
   388
			}		
sl@0
   389
		}
sl@0
   390
	else
sl@0
   391
		{
sl@0
   392
		StopTest(EPass);
sl@0
   393
		}
sl@0
   394
	}
sl@0
   395
	
sl@0
   396
//Called when the state property changes if this state observer has been registerd
sl@0
   397
void RDvbhHaiAsyncTest::DvbhStateChange( TDvbhState aNewState )
sl@0
   398
	{
sl@0
   399
	TVerdict verdict = EPass;
sl@0
   400
sl@0
   401
	// We have to make sure that this observer was not called for the wrong test.
sl@0
   402
	if ( iTestStepName.Compare(_L("MM-TV-DVBH-U-125")) == 0 ||
sl@0
   403
		 iTestStepName.Compare(_L("MM-TV-DVBH-U-126")) == 0 )		
sl@0
   404
		{
sl@0
   405
		INFO_PRINTF1(_L("RDvbhHaiAsyncTest::DvbhStateChange called for wrong test."));
sl@0
   406
		verdict = EFail;
sl@0
   407
		}
sl@0
   408
	else
sl@0
   409
		{
sl@0
   410
		if (aNewState != KExpectedState)
sl@0
   411
			{
sl@0
   412
			INFO_PRINTF2(_L("DvbhStateChange received unexpected value %d."), aNewState);
sl@0
   413
			verdict = EFail;
sl@0
   414
			}
sl@0
   415
		else
sl@0
   416
			{
sl@0
   417
			// Test case MM-TV-DVBH-U-127 is expecting two callbacks on two different observers
sl@0
   418
			if (iTestStepName.Compare(_L("MM-TV-DVBH-U-127")) == 0)
sl@0
   419
				{
sl@0
   420
				// Set the verdict for this observer
sl@0
   421
				iStateCallbackVerdicts[E1stStateObserver] = verdict;
sl@0
   422
				//Check if the 2nd observer has reported back yet. If not then we
sl@0
   423
				//do not want to stop the test yet.
sl@0
   424
				if (iStateCallbackVerdicts[E2ndStateObserver] == KNoVerdict)
sl@0
   425
					{
sl@0
   426
					return;
sl@0
   427
					}
sl@0
   428
				else
sl@0
   429
					{
sl@0
   430
					verdict = static_cast<TVerdict>(iStateCallbackVerdicts[E2ndStateObserver]);
sl@0
   431
					}
sl@0
   432
				}		
sl@0
   433
			}		
sl@0
   434
		}
sl@0
   435
		
sl@0
   436
	StopTest(verdict);
sl@0
   437
	}	
sl@0
   438
sl@0
   439
// 112 & 119
sl@0
   440
void RDvbhHaiAsyncTest::DoSetSignalQualityObserverTestStep(TBool aProperyExists)
sl@0
   441
	{
sl@0
   442
	TInt result = iRxInfo->SetSignalQualityObserver(*this);
sl@0
   443
	if (result != KErrNone)
sl@0
   444
		{
sl@0
   445
		INFO_PRINTF2(_L("SetSignalQualityObserver returned error %d."), result);
sl@0
   446
		StopTest(EFail);
sl@0
   447
		return;
sl@0
   448
		}
sl@0
   449
	
sl@0
   450
	if (aProperyExists)
sl@0
   451
		{
sl@0
   452
		//DoPreTest will have initialised the signal quality to KInitialSignalQuality.
sl@0
   453
		//Now change it to KExpectedSignalQuality.
sl@0
   454
		if (iTestUtils->SetIntegerProperty(EDvbhPropertyKeySignalQuality, KExpectedSignalQuality) != KErrNone)
sl@0
   455
			{
sl@0
   456
			StopTest(EInconclusive);
sl@0
   457
			return;		
sl@0
   458
			}		
sl@0
   459
		}
sl@0
   460
	else
sl@0
   461
		{
sl@0
   462
		StopTest(EPass);
sl@0
   463
		}
sl@0
   464
	}
sl@0
   465
sl@0
   466
//Called when the signal quality property changes this a signal quality observer has been registerd
sl@0
   467
void RDvbhHaiAsyncTest::DvbhSignalQualityChange( const TDvbhSignalQuality& aNewSignalQuality )
sl@0
   468
	{
sl@0
   469
	TVerdict verdict = EPass;
sl@0
   470
	if (aNewSignalQuality != KExpectedSignalQuality)
sl@0
   471
		{
sl@0
   472
		INFO_PRINTF2(_L("DvbhSignalQualityChange received unexpected value %d."), aNewSignalQuality);
sl@0
   473
		verdict = EFail;
sl@0
   474
		}
sl@0
   475
	StopTest(verdict);
sl@0
   476
	}
sl@0
   477
sl@0
   478
// 113 & 120
sl@0
   479
void RDvbhHaiAsyncTest::DoSetPlatformObserverTestStep(TBool aProperyExists)
sl@0
   480
	{
sl@0
   481
	TInt result = iRxInfo->SetPlatformObserver(*this);
sl@0
   482
	if (result != KErrNone)
sl@0
   483
		{
sl@0
   484
		INFO_PRINTF2(_L("SetPlatformObserver returned error %d."), result);
sl@0
   485
		StopTest(EFail);
sl@0
   486
		return;
sl@0
   487
		}
sl@0
   488
	
sl@0
   489
	if (aProperyExists)
sl@0
   490
		{
sl@0
   491
		//DoPreTest will have initialised the platform to iInitialPlatform.
sl@0
   492
		//Now change it to iExpectedPlatform.
sl@0
   493
		TPckg<TDvbhPlatformProperty> platformPckg(iExpectedPlatform);
sl@0
   494
		if (iTestUtils->SetByteArrayProperty(EDvbhPropertyKeyPlatform, platformPckg) != KErrNone)
sl@0
   495
			{
sl@0
   496
			StopTest(EInconclusive);
sl@0
   497
			return;		
sl@0
   498
			}		
sl@0
   499
		}
sl@0
   500
	else
sl@0
   501
		{
sl@0
   502
		StopTest(EPass);
sl@0
   503
		}
sl@0
   504
	}
sl@0
   505
sl@0
   506
//Called when the platform property changes if this platform observer has been registerd
sl@0
   507
void RDvbhHaiAsyncTest::DvbhPlatformChange( const TDvbhPlatform& aNewPlatform, const TIp6Addr& aESGRoot )
sl@0
   508
	{
sl@0
   509
	TVerdict verdict = EPass;
sl@0
   510
	if ( !CDvbhTestUtil::ComparePlatforms(aNewPlatform, iExpectedPlatform.iPlatform))
sl@0
   511
		{
sl@0
   512
		INFO_PRINTF1(_L("DvbhPlatformChangeDvbhPlatformChange received unexpected platform."));
sl@0
   513
		verdict = EFail;
sl@0
   514
		}
sl@0
   515
	if (!aESGRoot.IsEqual(iExpectedPlatform.iEsgRoot))
sl@0
   516
		{
sl@0
   517
		INFO_PRINTF1(_L("DvbhPlatformChangeDvbhPlatformChange received unexpected esgRoot."));
sl@0
   518
		verdict = EFail;		
sl@0
   519
		}
sl@0
   520
	StopTest(verdict);
sl@0
   521
	}
sl@0
   522
	
sl@0
   523
// 114 & 121
sl@0
   524
void RDvbhHaiAsyncTest::DoSetNetworkTimeObserverTestStep(TBool aProperyExists)
sl@0
   525
	{
sl@0
   526
	TInt result = iRxInfo->SetNetworkTimeObserver(*this);
sl@0
   527
	if (result != KErrNone)
sl@0
   528
		{
sl@0
   529
		INFO_PRINTF2(_L("SetNetworkTimeObserver returned error %d."), result);
sl@0
   530
		StopTest(EFail);
sl@0
   531
		return;
sl@0
   532
		}
sl@0
   533
	
sl@0
   534
	if (aProperyExists)
sl@0
   535
		{
sl@0
   536
		//DoPreTest will have initialised the NetworkTime to iInitialNetworkTime.
sl@0
   537
		//Now change it to KExpectedNetworkTime.
sl@0
   538
		TPckg<TTime> timePckg(iExpectedNetworkTime);	
sl@0
   539
		if (iTestUtils->SetByteArrayProperty(EDvbhPropertyKeyNetworkTime, timePckg) != KErrNone)
sl@0
   540
			{
sl@0
   541
			StopTest(EInconclusive);
sl@0
   542
			return;		
sl@0
   543
			}		
sl@0
   544
		}
sl@0
   545
	else
sl@0
   546
		{
sl@0
   547
		StopTest(EPass);
sl@0
   548
		}
sl@0
   549
	}
sl@0
   550
sl@0
   551
//Called when the network time property changes if this network time observer has been registerd
sl@0
   552
void RDvbhHaiAsyncTest::DvbhNetworkTimeUpdate()
sl@0
   553
	{
sl@0
   554
	// Since this method has no parameters, there are no variables for us to verify.
sl@0
   555
	// The fact that this method was called at all means that CDvbhReceiverInfo::SetNetworkTimeObserver()
sl@0
   556
	// worked correctly, and thus we can now stop the test as passed.
sl@0
   557
	StopTest(EPass);
sl@0
   558
	}
sl@0
   559
	
sl@0
   560
// 115 & 122
sl@0
   561
void RDvbhHaiAsyncTest::DoSetFrequencyObserverTestStep(TBool aProperyExists)
sl@0
   562
	{
sl@0
   563
	TInt result = iRxInfo->SetFrequencyObserver(*this);
sl@0
   564
	if (result != KErrNone)
sl@0
   565
		{
sl@0
   566
		INFO_PRINTF2(_L("SetFrequencyObserver returned error %d."), result);
sl@0
   567
		StopTest(EFail);
sl@0
   568
		return;
sl@0
   569
		}
sl@0
   570
	
sl@0
   571
	if (aProperyExists)
sl@0
   572
		{
sl@0
   573
		//DoPreTest will have initialised the frequency to KInitialFrequency.
sl@0
   574
		//Now change it to KExpectedFrequency.
sl@0
   575
		if (iTestUtils->SetIntegerProperty(EDvbhPropertyKeyFrequency, KExpectedFrequency) != KErrNone)
sl@0
   576
			{
sl@0
   577
			StopTest(EInconclusive);
sl@0
   578
			return;		
sl@0
   579
			}		
sl@0
   580
		}
sl@0
   581
	else
sl@0
   582
		{
sl@0
   583
		StopTest(EPass);
sl@0
   584
		}
sl@0
   585
	}
sl@0
   586
sl@0
   587
//Called when the frequency property changes if this frequency observer has been registerd
sl@0
   588
void RDvbhHaiAsyncTest::DvbhFrequencyChange( const TDvbhFrequency& aNewFrequency )
sl@0
   589
	{
sl@0
   590
	TVerdict verdict = EPass;
sl@0
   591
	if (aNewFrequency != KExpectedFrequency)
sl@0
   592
		{
sl@0
   593
		INFO_PRINTF2(_L("DvbhFrequencyChange received unexpected value %d."), aNewFrequency);
sl@0
   594
		verdict = EFail;
sl@0
   595
		}
sl@0
   596
	StopTest(verdict);
sl@0
   597
	}
sl@0
   598
	
sl@0
   599
// 116 & 123
sl@0
   600
void RDvbhHaiAsyncTest::DoSetCellIdObserverTestStep(TBool aProperyExists)
sl@0
   601
	{
sl@0
   602
	TInt result = iRxInfo->SetCellIdObserver(*this);
sl@0
   603
	if (result != KErrNone)
sl@0
   604
		{
sl@0
   605
		INFO_PRINTF2(_L("SetCellIdObserver returned error %d."), result);
sl@0
   606
		StopTest(EFail);
sl@0
   607
		return;
sl@0
   608
		}
sl@0
   609
sl@0
   610
	if (aProperyExists)
sl@0
   611
		{
sl@0
   612
		//DoPreTest will have initialised the CellId to KInitialCellId.
sl@0
   613
		//Now change it to KExpectedCellId.
sl@0
   614
		if (iTestUtils->SetIntegerProperty(EDvbhPropertyKeyCellId, KExpectedCellId) != KErrNone)
sl@0
   615
			{
sl@0
   616
			StopTest(EInconclusive);
sl@0
   617
			return;		
sl@0
   618
			}		
sl@0
   619
		}
sl@0
   620
	else
sl@0
   621
		{
sl@0
   622
		StopTest(EPass);
sl@0
   623
		}			
sl@0
   624
	}
sl@0
   625
sl@0
   626
//Called when the CellId property changes if this CellId observer has been registerd
sl@0
   627
void RDvbhHaiAsyncTest::DvbhCellIdChange( const TDvbhCellId& aNewCellId )
sl@0
   628
	{
sl@0
   629
	TVerdict verdict = EPass;
sl@0
   630
	if (aNewCellId != KExpectedCellId)
sl@0
   631
		{
sl@0
   632
		INFO_PRINTF2(_L("DvbhCellIdChange received unexpected value %d."), aNewCellId);
sl@0
   633
		verdict = EFail;
sl@0
   634
		}
sl@0
   635
	StopTest(verdict);
sl@0
   636
	}
sl@0
   637
	
sl@0
   638
// 117 & 124
sl@0
   639
void RDvbhHaiAsyncTest::DoSetNetworkIdObserverTestStep(TBool aProperyExists)
sl@0
   640
	{
sl@0
   641
	TInt result = iRxInfo->SetNetworkIdObserver(*this);
sl@0
   642
	if (result != KErrNone)
sl@0
   643
		{
sl@0
   644
		INFO_PRINTF2(_L("SetNetworkIdObserver returned error %d."), result);
sl@0
   645
		StopTest(EFail);
sl@0
   646
		return;
sl@0
   647
		}
sl@0
   648
sl@0
   649
	if (aProperyExists)
sl@0
   650
		{
sl@0
   651
		//DoPreTest will have initialised the NetworkId to KInitialNetworkId.
sl@0
   652
		//Now change it to KExpectedNetworkId.
sl@0
   653
		if (iTestUtils->SetIntegerProperty(EDvbhPropertyKeyNetworkId, KExpectedNetworkId) != KErrNone)
sl@0
   654
			{
sl@0
   655
			StopTest(EInconclusive);
sl@0
   656
			return;		
sl@0
   657
			}		
sl@0
   658
		}
sl@0
   659
	else
sl@0
   660
		{
sl@0
   661
		StopTest(EPass);
sl@0
   662
		}
sl@0
   663
	}
sl@0
   664
sl@0
   665
//Called when the NetworkId property changes if this NetworkId observer has been registerd
sl@0
   666
void RDvbhHaiAsyncTest::DvbhNetworkIdChange( const TDvbhNetworkId& aNewNetworkId )
sl@0
   667
	{
sl@0
   668
	TVerdict verdict = EPass;
sl@0
   669
	if (aNewNetworkId != KExpectedNetworkId)
sl@0
   670
		{
sl@0
   671
		INFO_PRINTF2(_L("DvbhNetworkIdChange received unexpected value %d."), aNewNetworkId);
sl@0
   672
		verdict = EFail;
sl@0
   673
		}
sl@0
   674
	StopTest(verdict);
sl@0
   675
	}
sl@0
   676
	
sl@0
   677
// 125 & 126
sl@0
   678
void RDvbhHaiAsyncTest::DoSetMultipleStateObserversTestStep(TBool aProperyExists)
sl@0
   679
	{
sl@0
   680
	// Set a state observer
sl@0
   681
	TInt result = iRxInfo->SetStateObserver(*this);
sl@0
   682
	if (result != KErrNone)
sl@0
   683
		{
sl@0
   684
		INFO_PRINTF2(_L("1st SetStateObserver returned error %d."), result);
sl@0
   685
		StopTest(EFail);
sl@0
   686
		return;
sl@0
   687
		}
sl@0
   688
sl@0
   689
	// Now try to set another one
sl@0
   690
	result = iRxInfo->SetStateObserver(*i2ndStateObserver);
sl@0
   691
	if (result != KErrNone)
sl@0
   692
		{
sl@0
   693
		INFO_PRINTF2(_L("2nd SetStateObserver returned error %d."), result);
sl@0
   694
		StopTest(EFail);
sl@0
   695
		return;
sl@0
   696
		}
sl@0
   697
			
sl@0
   698
	if (aProperyExists)
sl@0
   699
		{
sl@0
   700
		//DoPreTest will have initialised the state to KInitialState.
sl@0
   701
		//Now change it.
sl@0
   702
		if (iTestUtils->SetStateProperty(KExpectedState) != KErrNone)
sl@0
   703
			{
sl@0
   704
			StopTest(EInconclusive);
sl@0
   705
			return;		
sl@0
   706
			}		
sl@0
   707
		}
sl@0
   708
	else
sl@0
   709
		{
sl@0
   710
		StopTest(EPass);
sl@0
   711
		}
sl@0
   712
	}
sl@0
   713
sl@0
   714
 //127 & 128
sl@0
   715
void RDvbhHaiAsyncTest::DoCreateMultipleReceiverInfoTestStep(TBool aProperyExists)
sl@0
   716
	{
sl@0
   717
	// Set a state observer on the first CDvbhReceiverInfo object
sl@0
   718
	TInt result = iRxInfo->SetStateObserver(*this);
sl@0
   719
	if (result != KErrNone)
sl@0
   720
		{
sl@0
   721
		INFO_PRINTF2(_L("1st SetStateObserver returned error %d."), result);
sl@0
   722
		StopTest(EFail);
sl@0
   723
		return;
sl@0
   724
		}
sl@0
   725
sl@0
   726
	// Now try to set another one on the 2nd CDvbhReceiverInfo object 
sl@0
   727
	result = i2ndRxInfo->SetStateObserver(*i2ndStateObserver);
sl@0
   728
	if (result != KErrNone)
sl@0
   729
		{
sl@0
   730
		INFO_PRINTF2(_L("2nd SetStateObserver returned error %d."), result);
sl@0
   731
		StopTest(EFail);
sl@0
   732
		return;
sl@0
   733
		}
sl@0
   734
			
sl@0
   735
	if (aProperyExists)
sl@0
   736
		{
sl@0
   737
		iStateCallbackVerdicts[E1stStateObserver] = KNoVerdict;
sl@0
   738
		iStateCallbackVerdicts[E2ndStateObserver] = KNoVerdict;
sl@0
   739
		//DoPreTest will have initialised the state to KInitialState.
sl@0
   740
		//Now change it.
sl@0
   741
		if (iTestUtils->SetStateProperty(KExpectedState) != KErrNone)
sl@0
   742
			{
sl@0
   743
			StopTest(EInconclusive);
sl@0
   744
			return;		
sl@0
   745
			}		
sl@0
   746
		}
sl@0
   747
	else
sl@0
   748
		{
sl@0
   749
		StopTest(EPass);
sl@0
   750
		}	
sl@0
   751
	}
sl@0
   752
	
sl@0
   753
//
sl@0
   754
//
sl@0
   755
// RDvbhHaiAsyncTest::CAlternativeStateObserver
sl@0
   756
//
sl@0
   757
//
sl@0
   758
sl@0
   759
RDvbhHaiAsyncTest::CAlternativeStateObserver* RDvbhHaiAsyncTest::CAlternativeStateObserver::NewL(RDvbhHaiAsyncTest& aTestStep)
sl@0
   760
	{
sl@0
   761
	CAlternativeStateObserver* self = new (ELeave) CAlternativeStateObserver(aTestStep);
sl@0
   762
	return self;	
sl@0
   763
	}
sl@0
   764
sl@0
   765
RDvbhHaiAsyncTest::CAlternativeStateObserver::CAlternativeStateObserver(RDvbhHaiAsyncTest& aTestStep)
sl@0
   766
: iTestStep(aTestStep)
sl@0
   767
	{
sl@0
   768
	}
sl@0
   769
	
sl@0
   770
void RDvbhHaiAsyncTest::CAlternativeStateObserver::DvbhStateChange( TDvbhState aNewState )
sl@0
   771
	{
sl@0
   772
	TVerdict verdict = EPass;
sl@0
   773
	if (aNewState != KExpectedState)
sl@0
   774
		{
sl@0
   775
		iTestStep.INFO_PRINTF2(_L("CAlternativeStateObserver::DvbhStateChange received unexpected value %d."), aNewState);
sl@0
   776
		verdict = EFail;
sl@0
   777
		}
sl@0
   778
	else
sl@0
   779
		{
sl@0
   780
		// Test case MM-TV-DVBH-U-127 is expecting two callbacks on two different observers
sl@0
   781
		if (iTestStep.iTestStepName.Compare(_L("MM-TV-DVBH-U-127")) == 0)
sl@0
   782
			{
sl@0
   783
			// Set the verdict for this observer
sl@0
   784
			iTestStep.iStateCallbackVerdicts[E2ndStateObserver] = verdict;
sl@0
   785
			//Check if the 1st observer has reported back yet. If not then we
sl@0
   786
			//do not want to stop the test yet.
sl@0
   787
			if (iTestStep.iStateCallbackVerdicts[E1stStateObserver] == KNoVerdict)
sl@0
   788
				{
sl@0
   789
				return;
sl@0
   790
				}
sl@0
   791
			else
sl@0
   792
				{
sl@0
   793
				verdict = static_cast<TVerdict>(iTestStep.iStateCallbackVerdicts[E1stStateObserver]);
sl@0
   794
				}
sl@0
   795
			}		
sl@0
   796
		}
sl@0
   797
		
sl@0
   798
	iTestStep.StopTest(verdict);
sl@0
   799
	}
sl@0
   800
	
sl@0
   801
sl@0
   802
//401
sl@0
   803
/**
sl@0
   804
* Test to improve conditional code coverage.  Tests KErrNoMemory failures
sl@0
   805
* with SetObserver methods.
sl@0
   806
*/
sl@0
   807
void RDvbhHaiAsyncTest::DoSetObserversNoMemory()
sl@0
   808
	{
sl@0
   809
	//SetStateObserver
sl@0
   810
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   811
	TInt result = iRxInfo->SetStateObserver(*this);
sl@0
   812
	if (result != KErrNoMemory)
sl@0
   813
		{
sl@0
   814
		INFO_PRINTF2(_L("SetStateObserver returned %d."), result);
sl@0
   815
		StopTest(EInconclusive);
sl@0
   816
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   817
		return;
sl@0
   818
		}
sl@0
   819
		
sl@0
   820
	//SetSignalQualityObserver
sl@0
   821
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   822
	result = iRxInfo->SetSignalQualityObserver(*this);
sl@0
   823
	if (result != KErrNoMemory)
sl@0
   824
		{
sl@0
   825
		INFO_PRINTF2(_L("SetSignalQualityObserver returned %d."), result);
sl@0
   826
		StopTest(EInconclusive);
sl@0
   827
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   828
		return;
sl@0
   829
		}
sl@0
   830
		
sl@0
   831
	//SetPlatformObserver
sl@0
   832
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   833
	result = iRxInfo->SetPlatformObserver(*this);
sl@0
   834
	if (result != KErrNoMemory)
sl@0
   835
		{
sl@0
   836
		INFO_PRINTF2(_L("SetPlatformObserver returned %d."), result);
sl@0
   837
		StopTest(EInconclusive);
sl@0
   838
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   839
		return;
sl@0
   840
		}
sl@0
   841
		
sl@0
   842
	//SetNetworkTimeObserver
sl@0
   843
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   844
	result = iRxInfo->SetNetworkTimeObserver(*this);
sl@0
   845
	if (result != KErrNoMemory)
sl@0
   846
		{
sl@0
   847
		INFO_PRINTF2(_L("SetNetworkTimeObserver returned %d."), result);
sl@0
   848
		StopTest(EInconclusive);
sl@0
   849
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   850
		return;
sl@0
   851
		}
sl@0
   852
		
sl@0
   853
	//SetFrequencyObserver
sl@0
   854
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   855
	result = iRxInfo->SetFrequencyObserver(*this);
sl@0
   856
	if (result != KErrNoMemory)
sl@0
   857
		{
sl@0
   858
		INFO_PRINTF2(_L("SetFrequencyObserver returned %d."), result);
sl@0
   859
		StopTest(EInconclusive);
sl@0
   860
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   861
		return;
sl@0
   862
		}
sl@0
   863
		
sl@0
   864
	//SetCellIdObserver
sl@0
   865
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   866
	result = iRxInfo->SetCellIdObserver(*this);
sl@0
   867
	if (result != KErrNoMemory)
sl@0
   868
		{
sl@0
   869
		INFO_PRINTF2(_L("SetCellIdObserver returned %d."), result);
sl@0
   870
		StopTest(EInconclusive);
sl@0
   871
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   872
		return;
sl@0
   873
		}
sl@0
   874
		
sl@0
   875
	//SetNetworkIdObserver
sl@0
   876
	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
sl@0
   877
	result = iRxInfo->SetNetworkIdObserver(*this);
sl@0
   878
	if (result != KErrNoMemory)
sl@0
   879
		{
sl@0
   880
		INFO_PRINTF2(_L("SetNetworkIdObserver returned %d."), result);
sl@0
   881
		StopTest(EInconclusive);
sl@0
   882
		__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   883
		return;
sl@0
   884
		}
sl@0
   885
		
sl@0
   886
	__UHEAP_SETFAIL(RHeap::ENone, 0);
sl@0
   887
	StopTest(EPass);
sl@0
   888
	}
sl@0
   889
sl@0
   890
sl@0
   891
sl@0
   892
sl@0
   893
sl@0
   894
sl@0
   895