graphicshwdrivers/surfacemgr/test/src/tsurfacemanager.cpp
branchRCL_3
changeset 164 25ffed67c7ef
parent 163 bbf46f59e123
--- a/graphicshwdrivers/surfacemgr/test/src/tsurfacemanager.cpp	Tue Aug 31 16:31:06 2010 +0300
+++ b/graphicshwdrivers/surfacemgr/test/src/tsurfacemanager.cpp	Wed Sep 01 12:39:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -21,7 +21,6 @@
  @internalComponent - Internal Symbian test code
 */
 
-
 #include "tsurfacemanager.h"
 #include <e32base.h>
 #include <e32cons.h>
@@ -30,9 +29,6 @@
 #include <e32cmn.h>	  
 #include <hal.h>
 #include <e32def_private.h>
-#include <graphics/surface_hints.h>
-
-using namespace surfaceHints;
 
 const TInt KCountLimit = 10000;
 
@@ -1246,10 +1242,7 @@
 
 	//contiguous attribute is not valid on emulator
 #ifndef __WINS__
-	if(attributes.iContiguous)
-	    TEST(iInfo.iContiguous == attributes.iContiguous);
-	else
-	    INFO_PRINTF1(_L("We didn't ask for contiguous memory so we don't care how it's going to be (can be contiguous or not)\n"));
+	TEST(iInfo.iContiguous == attributes.iContiguous);
 #else
 	INFO_PRINTF1(_L("Contiguous attribute test is not valid on emulator\n"));
 #endif
@@ -1376,10 +1369,7 @@
 	TEST(aAttributes.iBuffers==iInfo.iBuffers);
 	TEST(aAttributes.iPixelFormat==iInfo.iPixelFormat);
 	TEST(aAttributes.iStride==iInfo.iStride);
-    if(aAttributes.iContiguous)
-        TEST(iInfo.iContiguous == aAttributes.iContiguous);
-    else
-        INFO_PRINTF1(_L("We didn't ask for contiguous memory so we don't care how it's going to be (can be contiguous or not)\n"));	
+	TEST(aAttributes.iContiguous==iInfo.iContiguous);
 	TEST(aAttributes.iCacheAttrib==iInfo.iCacheAttrib);
 	
 	//Test the chunk size is big enough to hold the surface when we create it 
@@ -3192,32 +3182,36 @@
 	
 	//Add HintPair1
 	RSurfaceManager::THintPair hintPair1;
-	hintPair1.Set(TUid::Uid(KSurfaceContent), EStillImage, ETrue);
+	hintPair1.iKey.iUid = 0x123257;
+	hintPair1.iValue = 300;
+	hintPair1.iMutable = ETrue;
 	TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair1));
 	
 	RSurfaceManager::THintPair hintPairCheck1;
-	hintPairCheck1.iKey.iUid = KSurfaceContent;
+	hintPairCheck1.iKey.iUid = 0x123257;
 	CheckHintPair(surfaceId, hintPairCheck1, hintPair1);
 	
 	//Add HintPair2
 	RSurfaceManager::THintPair hintPair2;
-	hintPair2.iKey.iUid = KSurfaceProtection;
-	hintPair2.iValue = EAllowAnalog | EAllowDigital;
+	hintPair2.iKey.iUid = 0x123267;
+	hintPair2.iValue = 100;
 	hintPair2.iMutable = EFalse;
 	TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair2));
 		
 	RSurfaceManager::THintPair hintPairCheck2;
-	hintPairCheck2.iKey.iUid = KSurfaceProtection;
+	hintPairCheck2.iKey.iUid = 0x123267;
 	CheckHintPair(surfaceId, hintPairCheck2, hintPair2);
 	CheckHintPair(surfaceId, hintPairCheck1, hintPair1);
 
 	//Add HintPair3
 	RSurfaceManager::THintPair hintPair3;
-	hintPair3.Set(TUid::Uid(KSurfaceCharacteristics), ENotPersistable, EFalse);
+	hintPair3.iKey.iUid = 0x123324;
+	hintPair3.iValue = 500;
+	hintPair3.iMutable = ETrue;
 	TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair3));
 	
 	RSurfaceManager::THintPair hintPairCheck3;
-	hintPairCheck3.iKey.iUid = KSurfaceCharacteristics;
+	hintPairCheck3.iKey.iUid = 0x123324;
 	CheckHintPair(surfaceId, hintPairCheck3, hintPair3);
 	CheckHintPair(surfaceId, hintPairCheck2, hintPair2);
 	CheckHintPair(surfaceId, hintPairCheck1, hintPair1);