lbstest/lbstestproduct/lbsclient/src/ctlbsclientsteplastknownposarea.cpp
branchRCL_3
changeset 52 29dbbeac905d
parent 0 9cfd9a3ee49c
child 54 0c2046328c85
--- a/lbstest/lbstestproduct/lbsclient/src/ctlbsclientsteplastknownposarea.cpp	Wed Jun 09 11:13:47 2010 +0300
+++ b/lbstest/lbstestproduct/lbsclient/src/ctlbsclientsteplastknownposarea.cpp	Thu Aug 19 11:17:26 2010 +0300
@@ -132,8 +132,24 @@
 					TRequestStatus emptyStatus;
 					iServer.EmptyLastKnownPositionStore(emptyStatus);
 					User::WaitForRequest(emptyStatus);
+
+					TPositionInfo posInfo2;
+					TPositionAreaExtendedInfo matchLevel;
+					TPositionAreaExtendedInfo expectedMatchLevel;
+
 					TPositionInfo* posInfo = new(ELeave) TPositionInfo();
 					posInfoArr.Append(posInfo);
+
+					// Check that last known position is completed correctly with no known area and nothing in cache.
+					err = DoLastKnownPosAreaL(posInfo2, matchLevel);
+
+					// no position and database returns KErrUnknown in these circumstances.
+					if ( KErrUnknown != err)
+						{
+						ERR_PRINTF2(_L("Expected KErrUnknown, incorrect err %d returned"), err);
+						SetTestStepResult(EFail);
+						}
+
 					//1. Move to cell 234.15.1911.36464
 					err = RProperty::Set(KUidPSSimTsyCategory, KPSSimTsyTimersReduceTime, KReduceSimTsyTimers);
 					User::After(KSimTsyTransitionDelay);
@@ -145,8 +161,6 @@
 						SetTestStepResult(EFail);
 						}
 					//3. LastKnown Pos Area
-					TPositionInfo posInfo2;
-					TPositionAreaExtendedInfo matchLevel, expectedMatchLevel;
 					err = DoLastKnownPosAreaL(posInfo2, matchLevel);
 					if (KErrNone != err)
 						{