graphicscomposition/openwfsupport/test/tstreamoperation/tnativestream.cpp
branchRCL_3
changeset 164 25ffed67c7ef
parent 163 bbf46f59e123
equal deleted inserted replaced
163:bbf46f59e123 164:25ffed67c7ef
     1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    21 #include <graphics/extensioncontainer.h>
    21 #include <graphics/extensioncontainer.h>
    22 #include <graphics/suerror.h>
    22 #include <graphics/suerror.h>
    23 #include <test/extendtef.h>
    23 #include <test/extendtef.h>
    24 #include <dispchannel.h>
    24 #include <dispchannel.h>
    25 #include <hal.h>
    25 #include <hal.h>
    26 #include <test/singletontestexithelper.inl>
       
    27 #include "tnativestream.h"
    26 #include "tnativestream.h"
    28 #include "surfaceutility.h"
    27 #include "surfaceutility.h"
    29 
    28 #include "owftestexithelper.inl"
    30 #ifdef EGLSYNCHELPER_INCLUDED
       
    31     #include <EGL/egl.h>
       
    32     #include "eglsynchelper.h"
       
    33 #endif
       
    34 
    29 
    35 #define BUFFER_READ_HANDLE_BASE  0x100
    30 #define BUFFER_READ_HANDLE_BASE  0x100
    36 #define BUFFER_WRITE_HANDLE_BASE 0x200
    31 #define BUFFER_WRITE_HANDLE_BASE 0x200
    37 #define INDEX_TO_READ_HANDLE(x)  ((SymbianStreamBuffer) ((x)+BUFFER_READ_HANDLE_BASE))
    32 #define INDEX_TO_READ_HANDLE(x)  ((SymbianStreamBuffer) ((x)+BUFFER_READ_HANDLE_BASE))
    38 #define INDEX_TO_WRITE_HANDLE(x)  ((SymbianStreamBuffer) ((x)+BUFFER_WRITE_HANDLE_BASE))
    33 #define INDEX_TO_WRITE_HANDLE(x)  ((SymbianStreamBuffer) ((x)+BUFFER_WRITE_HANDLE_BASE))
   246 	
   241 	
   247 	return ns;
   242 	return ns;
   248 	}
   243 	}
   249 
   244 
   250 RSemaphore      gSemaphore;
   245 RSemaphore      gSemaphore;
   251 RSemaphore      gSemaphore2;
       
   252 
   246 
   253 TGlobalNativeStreamVar	gVarInstance={0};
   247 TGlobalNativeStreamVar	gVarInstance={0};
   254 const TGlobalNativeStreamVar& TGlobalNativeStreamVar::Instance()
   248 const TGlobalNativeStreamVar& TGlobalNativeStreamVar::Instance()
   255 	{
   249 	{
   256 	return gVarInstance;
   250 	return gVarInstance;
   466 
   460 
   467 		// Test with 1, 2 and 3 buffers
   461 		// Test with 1, 2 and 3 buffers
   468 		ADD_TEST_STEP_PARAM_RANGE(GRAPHICS_OPENWFC_NATIVESTREAM_0140L,1,4);
   462 		ADD_TEST_STEP_PARAM_RANGE(GRAPHICS_OPENWFC_NATIVESTREAM_0140L,1,4);
   469 		ADD_TEST_STEP_PARAM_RANGE(GRAPHICS_OPENWFC_NATIVESTREAM_0141L,1,4);
   463 		ADD_TEST_STEP_PARAM_RANGE(GRAPHICS_OPENWFC_NATIVESTREAM_0141L,1,4);
   470 		ADD_THIS_TEST_STEP(GRAPHICS_OPENWFC_NATIVESTREAM_0142L);
   464 		ADD_THIS_TEST_STEP(GRAPHICS_OPENWFC_NATIVESTREAM_0142L);
   471         ADD_THIS_TEST_STEP(GRAPHICS_OPENWFC_NATIVESTREAM_0143L);
       
   472         ADD_THIS_TEST_STEP(GRAPHICS_OPENWFC_NATIVESTREAM_0144L);
       
   473 
   465 
   474 	END_SUITE;	
   466 	END_SUITE;	
   475 	
   467 	
   476 	}
   468 	}
   477 
   469 
   547     ASSERT_TRUE(err == KErrNone);
   539     ASSERT_TRUE(err == KErrNone);
   548     SymbianStreamReleaseReadBuffer(ns,bufferHandle);
   540     SymbianStreamReleaseReadBuffer(ns,bufferHandle);
   549 	gVarInstance.SetSurfaceID(*checkId);
   541 	gVarInstance.SetSurfaceID(*checkId);
   550     gSemaphore.CreateLocal(1);
   542     gSemaphore.CreateLocal(1);
   551     gSemaphore.Wait(); 
   543     gSemaphore.Wait(); 
   552     gSemaphore2.CreateLocal(1);
       
   553     gSemaphore2.Wait(); 
       
   554     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
   544     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
   555 	}
   545 	}
   556 
   546 
   557 void CTestNativeStream::DestroySharedNativeStreamL()
   547 void CTestNativeStream::DestroySharedNativeStreamL()
   558 	{
   548 	{
   559 	GrowCleanupStackL();
   549 	GrowCleanupStackL();
   560 	
   550 	
   561 	CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(COpenWfcStreamMap::InstanceL().GetMainHeap())));
   551 	CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(COpenWfcStreamMap::InstanceL().GetMainHeap())));
   562 	
   552 	
   563     gSemaphore2.Close();
       
   564 	gSemaphore.Close();
   553 	gSemaphore.Close();
   565 	TSurfaceId id = gVarInstance.SurfaceID();
   554 	TSurfaceId id = gVarInstance.SurfaceID();
   566 	SymbianStreamType ns;
   555 	SymbianStreamType ns;
   567 	TInt err = SymbianStreamFind(&id,&ns);
   556 	TInt err = SymbianStreamFind(&id,&ns);
   568 	ASSERT_TRUE(err == KErrNone);
   557 	ASSERT_TRUE(err == KErrNone);
   665     ASSERT_TRUE(err == KErrNone);
   654     ASSERT_TRUE(err == KErrNone);
   666     long bufferIndex;
   655     long bufferIndex;
   667     const TSurfaceId* getId = NULL;
   656     const TSurfaceId* getId = NULL;
   668     err = SymbianStreamGetBufferId(ns,bufferHandle,&bufferIndex,&getId);
   657     err = SymbianStreamGetBufferId(ns,bufferHandle,&bufferIndex,&getId);
   669     ASSERT_TRUE(err == KErrNone);
   658     ASSERT_TRUE(err == KErrNone);
   670     TInt ChunkHandle = 100;
       
   671     err = SymbianStreamGetChunkHandle(ns, &ChunkHandle);
       
   672     ASSERT_TRUE(err == KErrNone);    
       
   673     err = SymbianStreamReleaseReadBuffer(ns,bufferHandle);
   659     err = SymbianStreamReleaseReadBuffer(ns,bufferHandle);
   674     ASSERT_TRUE(err == KErrNone);    
   660     ASSERT_TRUE(err == KErrNone);
   675 	ASSERT_EQUALS(*getId,surface);
   661 	ASSERT_EQUALS(*getId,surface);
   676 	CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
   662 	CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
   677 	
   663 	
   678 	TSurfaceId surface2=iUtility->CreateSurfaceL(TSize(100,100),EUidPixelFormatARGB_8888_PRE,400,2);
   664 	TSurfaceId surface2=iUtility->CreateSurfaceL(TSize(100,100),EUidPixelFormatARGB_8888_PRE,400,2);
   679 	ASSERT_FALSE(surface2.IsNull());
   665 	ASSERT_FALSE(surface2.IsNull());
   681 	CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(mainHeap)));
   667 	CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(mainHeap)));
   682 	SymbianStreamType ns2;
   668 	SymbianStreamType ns2;
   683 	err = SymbianStreamAcquire(&surface2,&ns2);
   669 	err = SymbianStreamAcquire(&surface2,&ns2);
   684 	ASSERT_TRUE(err == KErrNone);
   670 	ASSERT_TRUE(err == KErrNone);
   685 	ASSERT_TRUE(ns2);
   671 	ASSERT_TRUE(ns2);
   686 	ASSERT_FALSE(SymbianStreamSame(ns, ns2));
   672 	ASSERT_NOT_EQUALS(ns,ns2);
   687 	ASSERT_EQUALS((COpenWfcStreamMap::InstanceL().Count()), count + 2);
   673 	ASSERT_EQUALS((COpenWfcStreamMap::InstanceL().Count()), count + 2);
   688 	err = SymbianStreamAcquireReadBuffer(ns2,&bufferHandle);
   674 	err = SymbianStreamAcquireReadBuffer(ns2,&bufferHandle);
   689 	ASSERT_TRUE(err == KErrNone);
   675 	ASSERT_TRUE(err == KErrNone);
   690     const TSurfaceId* getId2 = NULL;
   676     const TSurfaceId* getId2 = NULL;
   691     err = SymbianStreamGetBufferId(ns2,bufferHandle,&bufferIndex,&getId2);
   677     err = SymbianStreamGetBufferId(ns2,bufferHandle,&bufferIndex,&getId2);
   959         
   945         
   960         // Store the retrieved attributes
   946         // Store the retrieved attributes
   961         TInt32 attWidth = 0;
   947         TInt32 attWidth = 0;
   962         TInt32 attHeight = 0;
   948         TInt32 attHeight = 0;
   963         TInt32 attStreamStride = 0;
   949         TInt32 attStreamStride = 0;
   964         TInt32 attStreamFormat = EUidPixelFormatUnknown;
   950         TUidPixelFormat attStreamFormat = EUidPixelFormatUnknown;
   965         TInt32 attStreamPixelSize = 0;
   951         TInt32 attStreamPixelSize = 0;
   966         
   952         
   967         SymbianStreamGetHeader(ns, &attWidth, &attHeight, &attStreamStride, &attStreamFormat, &attStreamPixelSize);		
   953         SymbianStreamGetHeader(ns, &attWidth, &attHeight, &attStreamStride, &attStreamFormat, &attStreamPixelSize);		
   968             
   954             
   969         ASSERT_EQUALS(attWidth, width);
   955         ASSERT_EQUALS(attWidth, width);
   970         ASSERT_EQUALS(attHeight, height);
   956         ASSERT_EQUALS(attHeight, height);
   971         ASSERT_EQUALS((TInt32)attStreamFormat, (TInt32)supportedFormats[x].symbianPixelFormat);
   957         ASSERT_EQUALS(attStreamFormat, supportedFormats[x].symbianPixelFormat);
   972         if (BytesPerPixel(supportedFormats[x].symbianPixelFormat) > 0)
   958         if (BytesPerPixel(supportedFormats[x].symbianPixelFormat) > 0)
   973             {
   959             {
   974             ASSERT_EQUALS(attStreamStride, (streamPixelSize * width));
   960             ASSERT_EQUALS(attStreamStride, (streamPixelSize * width));
   975             }
   961             }
   976         else
   962         else
  1355 	ASSERT_EQUALS(bufferIndex, (khronos_int32_t)1);
  1341 	ASSERT_EQUALS(bufferIndex, (khronos_int32_t)1);
  1356 	INFO_PRINTF2(_L("Thread 1 - Write buffer %i acquired"), bufferIndex);
  1342 	INFO_PRINTF2(_L("Thread 1 - Write buffer %i acquired"), bufferIndex);
  1357 	
  1343 	
  1358 	gSemaphore.Signal(2); // Thread 2 and 3 ready to run
  1344 	gSemaphore.Signal(2); // Thread 2 and 3 ready to run
  1359 	
  1345 	
  1360 	gSemaphore2.Wait();
  1346 	gSemaphore.Wait();
  1361     gSemaphore2.Wait();     // Wait for both threads to signal
       
  1362 	err = SymbianStreamReleaseWriteBuffer(ns,writeBuffer1);
  1347 	err = SymbianStreamReleaseWriteBuffer(ns,writeBuffer1);
  1363 	ASSERT_TRUE(err == KErrNone);
  1348 	ASSERT_TRUE(err == KErrNone);
  1364 	SymbianStreamRemoveReference(ns);
  1349 	SymbianStreamRemoveReference(ns);
  1365 	INFO_PRINTF2(_L("Thread 1 - Write buffer %i released"), bufferIndex);
  1350 	INFO_PRINTF2(_L("Thread 1 - Write buffer %i released"), bufferIndex);
  1366 
  1351 
  1388 	ASSERT_TRUE(err != KErrBadHandle);
  1373 	ASSERT_TRUE(err != KErrBadHandle);
  1389 	INFO_PRINTF1(_L("Thread 2 - Attempt to acquire the write buffer"));
  1374 	INFO_PRINTF1(_L("Thread 2 - Attempt to acquire the write buffer"));
  1390 	ASSERT_FALSE(writeBuffer1);
  1375 	ASSERT_FALSE(writeBuffer1);
  1391 	INFO_PRINTF1(_L("Thread 2 - Write buffer already in use by Thread 1!"));
  1376 	INFO_PRINTF1(_L("Thread 2 - Write buffer already in use by Thread 1!"));
  1392     
  1377     
  1393 	gSemaphore2.Signal();
  1378 	gSemaphore.Signal();
  1394 	
  1379 	
  1395 	gSemaphore.Wait();
  1380 	gSemaphore.Wait();
  1396 	
  1381 	
  1397 	khronos_int32_t writeBuffer2;
  1382 	khronos_int32_t writeBuffer2;
  1398 	err = SymbianStreamAcquireWriteBuffer(ns,&writeBuffer2);
  1383 	err = SymbianStreamAcquireWriteBuffer(ns,&writeBuffer2);
  1430  	err = SymbianStreamAcquireWriteBuffer(ns,&writeBuffer1);
  1415  	err = SymbianStreamAcquireWriteBuffer(ns,&writeBuffer1);
  1431  	ASSERT_TRUE(err != KErrBadHandle);
  1416  	ASSERT_TRUE(err != KErrBadHandle);
  1432  	INFO_PRINTF1(_L("Thread 3 - Attempt to acquire the write buffer"));
  1417  	INFO_PRINTF1(_L("Thread 3 - Attempt to acquire the write buffer"));
  1433 	ASSERT_FALSE(writeBuffer1);
  1418 	ASSERT_FALSE(writeBuffer1);
  1434 	INFO_PRINTF1(_L("Thread 3 - Write buffer already in use by Thread 1!"));
  1419 	INFO_PRINTF1(_L("Thread 3 - Write buffer already in use by Thread 1!"));
  1435 
       
  1436     gSemaphore2.Signal();
       
  1437 
  1420 
  1438     SymbianStreamRemoveReference(ns);
  1421     SymbianStreamRemoveReference(ns);
  1439     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one    
  1422     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one    
  1440 	}
  1423 	}
  1441 
  1424 
  4675     
  4658     
  4676     CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(mainHeap)));
  4659     CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(mainHeap)));
  4677 
  4660 
  4678     err = User::LoadLogicalDevice(KDisplayChannelLdd);
  4661     err = User::LoadLogicalDevice(KDisplayChannelLdd);
  4679     RDisplayChannel testChannel;
  4662     RDisplayChannel testChannel;
  4680     if (err == KErrNone || err == KErrAlreadyExists)
  4663     User::LeaveIfError(testChannel.Open(0));
  4681         {
       
  4682         User::LeaveIfError(testChannel.Open(0));
       
  4683         }
       
  4684     
  4664     
  4685     TSurfaceId testId;
  4665     TSurfaceId testId;
  4686     SymbianStreamType ns;
  4666     SymbianStreamType ns;
  4687     TUidPixelFormat testGuids[] = {EUidPixelFormatARGB_8888_PRE, EUidPixelFormatRGB_888, EUidPixelFormatRGB_565, EUidPixelFormatRGB_332};
  4667     TUidPixelFormat testGuids[] = {EUidPixelFormatARGB_8888_PRE, EUidPixelFormatRGB_888, EUidPixelFormatRGB_565, EUidPixelFormatRGB_332};
  4688     TInt size = sizeof(testGuids) / sizeof(testGuids[0]);
  4668     TInt size = sizeof(testGuids) / sizeof(testGuids[0]);
  4696 
  4676 
  4697     // For header variables before flipping
  4677     // For header variables before flipping
  4698     TInt32 preFlipWidth = 0;
  4678     TInt32 preFlipWidth = 0;
  4699     TInt32 preFlipHeight = 0;
  4679     TInt32 preFlipHeight = 0;
  4700     TInt32 preFlipStreamStride = 0;
  4680     TInt32 preFlipStreamStride = 0;
  4701     TInt32 preFlipStreamFormat = EUidPixelFormatUnknown;
  4681     TUidPixelFormat preFlipStreamFormat = EUidPixelFormatUnknown;
  4702     TInt32 preFlipStreamPixelSize = 0;
  4682     TInt32 preFlipStreamPixelSize = 0;
  4703     
  4683     
  4704     // For header variables after flipping
  4684     // For header variables after flipping
  4705     TInt32 width = 0;
  4685     TInt32 width = 0;
  4706     TInt32 height = 0;
  4686     TInt32 height = 0;
  4707     TInt32 streamStride = 0;
  4687     TInt32 streamStride = 0;
  4708     TInt32 streamFormat = EUidPixelFormatUnknown;
  4688     TUidPixelFormat streamFormat = EUidPixelFormatUnknown;
  4709     TInt32 streamPixelSize = 0;
  4689     TInt32 streamPixelSize = 0;
  4710     
  4690     
  4711     for (TInt ii = 0; ii < size; ii++)
  4691     for (TInt ii = 0; ii < size; ii++)
  4712         {
  4692         {
  4713         HAL::Get(0, HALData::EDisplayMode, halMode);
  4693         HAL::Get(0, HALData::EDisplayMode, halMode);
  4764         HAL::Get(0, HALData::EDisplayOffsetBetweenLines, halStride);
  4744         HAL::Get(0, HALData::EDisplayOffsetBetweenLines, halStride);
  4765         SymbianStreamGetHeader(ns, &width, &height, &streamStride, &streamFormat, &streamPixelSize);
  4745         SymbianStreamGetHeader(ns, &width, &height, &streamStride, &streamFormat, &streamPixelSize);
  4766         
  4746         
  4767         ASSERT_EQUALS(preFlipWidth, height);
  4747         ASSERT_EQUALS(preFlipWidth, height);
  4768         ASSERT_EQUALS(preFlipHeight, width);
  4748         ASSERT_EQUALS(preFlipHeight, width);
  4769         ASSERT_EQUALS((TInt32)preFlipStreamFormat,(TInt32)streamFormat);
  4749         ASSERT_EQUALS(preFlipStreamFormat, streamFormat);
  4770         ASSERT_TRUE(streamStride == halStride);
  4750         ASSERT_TRUE(streamStride == halStride);
  4771         ASSERT_EQUALS(preFlipStreamPixelSize, streamPixelSize); 
  4751         ASSERT_EQUALS(preFlipStreamPixelSize, streamPixelSize); 
  4772             
  4752             
  4773         SymbianStreamGetHeader(ns, NULL, NULL, NULL, NULL, NULL);
  4753         SymbianStreamGetHeader(ns, NULL, NULL, NULL, NULL, NULL);
  4774         // Clearing the flip flag
  4754         // Clearing the flip flag
  4783         }
  4763         }
  4784     
  4764     
  4785     testChannel.Close();
  4765     testChannel.Close();
  4786     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
  4766     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
  4787     }
  4767     }
  4788 
       
  4789 /*
       
  4790 @SYMTestCaseID          GFX_OPENWFC_NATIVESTREAM_0143
       
  4791 @SYMTestCaseDesc        Call eglsync helper functions
       
  4792 @SYMREQ                 
       
  4793 @SYMPREQ                
       
  4794 @SYMTestType            
       
  4795 @SYMTestPriority        Low
       
  4796 @SYMTestPurpose         Make calls of eglsync helper functions for coverage results                     
       
  4797 @SYMTestActions 
       
  4798         Make calls of eglsync helper functions 
       
  4799 @SYMTestExpectedResults
       
  4800         Test should pass without errors
       
  4801  */
       
  4802 void CTestNativeStream::GRAPHICS_OPENWFC_NATIVESTREAM_0143L()
       
  4803     {
       
  4804     // This test is commented out because it won't build for Bullseye.
       
  4805 #ifdef EGLSYNCHELPER_INCLUDED
       
  4806     INFO_PRINTF1(_L("Test of egl sync helper functions"));
       
  4807 
       
  4808     RHeap* mainHeap = COpenWfcStreamMap::InstanceL().GetMainHeap();
       
  4809     TRAPD(err, GrowCleanupStackL());
       
  4810     ASSERT_TRUE(err == KErrNone);
       
  4811     
       
  4812     CleanupStack::PushL(TCleanupItem(PopHeap, User::SwitchHeap(mainHeap)));
       
  4813 
       
  4814     EGLDisplay eglDisplay;
       
  4815     eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
       
  4816     ASSERT_FALSE(eglDisplay == EGL_NO_DISPLAY);
       
  4817     ASSERT_FALSE(eglDisplay == EGL_BAD_ALLOC);
       
  4818     ASSERT_EQUALS(eglGetError(),EGL_SUCCESS);
       
  4819     eglInitialize(eglDisplay, NULL, NULL);
       
  4820     ASSERT_EQUALS(eglGetError(),EGL_SUCCESS);
       
  4821 
       
  4822     EGLint attrib_list[1] = {EGL_NONE};
       
  4823     EGLSyncKHR sync;
       
  4824     sync = eglCreateSyncKHR(eglDisplay,EGL_SYNC_REUSABLE_KHR, attrib_list);
       
  4825     ASSERT_NOT_EQUALS(sync,EGL_NO_SYNC_KHR);
       
  4826     ASSERT_EQUALS(eglGetError(),EGL_SUCCESS);
       
  4827 
       
  4828     eglSignalSyncKHR(eglDisplay, sync, EGL_SIGNALED_KHR);
       
  4829     eglGetSyncAttribKHR(eglDisplay, sync, NULL, NULL);
       
  4830     eglClientWaitSyncKHR(eglDisplay, sync, 0, 0);
       
  4831     
       
  4832     EGLBoolean eglSyncError = eglDestroySyncKHR(eglDisplay, sync);
       
  4833     sync = EGL_NO_SYNC_KHR;
       
  4834     if (eglSyncError != EGL_TRUE)
       
  4835         {
       
  4836         INFO_PRINTF2(_L("TearDown: eglSyncError line %d"),__LINE__);
       
  4837         }
       
  4838     CleanupStack::PopAndDestroy(); // switch the heap back to current thread's one
       
  4839 #endif
       
  4840     }
       
  4841 
       
  4842 /*
       
  4843 @SYMTestCaseID          GFX_OPENWFC_NATIVESTREAM_0144
       
  4844 @SYMTestCaseDesc        Panic test
       
  4845 @SYMREQ                 
       
  4846 @SYMPREQ                
       
  4847 @SYMTestType            
       
  4848 @SYMTestPriority        Low
       
  4849 @SYMTestPurpose         Test that will cause a panic.               
       
  4850 @SYMTestActions 
       
  4851         Aquire a symbian stream by passing in a NULL ns
       
  4852 @SYMTestExpectedResults
       
  4853         Test should panic with the expected panic code 1000008
       
  4854 */
       
  4855 void CTestNativeStream::GRAPHICS_OPENWFC_NATIVESTREAM_0144L()
       
  4856     {
       
  4857     INFO_PRINTF1(_L("Panic test. The expected panic code is 1000008"));
       
  4858     
       
  4859     SymbianStreamBuffer bufferHandle;
       
  4860     // Pass in a NULL ns will cause panic EOwfSymbianStreamBadArgument (1000008)
       
  4861     SymbianStreamAcquireReadBuffer(NULL, &bufferHandle);
       
  4862     }