Revision: 201007 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:45:41 +0200
branchRCL_3
changeset 19 ac96196b945c
parent 18 5e30ef2e26cb
child 26 15986eb6c500
Revision: 201007 Kit: 201010
graphicstest/graphicstestharness/src/TTMSGraphicsStep.cpp
windowing/windowserver/SERVER/openwfc/panics.h
windowing/windowserver/nga/SERVER/openwfc/CLIENT.CPP
windowing/windowserver/nga/SERVER/openwfc/wnredraw.cpp
windowing/windowserver/tcsc/resources/wsini_csc_nga.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_changetracking.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_h6.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_naviengine.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga_changetracking.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_vga.ini
windowing/windowserver/tcsc/resources/wsini_csc_nga_vga_changetracking.ini
windowing/windowserver/test/scripts/wstest_config.cmd
--- a/graphicstest/graphicstestharness/src/TTMSGraphicsStep.cpp	Fri Mar 12 15:50:05 2010 +0200
+++ b/graphicstest/graphicstestharness/src/TTMSGraphicsStep.cpp	Mon Mar 15 12:45:41 2010 +0200
@@ -32,20 +32,19 @@
 void CTTMSGraphicsStep::CleanUpAndWriteResults()
 	{
 	TBuf<256> testID;
-	TBuf<8> unusableTestResult;    //In graphicstestharness it is not known whether the test was started with
-                                   //!Result=Fail or !Error=KErrSomething given as paramenter to RUN_TEST_STEP
+	TBuf<8> testResult;
 	
 	for (TInt iArrayIndex=0; iArrayIndex < iArrayTMSData.Count(); iArrayIndex++)
 		{
 		CTMSDataColumn columnData = iArrayTMSData[iArrayIndex];
 		
 		testID.Copy(columnData.iTheID);
-		unusableTestResult.Copy(columnData.iTheResult); //unusable because we don't know if the test is expected to pass or fail
+		testResult.Copy(columnData.iTheResult);
 		
 		INFO_PRINTF2(_L("START_TESTCASE %S"),&testID);
 		INFO_PRINTF2(_L("Line = 1 Command = START_TESTCASE %S"),&testID);
 		INFO_PRINTF2(_L("END_TESTCASE %S"),&testID);
-		INFO_PRINTF2(_L("Line = 1 Command = END_TESTCASE %S"),&testID);
+		INFO_PRINTF3(_L("Line = 1 Command = END_TESTCASE %S ***TestCaseResult = %S"),&testID,&testResult);
 		}
 	
 	iArrayTMSData.Close();		    
--- a/windowing/windowserver/SERVER/openwfc/panics.h	Fri Mar 12 15:50:05 2010 +0200
+++ b/windowing/windowserver/SERVER/openwfc/panics.h	Mon Mar 15 12:45:41 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2003-2010 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"
@@ -162,6 +162,7 @@
 	EWsPanicInvalidRotation = 127,			//Invalid rotation used
 	EWsPanicInvalidPointerOffset = 128,      //The pointer offset value in wsini.ini is invalid.
 	EWsPanicArrayInsertFailed = 129,	//Array insert failed.           
+	EWsPanicCompleteNullMessage = 130,		//RMessage2 is NULL prior to calling Complete().
 	};
 
 void Panic(TWservPanic aPanic);
--- a/windowing/windowserver/nga/SERVER/openwfc/CLIENT.CPP	Fri Mar 12 15:50:05 2010 +0200
+++ b/windowing/windowserver/nga/SERVER/openwfc/CLIENT.CPP	Mon Mar 15 12:45:41 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1994-2010 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"
@@ -1217,7 +1217,7 @@
 				iInternalFlags|=ERemoveKeyCode;
 			break;
 		case EWsClOpSimulateXyInput:
-			TWsPointer::SetXyInputType(*pData.XyInput);
+			TWsPointer::SetXyInputType(static_cast<TXYInputType>(*pData.XyInput));
 			break;
 #endif
 		case EWsClOpNoFlickerFree:
@@ -1844,23 +1844,28 @@
 
 void CWsClient::CompleteMessage(const RMessage2& aMessage,TInt aReason)
 	{
-	WS_ASSERT_DEBUG(!aMessage.IsNull(),EWsPanicPanicFlagError);
-	if (iInternalFlags&EPanicClientAsSoonAsPossible)
+	WS_ASSERT_DEBUG(!aMessage.IsNull(),EWsPanicCompleteNullMessage);
+	// This defensive check should not be necessary as aMessage should never
+	// be null, but in rare situations it is and WServ would die without this check.
+	if (!aMessage.IsNull())
 		{
-		aMessage.Panic(KWSERVSessionPanicCategory,iPanicReason);
-		iInternalFlags&=~EPanicClientAsSoonAsPossible;
-		}
-	else
-		{
-		if(!iResponseHandle)
-			aMessage.Complete(aReason);
+		if (iInternalFlags&EPanicClientAsSoonAsPossible)
+			{
+			aMessage.Panic(KWSERVSessionPanicCategory,iPanicReason);
+			iInternalFlags&=~EPanicClientAsSoonAsPossible;
+			}
 		else
 			{
-			aMessage.Complete(*iResponseHandle);
-			iResponseHandle=NULL;
+			if(!iResponseHandle)
+				aMessage.Complete(aReason);
+			else
+				{
+				aMessage.Complete(*iResponseHandle);
+				iResponseHandle=NULL;
+				}
 			}
 		}
-	}
+    }
 
 void CWsClient::ServiceError(const RMessage2& /*aMessage*/,TInt aError)
 	{
--- a/windowing/windowserver/nga/SERVER/openwfc/wnredraw.cpp	Fri Mar 12 15:50:05 2010 +0200
+++ b/windowing/windowserver/nga/SERVER/openwfc/wnredraw.cpp	Mon Mar 15 12:45:41 2010 +0200
@@ -252,13 +252,18 @@
 
 	for (CWsSpriteBase * sprite = iWsWin->iSpriteList; sprite; sprite = sprite->Next())
 		{
+        TBool hasRedrawBegun = EFalse;
 		STACK_REGION redrawRegion;
 		sprite->CalcRedrawRegion(aRegion, redrawRegion);
 		if(redrawRegion.CheckError() || !redrawRegion.IsEmpty())
 			{
 			if (sprite->IsFlashingEnabled() || sprite->IsDirty() || sprite->HasAnimation())
 				{
-				AnnotateSpriteRedrawStart(*iWsWin, *sprite, redrawRegion);
+                if (sprite->IsDirty() || sprite->HasAnimation())
+                    {
+                    AnnotateSpriteRedrawStart(*iWsWin, *sprite, redrawRegion);
+                    hasRedrawBegun = ETrue;
+                    }
 				
 				if(sprite->HasAnimation())
 					{
@@ -276,10 +281,16 @@
 					}
 				
 				//...call Redraw on the sprite
-				aGc->Reset();
+				if (hasRedrawBegun)
+				    {
+                    aGc->Reset();
+				    }
 				sprite->Redraw(aGc, redrawRegion);
 				
-				AnnotateSpriteRedrawEnd(*iWsWin, *sprite);
+				if (hasRedrawBegun)
+				    {
+                    AnnotateSpriteRedrawEnd(*iWsWin, *sprite);
+				    }
 				}
 			}
 		redrawRegion.Close();
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_changetracking.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_h6.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_naviengine.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_qvga_changetracking.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_vga.ini has changed
Binary file windowing/windowserver/tcsc/resources/wsini_csc_nga_vga_changetracking.ini has changed
--- a/windowing/windowserver/test/scripts/wstest_config.cmd	Fri Mar 12 15:50:05 2010 +0200
+++ b/windowing/windowserver/test/scripts/wstest_config.cmd	Mon Mar 15 12:45:41 2010 +0200
@@ -2,7 +2,7 @@
 rem Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
+rem under the terms of the License "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
@@ -17,12 +17,11 @@
 rem
 set nonnga=false
 if not defined EPOC_INI set EPOC_INI=\epoc32\data\epoc.ini
-if /i "%1"=="uninstall" goto :uninstall
-if /i "%2"=="changetracking" goto :install_changetracking
 if /i "%2"=="nonnga" set nonnga=true
 if /i "%3"=="nonnga" set nonnga=true
 if "%nonnga%"=="true" echo Configuring for Non-NGA
-
+if /i "%1"=="uninstall" goto :uninstall
+if /i "%2"=="changetracking" goto :install_changetracking
 rem ================ install ================
 
 :install
@@ -34,36 +33,22 @@
 	call :doinstall %EMULATOR_DATA_DIR% multiscreen %2 %3
 )
 
-rem Restore EPOC.INI from backup
-if exist %EPOC_INI%.backup xcopy /r /y %EPOC_INI%.backup %EPOC_INI% >nul
+echo If EPOC.INI isn't already backuped then backup EPOC.INI to EPOC.INI.bak
+if not exist %EPOC_INI%.bak copy /y %EPOC_INI% %EPOC_INI%.bak
 
-echo Backing up EPOC.INI.
-if not exist %EPOC_INI%.backup copy %EPOC_INI% %EPOC_INI%.backup >nul
-
-echo --------------------------------------------------------------
-echo original epoc.ini: %EPOC_INI%
-type %EPOC_INI%
-echo --------------------------------------------------------------
 echo Editing EPOC.INI to use multiscreen.
 echo. >> %EPOC_INI%
 echo StartupMode ^7>> %EPOC_INI%
 echo _NewScreen_ >> %EPOC_INI%
 echo ScreenWidth 640 >> %EPOC_INI%
 echo ScreenHeight 240 >> %EPOC_INI%
-
-echo --------------------------------------------------------------
-echo new epoc.ini: %EPOC_INI%
-type %EPOC_INI%
-echo --------------------------------------------------------------
-
 goto :EOF
 
 
-
 :doinstall
-rem Back up WSINI.INI
-if not exist %1\z\system\data\wsini.bak if exist %1\z\system\data\wsini.ini copy %1\z\system\data\wsini.ini %1\z\system\data\wsini.bak >nul
-if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
+rem If WSINI.INI(s) aren't already backuped then backup WSINI.INI(s)
+if not exist %1\z\system\data\wsini.bak   if exist %1\z\system\data\wsini.ini   copy /y %1\z\system\data\wsini.ini   %1\z\system\data\wsini.bak >nul
+if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy /y %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
 
 rem Back up ECONS.DLL
 if exist %1\econs.dll copy /y %1\econs.dll %1\econs-temp.dll
@@ -73,24 +58,21 @@
 
 rem Replace WSINI.INI with test version
 if "%nonnga%"=="true" goto :doinstall_nonnga
-if exist %1\z\system\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen.ini %1\z\system\data\wsini.ini >nul
-if exist %1\z\resource\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen.ini %1\z\resource\data\wsini.ini >nul
+if exist %1\z\system\data\wsini.ini   copy /y %1\z\wstest\wservu_multiscreen.ini %1\z\system\data\wsini.ini
+if exist %1\z\resource\data\wsini.ini copy /y %1\z\wstest\wservu_multiscreen.ini %1\z\resource\data\wsini.ini
 goto :doinstall_editwsini
 
 :doinstall_nonnga
-if exist %1\z\system\data\wsini.ini xcopy /r /y \graphics\wserv\group\wservu_multiscreen-nonnga.ini %1\z\system\data\wsini.ini >nul
-if exist %1\z\resource\data\wsini.ini xcopy /r /y \graphics\wserv\group\wservu_multiscreen-nonnga.ini %1\z\resource\data\wsini.ini >nul
+if exist %1\z\system\data\wsini.ini   copy /y %1\z\wstest\wservu_multiscreen-nonnga.ini %1\z\system\data\wsini.ini
+if exist %1\z\resource\data\wsini.ini copy /y %1\z\wstest\wservu_multiscreen-nonnga.ini %1\z\resource\data\wsini.ini
 
 :doinstall_editwsini
 rem Edit WSINI.INI to run tests automatically/multiscreen
-if exist %1\z\system\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
+if exist %1\z\system\data\wsini.ini   perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
 if exist %1\z\resource\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\resource\data\wsini.ini %2 %3 %4
 
 goto :EOF
 
-
-
-
 rem ================ install changetracking ================
 
 :install_changetracking
@@ -102,16 +84,8 @@
 	call :doinstall_changetracking %EMULATOR_DATA_DIR% multiscreen %2 %3
 )
 
-rem Restore EPOC.INI from backup
-if exist %EPOC_INI%.backup xcopy /r /y %EPOC_INI%.backup %EPOC_INI% >nul
-
-echo Backing up EPOC.INI.
-if not exist %EPOC_INI%.backup copy %EPOC_INI% %EPOC_INI%.backup >nul
-
-echo --------------------------------------------------------------
-echo original epoc.ini: %EPOC_INI%
-type %EPOC_INI%
-echo --------------------------------------------------------------
+echo If EPOC.INI isn't already backuped then backup EPOC.INI to EPOC.INI.bak
+if not exist %EPOC_INI%.bak copy /y %EPOC_INI% %EPOC_INI%.bak >nul
 
 echo Editing EPOC.INI to use multiscreen.
 echo. >> %EPOC_INI%
@@ -119,11 +93,6 @@
 echo _NewScreen_ >> %EPOC_INI%
 echo ScreenWidth 640 >> %EPOC_INI%
 echo ScreenHeight 240 >> %EPOC_INI%
-echo --------------------------------------------------------------
-echo new epoc.ini: %EPOC_INI%
-type %EPOC_INI%
-echo --------------------------------------------------------------
-
 goto :EOF
 
 :doinstall_changetracking
@@ -135,12 +104,12 @@
 if exist %1\wsecons.dll copy /y %1\wsecons.dll %1\econs.dll
 
 rem Back up WSINI.INI
-if not exist %1\z\system\data\wsini.bak if exist %1\z\system\data\wsini.ini copy %1\z\system\data\wsini.ini %1\z\system\data\wsini.bak >nul
-if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
+if not exist %1\z\system\data\wsini.bak   if exist %1\z\system\data\wsini.ini   copy /y %1\z\system\data\wsini.ini %1\z\system\data\wsini.bak >nul
+if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy /y %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
 
 rem Replace WSINI.INI with test changetracking version
-if exist %1\z\system\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\system\data\wsini.ini >nul
-if exist %1\z\resource\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\resource\data\wsini.ini >nul
+if exist %1\z\system\data\wsini.ini   copy /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\system\data\wsini.ini >nul
+if exist %1\z\resource\data\wsini.ini copy /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\resource\data\wsini.ini >nul
 
 rem Edit WSINI.INI to run tests automatically/multiscreen
 if exist %1\z\system\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
@@ -159,15 +128,27 @@
 	call :douninstall %EMULATOR_DATA_DIR%
 )
 
-echo Restoring EPOC.INI.
-if exist %EPOC_INI%.backup xcopy /r /y %EPOC_INI%.backup %EPOC_INI% >nul
+echo If EPOC.INI was already backuped then restore EPOC.INI from EPOC.INI.bak
+if exist %EPOC_INI%.bak (
+	echo Restore EPOC.INI from backup
+	copy /y %EPOC_INI%.bak %EPOC_INI% >nul
+	del /f /q %EPOC_INI%.bak >nul
+)
 goto :EOF
 
 
 :douninstall
-rem Restore WSINI.INI
-if exist %1\z\system\data\wsini.bak   xcopy /r /y %1\z\system\data\wsini.bak   %1\z\system\data\wsini.ini >nul
-if exist %1\z\resource\data\wsini.bak xcopy /r /y %1\z\resource\data\wsini.bak %1\z\resource\data\wsini.ini >nul
+
+rem If WSINI.INI(s) were already backuped then restore WSINI.INI
+if exist %1\z\system\data\wsini.bak (
+copy /y %1\z\system\data\wsini.bak   %1\z\system\data\wsini.ini >nul
+del  /f /q %1\z\system\data\wsini.bak >nul
+)
+if exist %1\z\resource\data\wsini.bak (
+copy /y %1\z\resource\data\wsini.bak %1\z\resource\data\wsini.ini >nul
+del  /f /q %1\z\resource\data\wsini.bak >nul
+)
+
 echo Restoring backedup ECONS.DLL
 if exist %1\econs-temp.dll copy /y %1\econs-temp.dll %1\econs.dll
 goto :EOF