phonebookengines/contactsmodel/tsrc/t_viewsoom.cpp
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // under the terms of "Eclipse Public License v1.0"
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 //
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
    15 
    18 
    16 #include <e32std.h>
    19 #include <e32std.h>
    17 #include <e32test.h>
    20 #include <e32test.h>
    18 #include <collate.h>
    21 #include <collate.h>
    19 #include <cntdb.h>
    22 #include <cntdb.h>
    20 #include <cntitem.h>
    23 #include <cntitem.h>
    21 #include <cntfldst.h>
    24 #include <cntfldst.h>
    22 #include "t_utils2.h"
    25 #include "t_utils2.h"
    23 #include "T_UTILS.H"
    26 #include "t_utils.h"
    24 #include "t_viewsoom.h"
    27 #include "t_viewsoom.h"
    25 #include <badesca.h>
    28 #include <badesca.h>
    26 #include "CContactDbEventQueue.h"
    29 #include "ccontactdbeventqueue.h"
    27 
    30 
    28 _LIT(KTestName,"T_ViewsOOM");
    31 _LIT(KTestName,"T_ViewsOOM");
    29 LOCAL_D RFs TheFs;
    32 LOCAL_D RFs TheFs;
    30 //
    33 //
    31 // Constants.
    34 // Constants.
   789 		aView.ContactAtL(ii);
   792 		aView.ContactAtL(ii);
   790 		}
   793 		}
   791 	CCntTest::ProfileEnd(0);
   794 	CCntTest::ProfileEnd(0);
   792 	TCntProfile profile[1];
   795 	TCntProfile profile[1];
   793 	CCntTest::ProfileResult(profile,0,1);
   796 	CCntTest::ProfileResult(profile,0,1);
   794 	TReal result = profile[0].iTime;//1000000.0;
   797 	TReal result = profile[0].iTime;///1000000.0;
   795 	RDebug::Print(_L("Profile ContactAt Time Taken: %g"),result);
   798 	RDebug::Print(_L("Profile ContactAt Time Taken: %g"),result);
   796 	}*/
   799 	}*/
   797 
   800 
   798 void CViewExerciser::ExerciseViewL(CSortChecker::TSortOrder aSortOrder,CContactViewBase& aView)
   801 void CViewExerciser::ExerciseViewL(CSortChecker::TSortOrder aSortOrder,CContactViewBase& aView)
   799 	{
   802 	{
   984 	{
   987 	{
   985 	}
   988 	}
   986 
   989 
   987 
   990 
   988 
   991 
   989 //	
   992 ///////////////////////////////////////////////////////////////////	
   990 //
   993 //
   991 // COomFailBase
   994 // COomFailBase
   992 //
   995 //
   993 
   996 
   994 COomFailBase::COomFailBase(COomTest *aOomTest,CContactDatabase* aDb,CContactViewBase* aUnderlyingView)
   997 COomFailBase::COomFailBase(COomTest *aOomTest,CContactDatabase* aDb,CContactViewBase* aUnderlyingView)
  1186 				break;
  1189 				break;
  1187 			default:;
  1190 			default:;
  1188 			}
  1191 			}
  1189 		User::LeaveIfError(TheFs.Connect());
  1192 		User::LeaveIfError(TheFs.Connect());
  1190 
  1193 
  1191 		//OOM TEST VIEWS//
  1194 		//OOM TEST VIEWS/////////////
  1192 		DoOomTestL(new(ELeave) COomLocalView(this, iDb, NULL), mode); //Pass
  1195 		DoOomTestL(new(ELeave) COomLocalView(this, iDb, NULL), mode); //Pass
  1193 		DoOomTestL(new(ELeave) COomLocalView(this, iDb, NULL, KSortPlugin), mode); //Pass
  1196 		DoOomTestL(new(ELeave) COomLocalView(this, iDb, NULL, KSortPlugin), mode); //Pass
  1194 		DoOomTestL(new(ELeave) COomRemoteView(this, iDb, NULL), mode); //Pass
  1197 		DoOomTestL(new(ELeave) COomRemoteView(this, iDb, NULL), mode); //Pass
  1195 		DoOomTestL(new(ELeave) COomRemoteView(this, iDb, NULL, KSortPlugin), mode); //Pass
  1198 		DoOomTestL(new(ELeave) COomRemoteView(this, iDb, NULL, KSortPlugin), mode); //Pass
  1196 		
  1199 		
  1206 		DoOomTestL(new(ELeave) COomSubView(this, iDb, iLocalView), mode); //Pass
  1209 		DoOomTestL(new(ELeave) COomSubView(this, iDb, iLocalView), mode); //Pass
  1207 		DoOomTestL(new(ELeave) COomSubView(this, iDb, iRemoteView), mode); //Pass
  1210 		DoOomTestL(new(ELeave) COomSubView(this, iDb, iRemoteView), mode); //Pass
  1208 		DoOomTestL(new(ELeave) COomGroupView(this, iDb, iLocalView, iGroupOne), mode); //Pass
  1211 		DoOomTestL(new(ELeave) COomGroupView(this, iDb, iLocalView, iGroupOne), mode); //Pass
  1209 		DoOomTestL(new(ELeave) COomMatchingCriteria(this, iDb, iLocalView), mode);
  1212 		DoOomTestL(new(ELeave) COomMatchingCriteria(this, iDb, iLocalView), mode);
  1210 		DoOomTestL(new(ELeave) COomMatchingCriteria(this, iDb, iRemoteView), mode);
  1213 		DoOomTestL(new(ELeave) COomMatchingCriteria(this, iDb, iRemoteView), mode);
  1211 		//
  1214 		//////////////////////////////
  1212 		iConductor.iTest(TheFs.ResourceCount()==0);
  1215 		iConductor.iTest(TheFs.ResourceCount()==0);
  1213 		TheFs.Close();
  1216 		TheFs.Close();
  1214 		iConductor.iTest.End();
  1217 		iConductor.iTest.End();
  1215 		}
  1218 		}
  1216     //__UHEAP_MARKEND;
  1219     //__UHEAP_MARKEND;