os/graphics/windowing/windowserver/test/tauto/TBUFFERSECURITY.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) 2006-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
// DEF075471 buffer security test
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
/**
sl@0
    19
 @file
sl@0
    20
 @test
sl@0
    21
 @internalComponent - Internal Symbian test code
sl@0
    22
*/
sl@0
    23
sl@0
    24
#include "TBUFFERSECURITY.H"
sl@0
    25
#include "graphics/windowserverconstants.h"
sl@0
    26
sl@0
    27
//Set this #define in buffersecurity.h to add extra logging to this test case (useful when debugging a test fail)
sl@0
    28
//#define _TBUFS_LOGGING
sl@0
    29
sl@0
    30
//Set this #define in buffersecurity.h to initiate a long running soak test, this should be done periodically
sl@0
    31
//#define _TBUFS_TEST_SOAK_TEST
sl@0
    32
sl@0
    33
sl@0
    34
sl@0
    35
LOCAL_C TInt TestWsThreadFunc(TAny* aPtr)
sl@0
    36
	{
sl@0
    37
	TTestThreadData* data = (TTestThreadData*)aPtr;
sl@0
    38
	RWsSession ws;
sl@0
    39
sl@0
    40
	TInt err=ws.Connect();
sl@0
    41
	if (err!=KErrNone)
sl@0
    42
		return(err);
sl@0
    43
	ws.TestWrite(ws.WsHandle(), data->iOpCode, data->iData, data->iDataLength);
sl@0
    44
	ws.Flush();
sl@0
    45
	ws.Close();
sl@0
    46
sl@0
    47
	return(KErrNone);
sl@0
    48
	}
sl@0
    49
sl@0
    50
LOCAL_C TInt TestAnimDllThreadFunc(TInt aInt, TAny* /*aPtr*/)
sl@0
    51
	{
sl@0
    52
	TBool useTestWrite = (TBool)aInt;
sl@0
    53
sl@0
    54
	RWsSession ws;
sl@0
    55
	TInt err=ws.Connect();
sl@0
    56
	if (err != KErrNone)
sl@0
    57
		return (err);
sl@0
    58
	if (useTestWrite)
sl@0
    59
		{
sl@0
    60
		TUint32 data[2];
sl@0
    61
		data[0] = 200;
sl@0
    62
		data[1] = 4;
sl@0
    63
		ws.TestWrite(ws.WsHandle(), EWsClOpCreateAnimDll, REINTERPRET_CAST(TUint8*,data), 8);
sl@0
    64
		ws.Flush();
sl@0
    65
		}
sl@0
    66
	else
sl@0
    67
		{
sl@0
    68
		RAnimDll animDll(ws);
sl@0
    69
		const TPtrC	filename(REINTERPRET_CAST(TUint16*,4),200);
sl@0
    70
		animDll.Load(filename);
sl@0
    71
		animDll.Close();
sl@0
    72
		}
sl@0
    73
	ws.Close();
sl@0
    74
sl@0
    75
	return(KErrNone);
sl@0
    76
	}
sl@0
    77
sl@0
    78
TInt RTestIpcSession::Connect()
sl@0
    79
	{
sl@0
    80
	TVersion v(KWservMajorVersionNumber,KWservMinorVersionNumber,KWservBuildVersionNumber);
sl@0
    81
	TInt err = CreateSession(KWSERVServerName,v);
sl@0
    82
	if (err == KErrNone)
sl@0
    83
		{
sl@0
    84
		err=iWsHandle=SendReceive(EWservMessInit,TIpcArgs());
sl@0
    85
		}
sl@0
    86
	return err;
sl@0
    87
	}
sl@0
    88
sl@0
    89
TInt RTestIpcSession::SendBadBuffer()
sl@0
    90
	{
sl@0
    91
	TIpcArgs ipcArgs;
sl@0
    92
	TUint32 iData[2];
sl@0
    93
	iData[0] = 200;
sl@0
    94
	iData[1] = 4;
sl@0
    95
	ipcArgs.Set(KBufferMessageSlot,&iData);
sl@0
    96
	return SendReceive(EWservMessCommandBuffer,ipcArgs);
sl@0
    97
	}
sl@0
    98
sl@0
    99
LOCAL_C TInt TestIpcThreadFunc(TInt /*aInt*/, TAny* /*aPtr*/)
sl@0
   100
	{
sl@0
   101
	RTestIpcSession server;
sl@0
   102
sl@0
   103
	TInt handle=server.Connect();
sl@0
   104
	if (handle >= KErrNone)
sl@0
   105
		server.SendBadBuffer();
sl@0
   106
sl@0
   107
	return(KErrNone);
sl@0
   108
	}
sl@0
   109
sl@0
   110
sl@0
   111
CTBufferSecurity::CTBufferSecurity(CTestStep* aStep):
sl@0
   112
	CTWsGraphicsBase(aStep)
sl@0
   113
	{
sl@0
   114
	}
sl@0
   115
sl@0
   116
CTBufferSecurity::~CTBufferSecurity()
sl@0
   117
	{
sl@0
   118
	}
sl@0
   119
sl@0
   120
void CTBufferSecurity::ConstructL()
sl@0
   121
	{
sl@0
   122
	RProperty securityTesting;
sl@0
   123
	TInt err=securityTesting.Attach(KUidWServSecurityTesting,EWServSecTestBufferSecurity);
sl@0
   124
	User::LeaveIfError(err);
sl@0
   125
	err=securityTesting.Define(KUidWServSecurityTesting,EWServSecTestBufferSecurity,RProperty::EInt,KAllowAllPolicy,KWriteDeviceDataMgmtPolicy);
sl@0
   126
	if (err!=KErrAlreadyExists)
sl@0
   127
    	User::LeaveIfError(err);
sl@0
   128
	TInt value = ETrue;
sl@0
   129
	err = securityTesting.Set(value);
sl@0
   130
	User::LeaveIfError(err);
sl@0
   131
	}
sl@0
   132
sl@0
   133
void CTBufferSecurity::TestWsBufferL(TInt aOpCode, TUint aDataFill, TBool aEightBit)
sl@0
   134
	{
sl@0
   135
	// create a new thread in which to test each of the TWsClientOpCode values
sl@0
   136
	// so if the thread is panicked the test will not fail.
sl@0
   137
	RThread testThread;
sl@0
   138
	TTestThreadData data;
sl@0
   139
	TRequestStatus status;
sl@0
   140
	TUint8 storeData[KTestDataMax];
sl@0
   141
	TTestDataStore store;
sl@0
   142
	store.any=storeData;
sl@0
   143
sl@0
   144
	//collect initial values
sl@0
   145
	for (TInt count = 0; count < KTestDataMax; count++)
sl@0
   146
		storeData[count] = 0;
sl@0
   147
	switch (aOpCode)
sl@0
   148
		{
sl@0
   149
		case EWsClOpHeapSetFail:
sl@0
   150
			store.heapSetFail->type = RAllocator::ENone;
sl@0
   151
			break;
sl@0
   152
		case EWsClOpSetPointerCursorArea:
sl@0
   153
			store.cursorArea->area = TheClient->iWs.PointerCursorArea();
sl@0
   154
			break;
sl@0
   155
		case EWsClOpRawEvent:
sl@0
   156
			//skip switch off (would need a timer to turn it back on again)
sl@0
   157
			if (aDataFill == TRawEvent::ESwitchOff)
sl@0
   158
				aDataFill = TRawEvent::ENone;
sl@0
   159
			break;
sl@0
   160
#if defined(__WINS__)
sl@0
   161
		case EWsClOpSimulateXyInput:
sl@0
   162
			*store.xyInputType = EXYInputMouse;
sl@0
   163
			break;
sl@0
   164
#endif
sl@0
   165
		}
sl@0
   166
sl@0
   167
	data.iOpCode = aOpCode;
sl@0
   168
	if (aEightBit)
sl@0
   169
		{
sl@0
   170
		for (TInt count = 0; count < KTestDataMax; count++)
sl@0
   171
			data.iData[count] = (TUint8)aDataFill;
sl@0
   172
		}
sl@0
   173
	else
sl@0
   174
		{
sl@0
   175
		for (TInt count = 0; count < KTestDataMax32; count++)
sl@0
   176
			data.iData32[count] = aDataFill;
sl@0
   177
		}
sl@0
   178
	data.iDataLength = KTestDataMax;
sl@0
   179
	_LIT(KThreadNameFormat,"BufSecTestWsThread-%d-%d");
sl@0
   180
	HBufC* threadName = HBufC::NewLC(KThreadNameFormat().Size() + 32);
sl@0
   181
	TPtr threadNamePtr(threadName->Des());
sl@0
   182
	threadNamePtr.Format(KThreadNameFormat(), aOpCode, aDataFill);
sl@0
   183
	TInt err = testThread.Create(threadNamePtr, TestWsThreadFunc,KDefaultStackSize,KPanicThreadHeapSize,KPanicThreadHeapSize,(TAny*)&data,EOwnerThread);
sl@0
   184
sl@0
   185
	if (err != KErrNone)
sl@0
   186
		{
sl@0
   187
		User::After(100000);
sl@0
   188
		err = testThread.Create(threadNamePtr,TestWsThreadFunc,KDefaultStackSize,KPanicThreadHeapSize,KPanicThreadHeapSize,(TAny*)&data,EOwnerThread);
sl@0
   189
		}
sl@0
   190
	CleanupStack::PopAndDestroy(threadName);
sl@0
   191
	testThread.Logon(status);
sl@0
   192
	User::SetJustInTime(EFalse);
sl@0
   193
	testThread.Resume();
sl@0
   194
	User::WaitForRequest(status);
sl@0
   195
	User::SetJustInTime(ETrue);
sl@0
   196
#ifdef _TBUFS_LOGGING
sl@0
   197
	TLogMessageText logMessageText;
sl@0
   198
	TBufSStartLogText("TestWsBufferL");
sl@0
   199
	logMessageText.Format(_L(" OpCode(%d), ExitReason: %d"),aOpCode,testThread.ExitReason());
sl@0
   200
	TBufSLogFormat(logMessageText);
sl@0
   201
#endif
sl@0
   202
sl@0
   203
	testThread.Close();
sl@0
   204
	//reset some values to sensible ones
sl@0
   205
	switch (aOpCode)
sl@0
   206
		{
sl@0
   207
		case EWsClOpHeapSetFail:
sl@0
   208
		case EWsClOpSetPointerCursorArea:
sl@0
   209
#if defined(__WINS__)
sl@0
   210
		case EWsClOpSimulateXyInput:
sl@0
   211
#endif
sl@0
   212
			RThread resetThread;
sl@0
   213
			TheClient->iWs.TestWrite(TheClient->iWs.WsHandle(), data.iOpCode, storeData, data.iDataLength);
sl@0
   214
			TheClient->iWs.Flush();
sl@0
   215
			break;
sl@0
   216
		}
sl@0
   217
	}
sl@0
   218
sl@0
   219
void CTBufferSecurity::TestBadStringAnimDllL()
sl@0
   220
	{
sl@0
   221
	TEST(iTest->TestPanicL(&TestAnimDllThreadFunc,3,EFalse,NULL,KLitKernExec));
sl@0
   222
	}
sl@0
   223
sl@0
   224
void CTBufferSecurity::TestBadStringL()
sl@0
   225
	{
sl@0
   226
	TEST(iTest->TestWsPanicL(&TestAnimDllThreadFunc,EWservPanicBufferPtr,ETrue,NULL));
sl@0
   227
	}
sl@0
   228
sl@0
   229
void CTBufferSecurity::TestBadIpcL()
sl@0
   230
	{
sl@0
   231
	TEST(iTest->TestWsPanicL(&TestIpcThreadFunc,EWservPanicDescriptor,1));
sl@0
   232
	}
sl@0
   233
sl@0
   234
void CTBufferSecurity::RunTestCaseL(TInt /*aCurTestCase*/)
sl@0
   235
	{
sl@0
   236
	TInt ii;
sl@0
   237
	((CTBufferSecurityStep*)iStep)->SetTestStepID(KUnknownSYMTestCaseIDName);
sl@0
   238
	switch(++iTest->iState)
sl@0
   239
		{
sl@0
   240
		case 1:
sl@0
   241
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0022"));
sl@0
   242
			_LIT(KBuffSecTestBadIpcL,"TestBadIpcL");
sl@0
   243
			iTest->LogSubTest(KBuffSecTestBadIpcL);
sl@0
   244
			TestBadIpcL();
sl@0
   245
			break;
sl@0
   246
		case 2:
sl@0
   247
/**
sl@0
   248
@SYMTestCaseID		GRAPHICS-WSERV-0549
sl@0
   249
*/
sl@0
   250
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0549"));
sl@0
   251
			_LIT(KBuffSecTestBadStringLRAnimDll,"TestBadStringL use RAnimDll");
sl@0
   252
			iTest->LogSubTest(KBuffSecTestBadStringLRAnimDll);
sl@0
   253
			TestBadStringAnimDllL();
sl@0
   254
			break;
sl@0
   255
		case 3:
sl@0
   256
/**
sl@0
   257
@SYMTestCaseID		GRAPHICS-WSERV-0550
sl@0
   258
*/
sl@0
   259
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0550"));
sl@0
   260
			_LIT(KBuffSecTestBadStringLTestWrite,"TestBadStringL use TestWrite");
sl@0
   261
			iTest->LogSubTest(KBuffSecTestBadStringLTestWrite);
sl@0
   262
			TestBadStringL();
sl@0
   263
			break;
sl@0
   264
#ifdef _TBUFS_TEST_SOAK_TEST
sl@0
   265
		case 4:
sl@0
   266
/**
sl@0
   267
@SYMTestCaseID		GRAPHICS-WSERV-0551
sl@0
   268
*/
sl@0
   269
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0551"));
sl@0
   270
			_LIT(KBuffSecTestWsBufferLSoak8bit,"TestWsBufferL Soak 8bit");
sl@0
   271
			iTest->LogSubTest(KBuffSecTestWsBufferLSoak8bit);
sl@0
   272
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   273
				{
sl@0
   274
				TUint8 soak8=0;//gets set as KMaxTUint8 on first iteration
sl@0
   275
				do
sl@0
   276
					{
sl@0
   277
					--soak8;
sl@0
   278
					TestWsBufferL(ii,soak8);
sl@0
   279
					}
sl@0
   280
				while (soak8>0);
sl@0
   281
				}
sl@0
   282
			break;
sl@0
   283
		case 5:
sl@0
   284
/**
sl@0
   285
@SYMTestCaseID		GRAPHICS-WSERV-0552
sl@0
   286
*/
sl@0
   287
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0552"));
sl@0
   288
			_LIT(KBuffSecTestWsBufferLSoak32bit,"TestWsBufferL Soak 32bit");
sl@0
   289
			iTest->LogSubTest(KBuffSecTestWsBufferLSoak32bit);
sl@0
   290
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   291
				{
sl@0
   292
				TUint32 soak32=0;//gets set as KMaxTUint8 on first iteration
sl@0
   293
				do
sl@0
   294
					{
sl@0
   295
					--soak32;
sl@0
   296
					TestWsBufferL(ii,soak32,EFalse);
sl@0
   297
					}
sl@0
   298
				while (soak32>0);
sl@0
   299
				}
sl@0
   300
			break;
sl@0
   301
#else
sl@0
   302
		case 4:
sl@0
   303
/**
sl@0
   304
@SYMTestCaseID		GRAPHICS-WSERV-0553
sl@0
   305
*/
sl@0
   306
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0553"));
sl@0
   307
			_LIT(KBuffSecTestWsBufferL0,"TestWsBufferL 0");
sl@0
   308
			iTest->LogSubTest(KBuffSecTestWsBufferL0);
sl@0
   309
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   310
				{
sl@0
   311
				TestWsBufferL(ii,0);
sl@0
   312
				}
sl@0
   313
			break;
sl@0
   314
		case 5:
sl@0
   315
/**
sl@0
   316
@SYMTestCaseID		GRAPHICS-WSERV-0554
sl@0
   317
*/
sl@0
   318
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0554"));
sl@0
   319
			_LIT(KBuffSecTestWsBufferL5,"TestWsBufferL 5");
sl@0
   320
			iTest->LogSubTest(KBuffSecTestWsBufferL5);
sl@0
   321
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   322
				{
sl@0
   323
				TestWsBufferL(ii,5);
sl@0
   324
				}
sl@0
   325
			break;
sl@0
   326
		case 6:
sl@0
   327
/**
sl@0
   328
@SYMTestCaseID		GRAPHICS-WSERV-0555
sl@0
   329
*/
sl@0
   330
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0555"));
sl@0
   331
			_LIT(KBuffSecTestWsBufferL32,"TestWsBufferL 32");
sl@0
   332
			iTest->LogSubTest(KBuffSecTestWsBufferL32);
sl@0
   333
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   334
				{
sl@0
   335
				TestWsBufferL(ii,32);
sl@0
   336
				}
sl@0
   337
			break;
sl@0
   338
		case 7:
sl@0
   339
/**
sl@0
   340
@SYMTestCaseID		GRAPHICS-WSERV-0556
sl@0
   341
*/
sl@0
   342
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0556"));
sl@0
   343
			_LIT(KBuffSecTestWsBufferL64,"TestWsBufferL 64");
sl@0
   344
			iTest->LogSubTest(KBuffSecTestWsBufferL64);
sl@0
   345
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   346
				{
sl@0
   347
				TestWsBufferL(ii,64);
sl@0
   348
				}
sl@0
   349
			break;
sl@0
   350
		case 8:
sl@0
   351
/**
sl@0
   352
@SYMTestCaseID		GRAPHICS-WSERV-0557
sl@0
   353
*/
sl@0
   354
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0557"));
sl@0
   355
			_LIT(KBuffSecTestWsBufferL128,"TestWsBufferL 128");
sl@0
   356
			iTest->LogSubTest(KBuffSecTestWsBufferL128);
sl@0
   357
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   358
				{
sl@0
   359
				TestWsBufferL(ii,128);
sl@0
   360
				}
sl@0
   361
			break;
sl@0
   362
		case 9:
sl@0
   363
/**
sl@0
   364
@SYMTestCaseID		GRAPHICS-WSERV-0558
sl@0
   365
*/
sl@0
   366
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0558"));
sl@0
   367
			_LIT(KBuffSecTestWsBufferL255,"TestWsBufferL 255");
sl@0
   368
			iTest->LogSubTest(KBuffSecTestWsBufferL255);
sl@0
   369
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   370
				{
sl@0
   371
				TestWsBufferL(ii,255);
sl@0
   372
				}
sl@0
   373
			break;
sl@0
   374
		case 10:
sl@0
   375
/**
sl@0
   376
@SYMTestCaseID		GRAPHICS-WSERV-0559
sl@0
   377
*/
sl@0
   378
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0559"));
sl@0
   379
			_LIT(KBuffSecTestWsBufferL325,"TestWsBufferL 32-5");
sl@0
   380
			iTest->LogSubTest(KBuffSecTestWsBufferL325);
sl@0
   381
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   382
				{
sl@0
   383
				TestWsBufferL(ii,5,EFalse);
sl@0
   384
				}
sl@0
   385
			break;
sl@0
   386
		case 11:
sl@0
   387
/**
sl@0
   388
@SYMTestCaseID		GRAPHICS-WSERV-0560
sl@0
   389
*/
sl@0
   390
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0560"));
sl@0
   391
			_LIT(KBuffSecTestWsBufferL32128,"TestWsBufferL 32-128");
sl@0
   392
			iTest->LogSubTest(KBuffSecTestWsBufferL32128);
sl@0
   393
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   394
				{
sl@0
   395
				TestWsBufferL(ii,128,EFalse);
sl@0
   396
				}
sl@0
   397
			break;
sl@0
   398
		case 12:
sl@0
   399
/**
sl@0
   400
@SYMTestCaseID		GRAPHICS-WSERV-0561
sl@0
   401
*/
sl@0
   402
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0561"));
sl@0
   403
			_LIT(KBuffSecTestWsBufferL32512,"TestWsBufferL 32-512");
sl@0
   404
			iTest->LogSubTest(KBuffSecTestWsBufferL32512);
sl@0
   405
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   406
				{
sl@0
   407
				TestWsBufferL(ii,512,EFalse);
sl@0
   408
				}
sl@0
   409
			break;
sl@0
   410
		case 13:
sl@0
   411
/**
sl@0
   412
@SYMTestCaseID		GRAPHICS-WSERV-0562
sl@0
   413
*/
sl@0
   414
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0562"));
sl@0
   415
			_LIT(KBuffSecTestWsBufferL320x01234567,"TestWsBufferL 32-0x01234567");
sl@0
   416
			iTest->LogSubTest(KBuffSecTestWsBufferL320x01234567);
sl@0
   417
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   418
				{
sl@0
   419
				TestWsBufferL(ii,0x01234567,EFalse);
sl@0
   420
				}
sl@0
   421
			break;
sl@0
   422
		case 14:
sl@0
   423
/**
sl@0
   424
@SYMTestCaseID		GRAPHICS-WSERV-0563
sl@0
   425
*/
sl@0
   426
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0563"));
sl@0
   427
			_LIT(KBuffSecTestWsBufferL320x89abcdef,"TestWsBufferL 32-0x89abcdef");
sl@0
   428
			iTest->LogSubTest(KBuffSecTestWsBufferL320x89abcdef);
sl@0
   429
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   430
				{
sl@0
   431
				TestWsBufferL(ii,0x89abcdef,EFalse);
sl@0
   432
				}
sl@0
   433
			break;
sl@0
   434
		case 15:
sl@0
   435
/**
sl@0
   436
@SYMTestCaseID		GRAPHICS-WSERV-0564
sl@0
   437
*/
sl@0
   438
			((CTBufferSecurityStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0564"));
sl@0
   439
			_LIT(KBuffSecTestWsBufferL320xCCCCCCCC,"TestWsBufferL 32-0xCCCCCCCC");
sl@0
   440
			iTest->LogSubTest(KBuffSecTestWsBufferL320xCCCCCCCC);
sl@0
   441
			for(ii = EWsClOpDisconnect; ii < EWsClOpLastEnumValue; ii++)
sl@0
   442
				{
sl@0
   443
				TestWsBufferL(ii,0xCCCCCCCC,EFalse);
sl@0
   444
				}
sl@0
   445
			break;
sl@0
   446
#endif
sl@0
   447
		default:
sl@0
   448
			((CTBufferSecurityStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
sl@0
   449
			((CTBufferSecurityStep*)iStep)->CloseTMSGraphicsStep();
sl@0
   450
			TInt err = RProperty::Set(KUidWServSecurityTesting,EWServSecTestBufferSecurity,EFalse);
sl@0
   451
			User::LeaveIfError(err);
sl@0
   452
			TestComplete();
sl@0
   453
		}
sl@0
   454
	((CTBufferSecurityStep*)iStep)->RecordTestResultL();
sl@0
   455
	}
sl@0
   456
sl@0
   457
__WS_CONSTRUCT_STEP__(BufferSecurity)