loggingservices/eventlogger/test/src/t_lognotify.cpp
changeset 0 08ec8eefde2f
child 11 667e88a979d7
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "TEST.H"
       
    17 #include <logview.h>
       
    18 
       
    19 #undef test  //there is a "test" macro which hides "RTest test" declaration.
       
    20 
       
    21 RTest test(_L("Log Change Notification Test Harness"));
       
    22 
       
    23 _LIT(KTestRemoteParty1, "Remote Party");
       
    24 _LIT(KTestDirection1, "Direction");
       
    25 const TLogDurationType KTestDurationType1 = 1;
       
    26 const TLogDuration KTestDuration1 = 0x1234;
       
    27 _LIT(KTestStatus1, "Status");
       
    28 _LIT(KTestSubject1, "Subject");
       
    29 _LIT(KTestNumber1, "TheNumber");
       
    30 const TLogContactItemId KTestContact1 = 0x1234;
       
    31 const TLogLink KTestLink1 = 0x1234;
       
    32 _LIT8(KTestData1, "ABCDEFGH");
       
    33 const TLogFlags KTestFlags1 = 0x5;
       
    34 
       
    35 /**
       
    36 @SYMTestCaseID          SYSLIB-LOGENG-CT-0926
       
    37 @SYMTestCaseDesc	    Tests for CLogClient::NotifyChange() function
       
    38 @SYMTestPriority 	    High
       
    39 @SYMTestActions  	    Tests for notification of changes to the logengine database.
       
    40                         Add events within the time intervals ,check for the notification of an event
       
    41 @SYMTestExpectedResults Test must not fail
       
    42 @SYMREQ                 REQ0000
       
    43 */
       
    44 LOCAL_C void TestNotificationL()
       
    45 	{
       
    46 	test.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0926 "));
       
    47 	CLogClient* client = CLogClient::NewL(theFs);
       
    48 	CleanupStack::PushL(client);
       
    49 
       
    50 	CTestActive* active1 = new(ELeave)CTestActive;
       
    51 	CleanupStack::PushL(active1);
       
    52 
       
    53 	CTestActive* active2 = new(ELeave)CTestActive;
       
    54 	CleanupStack::PushL(active2);
       
    55 
       
    56 	CLogEvent* event = CLogEvent::NewL();
       
    57 	CleanupStack::PushL(event);
       
    58 
       
    59 	event->SetEventType(KLogCallEventTypeUid);
       
    60 	event->SetRemoteParty(KTestRemoteParty1);
       
    61 	event->SetDirection(KTestDirection1);
       
    62 	event->SetDurationType(KTestDurationType1);
       
    63 	event->SetDuration(KTestDuration1);
       
    64 	event->SetStatus(KTestStatus1);
       
    65 	event->SetSubject(KTestSubject1);
       
    66 	event->SetNumber(KTestNumber1);
       
    67 	event->SetContact(KTestContact1);
       
    68 	event->SetLink(KTestLink1);
       
    69 	event->SetDataL(KTestData1);
       
    70 	event->SetFlags(KTestFlags1);
       
    71 
       
    72 	// *** Notification when change made - no delay
       
    73 	active1->StartL();
       
    74 	client->NotifyChange(0, active1->iStatus);
       
    75 
       
    76 	// Add an event
       
    77 	active2->StartL();
       
    78 	client->AddEvent(*event, active2->iStatus);
       
    79 	
       
    80 	// Not sure which will finish first
       
    81 	CActiveScheduler::Start();
       
    82 	if (!active1->IsActive())
       
    83 		{
       
    84 		TEST(active2->IsActive());
       
    85 		TEST(active1->iStatus.Int() >= 0);
       
    86 		CActiveScheduler::Start();
       
    87 		TEST2(active2->iStatus.Int(), KErrNone);
       
    88 		}
       
    89 	else
       
    90 		{
       
    91 		TEST2(active2->iStatus.Int(), KErrNone);
       
    92 		CActiveScheduler::Start();
       
    93 		TEST(active1->iStatus.Int() >= 0);
       
    94 		}
       
    95 
       
    96 	// Remember the time
       
    97 	TTime before;
       
    98 	before.UniversalTime();
       
    99 
       
   100 	const TTimeIntervalMicroSeconds32 delay = 3000000;
       
   101 
       
   102 	// *** Notification when change made - with long delay
       
   103 	active1->StartL();
       
   104 	client->NotifyChange(delay, active1->iStatus);
       
   105 
       
   106 	// Add an event
       
   107 	active2->StartL();
       
   108 	client->AddEvent(*event, active2->iStatus);
       
   109 	
       
   110 	// We can be fairly certain that the function will complete first
       
   111 	CActiveScheduler::Start();
       
   112 	TEST2(active2->iStatus.Int(), KErrNone);
       
   113 	TEST(active1->IsActive());
       
   114 	CActiveScheduler::Start();
       
   115 	TEST(active1->iStatus.Int() >= 0);
       
   116 
       
   117 	User::After(1000000);
       
   118 
       
   119 	// Check delay
       
   120 	TTime after;
       
   121 	after.UniversalTime();
       
   122 	TEST(before + delay <= after);
       
   123 
       
   124 	before.UniversalTime();
       
   125 
       
   126 	// *** Notification when change made - with long delay - multiple changes
       
   127 	active1->StartL();
       
   128 	client->NotifyChange(delay, active1->iStatus);
       
   129 
       
   130 	// Add an event
       
   131 	active2->StartL();
       
   132 	client->AddEvent(*event, active2->iStatus);
       
   133 	
       
   134 	// The function should complete
       
   135 	CActiveScheduler::Start();
       
   136 	TEST(active1->IsActive());
       
   137 	TEST2(active2->iStatus.Int(), KErrNone);
       
   138 
       
   139 	// Change the event
       
   140 	active2->StartL();
       
   141 	client->ChangeEvent(*event, active2->iStatus);
       
   142 	
       
   143 	// The function should complete
       
   144 	CActiveScheduler::Start();
       
   145 	TEST(active1->IsActive());
       
   146 	TEST2(active2->iStatus.Int(), KErrNone);
       
   147 
       
   148 	// The notification should complete
       
   149 	CActiveScheduler::Start();
       
   150 	TEST(active1->iStatus.Int() >= 0);
       
   151 
       
   152 #ifdef __WINS__
       
   153 	User::After(1000000);
       
   154 #endif
       
   155 
       
   156 	// Check delay
       
   157 	after.UniversalTime();
       
   158 	TEST(before + TTimeIntervalMicroSeconds32(delay) <= after);
       
   159 
       
   160 	// *** Notification when change made - after long delay
       
   161 	active1->StartL();
       
   162 	client->NotifyChange(delay, active1->iStatus);
       
   163 
       
   164 	// Wait around for a time equal to the delay
       
   165 	CTestTimer* timer = CTestTimer::NewL();
       
   166 	timer->After(delay);
       
   167 	CActiveScheduler::Start();
       
   168 	delete timer;
       
   169 
       
   170 	// Add an event
       
   171 	active2->StartL();
       
   172 	client->AddEvent(*event, active2->iStatus);
       
   173 	
       
   174 	// Not sure which will finish first
       
   175 	CActiveScheduler::Start();
       
   176 	if (!active1->IsActive())
       
   177 		{
       
   178 		TEST(active2->IsActive());
       
   179 		TEST(active1->iStatus.Int() >= 0);
       
   180 		CActiveScheduler::Start();
       
   181 		TEST2(active2->iStatus.Int(), KErrNone);
       
   182 		}
       
   183 	else
       
   184 		{
       
   185 		TEST2(active2->iStatus.Int(), KErrNone);
       
   186 		CActiveScheduler::Start();
       
   187 		TEST(active1->iStatus.Int() >= 0);
       
   188 		}
       
   189 
       
   190 	CleanupStack::PopAndDestroy(4); // event, active2, active1, client
       
   191 	}
       
   192 
       
   193 /**
       
   194 @SYMTestCaseID          SYSLIB-LOGENG-CT-0927
       
   195 @SYMTestCaseDesc	    Tests for CLogClient::NotifyChangeCancel() function
       
   196 @SYMTestPriority 	    High
       
   197 @SYMTestActions  	    Tests for cancelling of any outstanding notification requests for changes to log engine database
       
   198 @SYMTestExpectedResults Test must not fail
       
   199 @SYMREQ                 REQ0000
       
   200 */
       
   201 LOCAL_C void TestCancelNotificationL()
       
   202 	{
       
   203 	test.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0927 "));
       
   204 	CLogClient* client = CLogClient::NewL(theFs);
       
   205 	CleanupStack::PushL(client);
       
   206 
       
   207 	CTestActive* active1 = new(ELeave)CTestActive;
       
   208 	CleanupStack::PushL(active1);
       
   209 
       
   210 	// *** Cancel without delay
       
   211 	active1->StartL();
       
   212 	client->NotifyChange(0, active1->iStatus);
       
   213 	client->NotifyChangeCancel();
       
   214 	CActiveScheduler::Start();
       
   215 	TEST2(active1->iStatus.Int(), KErrCancel);
       
   216 
       
   217 	const TInt delay = 3000000;
       
   218 
       
   219 	// *** Cancel with delay	
       
   220 	active1->StartL();
       
   221 	client->NotifyChange(delay, active1->iStatus);
       
   222 
       
   223 	// Wait around for a bit
       
   224 	CTestTimer* timer = CTestTimer::NewL();
       
   225 	timer->After(delay / 2);
       
   226 	CActiveScheduler::Start();
       
   227 	delete timer;
       
   228 
       
   229 	client->NotifyChangeCancel();
       
   230 	CActiveScheduler::Start();
       
   231 	TEST2(active1->iStatus.Int(), KErrCancel);
       
   232 
       
   233 	// *** Cancel with long delay	
       
   234 	active1->StartL();
       
   235 	client->NotifyChange(delay, active1->iStatus);
       
   236 
       
   237 	// Wait around for a bit
       
   238 	timer = CTestTimer::NewL();
       
   239 	timer->After(delay * 2);
       
   240 	CActiveScheduler::Start();
       
   241 	delete timer;
       
   242 
       
   243 	client->NotifyChangeCancel();
       
   244 	CActiveScheduler::Start();
       
   245 	TEST2(active1->iStatus.Int(), KErrCancel);
       
   246 
       
   247 	// *** Cancel after change
       
   248 	CLogEvent* event = CLogEvent::NewL();
       
   249 	CleanupStack::PushL(event);
       
   250 	event->SetEventType(KLogCallEventTypeUid);
       
   251 
       
   252 	active1->StartL();
       
   253 	client->NotifyChange(delay, active1->iStatus);
       
   254 
       
   255 	CTestActive* active2 = new(ELeave)CTestActive;
       
   256 	CleanupStack::PushL(active2);
       
   257 
       
   258 	active2->StartL();
       
   259 	client->AddEvent(*event, active2->iStatus);
       
   260 	CActiveScheduler::Start();
       
   261 	TEST(active1->IsActive());
       
   262 	TEST2(active2->iStatus.Int(), KErrNone);
       
   263 
       
   264 	client->NotifyChangeCancel();
       
   265 	CActiveScheduler::Start();
       
   266 	TEST2(active1->iStatus.Int(), KErrCancel);
       
   267 
       
   268 	// *** Cancel after change and delay
       
   269 	active1->StartL();
       
   270 	client->NotifyChange(delay, active1->iStatus);
       
   271 
       
   272 	// Wait around for a bit
       
   273 	timer = CTestTimer::NewL();
       
   274 	timer->After(delay / 2);
       
   275 	CActiveScheduler::Start();
       
   276 	delete timer;
       
   277 
       
   278 	active2->StartL();
       
   279 	client->AddEvent(*event, active2->iStatus);
       
   280 	CActiveScheduler::Start();
       
   281 	TEST(active1->IsActive());
       
   282 	TEST2(active2->iStatus.Int(), KErrNone);
       
   283 
       
   284 	client->NotifyChangeCancel();
       
   285 	CActiveScheduler::Start();
       
   286 	TEST2(active1->iStatus.Int(), KErrCancel);
       
   287 
       
   288 	// *** Cancel after change and delay
       
   289 	active1->StartL();
       
   290 	client->NotifyChange(delay, active1->iStatus);
       
   291 
       
   292 	active2->StartL();
       
   293 	client->AddEvent(*event, active2->iStatus);
       
   294 	CActiveScheduler::Start();
       
   295 	TEST(active1->IsActive());
       
   296 	TEST2(active2->iStatus.Int(), KErrNone);
       
   297 
       
   298 	// Wait around for a bit
       
   299 	timer = CTestTimer::NewL();
       
   300 	timer->After(delay / 2);
       
   301 	CActiveScheduler::Start();
       
   302 	delete timer;
       
   303 
       
   304 	client->NotifyChangeCancel();
       
   305 	CActiveScheduler::Start();
       
   306 	TEST2(active1->iStatus.Int(), KErrCancel);
       
   307 
       
   308 	// *** Cancel when not active
       
   309 	client->NotifyChangeCancel();
       
   310 
       
   311 	CleanupStack::PopAndDestroy(4); // active2, event, active, client
       
   312 	}
       
   313 
       
   314 /**
       
   315 @SYMTestCaseID          SYSLIB-LOGENG-CT-0928
       
   316 @SYMTestCaseDesc	    Tests for notification requests on view purge
       
   317 @SYMTestPriority 	    High
       
   318 @SYMTestActions  	    Notify changes on log view event
       
   319 @SYMTestExpectedResults Test must not fail
       
   320 @SYMREQ                 REQ0000
       
   321 */
       
   322 LOCAL_C void TestViewPurgeNotifyL()
       
   323 	{
       
   324 	test.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0928 "));
       
   325 	CTestTimer* timer = CTestTimer::NewL();
       
   326 	CleanupStack::PushL(timer);
       
   327 
       
   328 	CTestActive* active = new(ELeave)CTestActive();
       
   329 	CleanupStack::PushL(active);
       
   330 
       
   331 	CLogClient* client = CLogClient::NewL(theFs);
       
   332 	CleanupStack::PushL(client);
       
   333 
       
   334 	CLogViewEvent* view = CLogViewEvent::NewL(*client);
       
   335 	CleanupStack::PushL(view);
       
   336 
       
   337 	CLogFilter* filter = CLogFilter::NewL();
       
   338 	CleanupStack::PushL(filter);
       
   339 
       
   340 	CTestActive* notify = new(ELeave)CTestActive;
       
   341 	CleanupStack::PushL(notify);
       
   342 
       
   343 	// Start notifier
       
   344 	notify->StartL();
       
   345 	client->NotifyChange(1000000, notify->iStatus);
       
   346 
       
   347 	// Wait for 10 seconds
       
   348 	TEST(notify->IsActive());
       
   349 	timer = CTestTimer::NewL();
       
   350 	timer->After(7000000);
       
   351 	CActiveScheduler::Start();
       
   352 	delete timer;
       
   353 
       
   354 	// Setup a view
       
   355 	TEST(notify->IsActive());
       
   356 	if (view->SetFilterL(*filter, active->iStatus))
       
   357 		{
       
   358 		active->StartL();
       
   359 		CActiveScheduler::Start();
       
   360 		TEST(view->CountL() > 0);
       
   361 		}
       
   362 
       
   363 	// Wait for 10 seconds
       
   364 	TEST(notify->IsActive());
       
   365 	timer = CTestTimer::NewL();
       
   366 	timer->After(10000000);
       
   367 	CActiveScheduler::Start();
       
   368 	delete timer;
       
   369 
       
   370 	// We shouldn't be notified because nothing has changed
       
   371 	TEST(notify->IsActive());
       
   372 	client->NotifyChangeCancel();
       
   373 	CActiveScheduler::Start();
       
   374 	TEST2(notify->iStatus.Int(), KErrCancel);
       
   375 
       
   376 	CleanupStack::PopAndDestroy(6); // notify, client, filter, view, active, timer
       
   377 	}
       
   378 
       
   379 /**
       
   380 INC045485 - AV20 Messaging App crashes when attempting to write New SMS
       
   381 
       
   382 @SYMTestCaseID          SYSLIB-LOGENG-CT-0929
       
   383 @SYMTestCaseDesc	    Tests for defect number INC045485L.
       
   384 @SYMTestPriority 	    High
       
   385 @SYMTestActions  	    Tests by adding a fax event type
       
   386 @SYMTestExpectedResults Test must not fail
       
   387 @SYMREQ                 REQ0000
       
   388 */
       
   389 LOCAL_C void INC045485L()
       
   390 	{
       
   391 	test.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-0929 "));
       
   392 	const TInt KEventCnt = 5;//test events count
       
   393 	const TInt KSizeOfEventData = 400;//should be bigger than KLogSizeOfEventGuess constant
       
   394 	//Create client, active, event
       
   395 	CLogClient* client = CLogClient::NewL(theFs);
       
   396 	CleanupStack::PushL(client);
       
   397 	CTestActive* active = new (ELeave) CTestActive;
       
   398 	CleanupStack::PushL(active);
       
   399 	CLogEvent* event = CLogEvent::NewL();
       
   400 	CleanupStack::PushL(event);
       
   401 	//Add KEventCnt events
       
   402 	for(TInt i=0;i<KEventCnt;++i)
       
   403 		{
       
   404 		event->SetId(0x13579 + i);
       
   405 		event->SetEventType(KLogFaxEventTypeUid);
       
   406 		TUint8 buf[KSizeOfEventData];
       
   407 		Mem::Fill(buf, KSizeOfEventData, TChar('1' + i));
       
   408 		TPtr8 ptr(buf, KSizeOfEventData, KSizeOfEventData);
       
   409 		event->SetDataL(ptr);
       
   410 		//
       
   411 		active->StartL();
       
   412 		client->AddEvent(*event, active->iStatus);
       
   413 		CActiveScheduler::Start();
       
   414 		TEST(!active->IsActive());
       
   415 		client->Cancel();
       
   416 		TEST2(active->iStatus.Int(), KErrNone);
       
   417 		}
       
   418 	//Create LogViewEvent, CLogFilter
       
   419 	CLogViewEvent* view = CLogViewEvent::NewL(*client);
       
   420 	CleanupStack::PushL(view);
       
   421 	CLogFilter* filter = CLogFilter::NewL();
       
   422 	CleanupStack::PushL(filter);
       
   423 	filter->SetEventType(KLogFaxEventTypeUid);//the same as the type UID of added events
       
   424 	//Filter the events
       
   425 	if(view->SetFilterL(*filter, active->iStatus))
       
   426 		{
       
   427 		active->StartL();
       
   428 		CActiveScheduler::Start();
       
   429 		TEST(view->CountL() == KEventCnt);
       
   430 		}
       
   431 	//Visit the events
       
   432 	TInt j = 0;
       
   433 	TEST(view->FirstL(active->iStatus));
       
   434 	do
       
   435 		{
       
   436 		active->StartL();
       
   437 		CActiveScheduler::Start();
       
   438 		TEST2(active->iStatus.Int(), KErrNone);//If the defect is not fixed this check fails with "KErrOverflow"
       
   439 		const CLogEvent& e = view->Event();
       
   440 		RDebug::Print(_L("View Entry[%d]: Id:%d, Type:%x\n"), j, e.Id(), e.EventType().iUid);
       
   441 		const TDesC8& data = e.Data();
       
   442 		TEST(data.Length() == KSizeOfEventData);
       
   443 		//Touch the data.
       
   444 		for(TInt k=0;k<KSizeOfEventData;++k)
       
   445 			{
       
   446 			TChar c = data[k];
       
   447 			TEST(c >= TChar('1') && c < TChar('1' + KEventCnt));
       
   448 			}
       
   449 		++j;
       
   450 		}
       
   451 	while(view->NextL(active->iStatus));
       
   452 	//Destroy filter, view, event, active, client
       
   453 	CleanupStack::PopAndDestroy(filter);
       
   454 	CleanupStack::PopAndDestroy(view);
       
   455 	CleanupStack::PopAndDestroy(event);
       
   456 	CleanupStack::PopAndDestroy(active);
       
   457 	CleanupStack::PopAndDestroy(client);
       
   458 	}
       
   459 
       
   460 //DEF060381  Propagated: Receiving Chinese SMSes causes the battery to drain too fast 
       
   461 static void DEF060381L()
       
   462 	{
       
   463 	const TInt KSizeOfEventData = 1025; //should be bigger than KLogSizeOfEventGuess constant
       
   464 
       
   465 	//Create two clients. The first one will be used to send one message to the server,
       
   466 	//which length is too big. The second client will be used to receive the message from
       
   467 	//the server.
       
   468 	//If the defect is not fixed, the function hangs and its return point is never reached.
       
   469 	CLogClient* client1 = CLogClient::NewL(theFs);
       
   470 	CleanupStack::PushL(client1);
       
   471 
       
   472 	CLogClient* client2 = CLogClient::NewL(theFs);
       
   473 	CleanupStack::PushL(client2);
       
   474 
       
   475 	CTestActive* active = new (ELeave) CTestActive;
       
   476 	CleanupStack::PushL(active);
       
   477 
       
   478 	//Create one SMS event, which holds a block of data with size bigger than the default 
       
   479 	//size of the client side buffer (KLogSizeOfEventGuess).
       
   480 	CLogEvent* event = CLogEvent::NewL();
       
   481 	CleanupStack::PushL(event);
       
   482 
       
   483 	event->SetId(0x9991118);
       
   484 	event->SetEventType(KLogShortMessageEventTypeUid);
       
   485 	TUint8 buf[KSizeOfEventData];
       
   486 	for(TInt i=0;i<KSizeOfEventData;++i)
       
   487 		{
       
   488 		buf[i] = static_cast <TUint8> (i % 256);
       
   489 		}
       
   490 	TPtr8 ptr(buf, KSizeOfEventData, KSizeOfEventData);
       
   491 	event->SetDataL(ptr);
       
   492 
       
   493 	//Send the created event to the server unsing the first client.
       
   494 	active->StartL();
       
   495 	client1->AddEvent(*event, active->iStatus);
       
   496 	CActiveScheduler::Start();
       
   497 	TEST(!active->IsActive());
       
   498 	TEST2(active->iStatus.Int(), KErrNone);
       
   499 
       
   500 	//Create a view using the second client.
       
   501 	//Create a filter for SMS messages.
       
   502 	CLogViewEvent* view = CLogViewEvent::NewL(*client2);
       
   503 	CleanupStack::PushL(view);
       
   504 	CLogFilter* filter = CLogFilter::NewL();
       
   505 	CleanupStack::PushL(filter);
       
   506 	filter->SetEventType(KLogShortMessageEventTypeUid);//the same as the type UID of added events
       
   507 	//Filter the events
       
   508 	if(view->SetFilterL(*filter, active->iStatus))
       
   509 		{
       
   510 		active->StartL();
       
   511 		CActiveScheduler::Start();//Here the test fucntion hangs and never returns, if the defect is not fixed.
       
   512 		TEST(view->CountL() == 1);
       
   513 		}
       
   514 	//Visit the events
       
   515 	TInt j = 0;
       
   516 	TEST(view->FirstL(active->iStatus));
       
   517 	do
       
   518 		{
       
   519 		active->StartL();
       
   520 		CActiveScheduler::Start();
       
   521 		TEST2(active->iStatus.Int(), KErrNone);
       
   522 		const CLogEvent& e = view->Event();
       
   523 		RDebug::Print(_L("View Entry[%d]: Id:%d, Type:%x\n"), j, e.Id(), e.EventType().iUid);
       
   524 		const TDesC8& data = e.Data();
       
   525 		TEST(data.Length() == KSizeOfEventData);
       
   526 		//Touch the data.
       
   527 		for(TInt k=0;k<KSizeOfEventData;++k)
       
   528 			{
       
   529 			TUint8 c = data[k];
       
   530 			TEST(c == static_cast <TUint8> (k % 256));
       
   531 			}
       
   532 		++j;
       
   533 		}
       
   534 	while(view->NextL(active->iStatus));
       
   535 
       
   536 	CleanupStack::PopAndDestroy(filter);
       
   537 	CleanupStack::PopAndDestroy(view);
       
   538 	CleanupStack::PopAndDestroy(event);
       
   539 	CleanupStack::PopAndDestroy(active);
       
   540 	CleanupStack::PopAndDestroy(client2);
       
   541 	CleanupStack::PopAndDestroy(client1);
       
   542 	}
       
   543 
       
   544 void doTestsL()
       
   545 	{
       
   546 	TestUtils::Initialize(_L("T_LOGNOTIFY"));
       
   547 	TestUtils::DeleteDatabaseL();
       
   548 
       
   549 	test.Start(_L("Notifications"));
       
   550 	TestNotificationL();
       
   551 	theLog.Write(_L8("Test 1 OK\n"));
       
   552 
       
   553 	test.Next(_L("INC045485"));
       
   554 	::INC045485L();
       
   555 
       
   556 	test.Next(_L("Cancelling Notifications"));
       
   557 	TestCancelNotificationL();
       
   558 	theLog.Write(_L8("Test 2 OK\n"));
       
   559 
       
   560 	test.Next(_L("Notify with View Purge"));
       
   561 	TestViewPurgeNotifyL();
       
   562 	theLog.Write(_L8("Test 3 OK\n"));
       
   563 
       
   564 	test.Next(_L("DEF060381"));
       
   565 	::DEF060381L();
       
   566 	}