lbstest/lbstestproduct/lbsclient/src/ctlbsclientsteplastknownposarea.cpp
branchRCL_3
changeset 55 c92d4f3c47c5
parent 54 0c2046328c85
child 58 87622fad6b51
--- a/lbstest/lbstestproduct/lbsclient/src/ctlbsclientsteplastknownposarea.cpp	Tue Aug 31 16:38:06 2010 +0300
+++ b/lbstest/lbstestproduct/lbsclient/src/ctlbsclientsteplastknownposarea.cpp	Wed Sep 01 12:35:25 2010 +0100
@@ -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)
 						{