fbs/fontandbitmapserver/tfbs/tipctest.CPP
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:39:21 +0100
branchRCL_3
changeset 164 25ffed67c7ef
parent 163 bbf46f59e123
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201029 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
// All rights reserved.
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
//
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
// Initial Contributors:
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
//
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
// Contributors:
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
//
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
// Description:
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
//
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    16
#include "fbsmessage.h"
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
#include "../sfbs/UTILS.H"
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include "tipctest.h"
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#include "fbsdefs.h"
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
CTIPCTest::CTIPCTest(CTestStep* aStep):
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
	CTGraphicsBase(aStep),
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
	iFbs(NULL),
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
	iFs(NULL)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
	{}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
CTIPCTest::~CTIPCTest()
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
	if(iShutdownFbs)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
		RFbsSession::GetSession()->SendCommand(EFbsMessShutdown);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
	RFbsSession::Disconnect();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
	delete iFs;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
	iHeap->Close();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
void CTIPCTest::ConstructL()
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
	INFO_PRINTF1(_L("Font/Bitmap Server IPC Messages Testing"));
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
	if(RFbsSession::Connect()==KErrNone)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
		{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
		RFbsSession::Disconnect();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
		iShutdownFbs = EFalse;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
		}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
	else
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
		{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
		FbsStartup();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
		iShutdownFbs = ETrue;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
		}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
	RFbsSession::Connect();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
	iFbs=RFbsSession::GetSession();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
	if(!iShutdownFbs)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
		{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
		if(iClient.Connect() == KErrNone)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
			{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
			iShutdownFbs = EFalse;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
			}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
		else
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
			{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
			iShutdownFbs = ETrue;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
			}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
		}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
		
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
	iHeap=UserHeap::ChunkHeap(NULL,0x10000,0x10000);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
	TRAPD(ret,iFs=CFontStore::NewL(iHeap));
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
	TEST(ret==KErrNone);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
	TEST(iFs != NULL);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    73
/**
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    74
	@SYMTestCaseID
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    75
	GRAPHICS-FBSERV-0603
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    76
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    77
	@SYMTestCaseDesc
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    78
	Tests the sending of commands to a FbsSession 
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    79
	server thru Inter Process Communication. Sends
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    80
	both valid and invalid commands.
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    81
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    82
	@SYMTestActions
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    83
	Commands sent to the server:
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    84
	1. EFbsMessShutdown
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    85
	2. EFbsMessFontHeightInTwips
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    86
	3. EFbsMessFontHeightInTwips
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    87
	4. EFbsMessFontHeightInPixels
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    88
	5. EFbsMessFontHeightInPixels
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    89
	6. EFbsMessAddFontStoreFile
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    90
	7. EFbsMessAddFontStoreFile
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    91
	8. EFbsMessInstallFontStoreFile
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    92
	9. EFbsMessInstallFontStoreFile
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    93
	10. EFbsMessInstallFontStoreFile
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    94
	11. EFbsMessBitmapCreate
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    95
	12. EFbsMessRasterize
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    96
	13. EFbsMessFaceAttrib
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    97
	14. EFbsMessHasCharacter
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    98
	15. EFbsMessFontNameAlias
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
    99
	16. EFbsMessGetNearestFontToDesignHeightInTwips
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   100
	17. EFbsMessGetNearestFontToMaxHeightInTwips
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   101
	18. EFbsMessGetNearestFontToDesignHeightInPixels
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   102
	19. EFbsMessGetNearestFontToMaxHeightInPixels
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   103
	20. EFbsMessShapeText
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   104
	21. EFbsMessShapeDelete
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   105
	22. EFbsMessSetTwipsHeight
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   106
	23. EFbsMessGetTwipsHeight	
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   107
	
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   108
	@SYMTestExpectedResults
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   109
	Test should pass
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   110
*/
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
void CTIPCTest::RunTestCaseL(TInt aCurTestCase)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
	_LIT(KCaseNumber, "CaseNumber");
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   115
	TBool res = iStep->GetIntFromConfig(iStep->ConfigSection(), KCaseNumber, aCurTestCase);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   116
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
	if(!res)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   118
		{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
		return;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   120
		}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   121
		
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
	switch(aCurTestCase)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
		{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
	case 1:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   125
		INFO_PRINTF1(_L("Shutdown\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   126
		iFbs->SendCommand(EFbsMessShutdown);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
	case 2:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   130
		INFO_PRINTF1(_L("Height in twips with negative typeface index\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   131
		iFbs->SendCommand(EFbsMessFontHeightInTwips, -1);	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   132
		TEST(EFalse); // Previous line should have paniced 
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   133
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
		break;	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   135
	case 3:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   136
		INFO_PRINTF1(_L("Height in twips with invalid size\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   137
		iClient.SendInvalidSize(EFbsMessFontHeightInTwips);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   139
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   140
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
	case 4:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   142
		INFO_PRINTF1(_L("Height in pixels with negative typeface index\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
		iFbs->SendCommand(EFbsMessFontHeightInPixels, -1);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
	case 5:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   148
		INFO_PRINTF1(_L("Height in pixels with invalid size\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
		iClient.SendInvalidSize(EFbsMessFontHeightInPixels);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   150
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   152
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   153
	case 6:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   154
		INFO_PRINTF1(_L("Add font store file with negative length\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
		iFbs->SendCommand(EFbsMessAddFontStoreFile, 0, -1);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   158
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
	case 7:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   160
		INFO_PRINTF1(_L("Add font store file with huge length\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   161
		iFbs->SendCommand(EFbsMessAddFontStoreFile, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   162
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   163
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   164
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
	case 8:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   166
		INFO_PRINTF1(_L("Install font store file with negative length\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
		iFbs->SendCommand(EFbsMessInstallFontStoreFile, 0, -1);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   168
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   169
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   171
	case 9:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   172
		INFO_PRINTF1(_L("Install font store file with huge length\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   173
		iFbs->SendCommand(EFbsMessInstallFontStoreFile, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
	case 10:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   178
		INFO_PRINTF1(_L("Remove font store file with active references\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
		iFbs->SendCommand(EFbsMessRemoveFontStoreFile, 11);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
		// With PDEF121246 (INC120690) fix in place, this test will always pass. Without the fix there will be a KERN 4 panic.
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
		TEST(ETrue); 
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
	case 11:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   185
		INFO_PRINTF1(_L("Bitmap create with invalid display mode\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
		iClient.SendInvalidDisplayMode(EFbsMessBitmapCreate);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
	case 12:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   191
		INFO_PRINTF1(_L("Rasterize with invalid bitmap handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   192
		iFbs->SendCommand(EFbsMessRasterize, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   194
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   195
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   196
	case 13:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   197
		INFO_PRINTF1(_L("Face Attribute with invalid bitmap handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   198
		iFbs->SendCommand(EFbsMessFaceAttrib, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   200
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
	case 14:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   203
		INFO_PRINTF1(_L("Has Character with invalid bitmap handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   204
		iFbs->SendCommand(EFbsMessHasCharacter, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   205
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   207
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   208
	case 15:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   209
		INFO_PRINTF1(_L("Name Alias with huge alias name length\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   210
		iFbs->SendCommand(EFbsMessFontNameAlias, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   212
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   213
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   214
	case 16:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   215
		INFO_PRINTF1(_L("Get nearest font to design height in twips with invalid typeface name length\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   216
		iClient.SendInvalidNameLength(EFbsMessGetNearestFontToDesignHeightInTwips);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   219
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   220
	case 17:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   221
		INFO_PRINTF1(_L("Get nearest font to max height in twips with invalid typeface name length\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   222
		iClient.SendInvalidNameLength(EFbsMessGetNearestFontToMaxHeightInTwips);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   223
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   224
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   225
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   226
	case 18:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   227
		INFO_PRINTF1(_L("Get nearest font to design height in pixels with invalid typeface name length\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   228
		iClient.SendInvalidNameLength(EFbsMessGetNearestFontToDesignHeightInPixels);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   229
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   230
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   231
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   232
	case 19:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   233
		INFO_PRINTF1(_L("Get nearest font to max height in pixels with invalid typeface name length\r\n"));
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   234
		iClient.SendInvalidNameLength(EFbsMessGetNearestFontToMaxHeightInPixels);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   235
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
	case 20:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   239
		INFO_PRINTF1(_L("Shape text with invalid bitmap font handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   240
		iFbs->SendCommand(EFbsMessShapeText, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   242
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   244
	case 21:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   245
		INFO_PRINTF1(_L("Shape delete with invalid bitmap font handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   246
		iFbs->SendCommand(EFbsMessShapeDelete, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   247
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   248
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   249
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   250
	case 22:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   251
		INFO_PRINTF1(_L("Set twips height with invalid font handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   252
		iFbs->SendCommand(EFbsMessSetTwipsHeight, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   253
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   254
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   255
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   256
	case 23:
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   257
		INFO_PRINTF1(_L("Get twips height with invalid font handle\r\n"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   258
		((CTIPCTestStep*)iStep)->SetOverallTestStepID(_L("GRAPHICS-FBSERV-0603"));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   259
		((CTIPCTestStep*)iStep)->RecordTestResultL();
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   260
		((CTIPCTestStep*)iStep)->CloseTMSGraphicsStep();
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   261
		iFbs->SendCommand(EFbsMessGetTwipsHeight, 963955448, 963955368, 963955300, 963955232);
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   262
		TEST(EFalse);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   263
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   264
		break;	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   265
	case 24:
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   266
		TestComplete();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   267
		break;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   268
		}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
RIPCTestFbservClient::RIPCTestFbservClient()
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   275
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   276
RIPCTestFbservClient::~RIPCTestFbservClient()
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   277
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   278
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   279
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   280
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   281
TInt RIPCTestFbservClient::Connect(void)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   282
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   283
	_LIT(KFbServerName, "!Fontbitmapserver");
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   284
	TVersion version(0, 0, 0);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   285
	TInt ret = CreateSession(KFbServerName, version);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   286
	return ret;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   287
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   288
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   289
void RIPCTestFbservClient::SendInvalidSize(TInt aFunctionNumber)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   290
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   291
	TPckgBuf<TSize> size;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
	size().iHeight = 0;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
	size().iWidth = 0;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   294
	TIpcArgs args;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   295
	args.Set(0, 1);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   296
	args.Set(2, &size);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   297
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   298
	SendReceive(aFunctionNumber, args);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   299
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   300
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   301
void RIPCTestFbservClient::SendInvalidDisplayMode(TInt aFunctionNumber)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   302
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   303
	TPckgBuf<TBmpSpec> bmpSpec;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   304
	bmpSpec().iDispMode = EColorLast;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   305
	TIpcArgs args = TIpcArgs();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   306
	args.Set(0, &bmpSpec);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   307
	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   308
	SendReceive(aFunctionNumber, args);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   309
	}
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   310
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   311
void RIPCTestFbservClient::SendInvalidNameLength(TInt aFunctionNumber)	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   312
	{
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   313
	TIpcArgs args = TIpcArgs();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   314
	_LIT(KDefault, "Default");
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   315
	TInt size = 7;
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   316
	HBufC8 *buf1 = HBufC8::NewLC(size);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   317
	TPtr8 ptr1 = buf1->Des();
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   318
	ptr1.Copy(KDefault);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   319
	CleanupStack::PopAndDestroy(buf1);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   320
	args.Set(0, &ptr1);	
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   321
	SendReceive(aFunctionNumber, args);
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   322
	}
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   323
	
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   324
	
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   325
void CTIPCTest::LoadFontsL(const TDesC& aFontsDir)
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   326
	{
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   327
	RFs fileSys;
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   328
	User::LeaveIfError(fileSys.Connect());
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   329
164
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   330
	TFindFile fileFinder(fileSys);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   331
	CDir* foundFileList = NULL;
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   332
	
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   333
	_LIT(KFBSERVFontFilePattern, "*");
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   334
	TInt findFileComplete = fileFinder.FindWildByDir(KFBSERVFontFilePattern,aFontsDir,foundFileList);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   335
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   336
	TRAPD(addFileError, LoadFontFromFilelistL(findFileComplete, foundFileList, fileFinder));
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   337
	TEST(addFileError == KErrNone);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   338
		
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   339
	fileSys.Close();
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   340
	}
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   341
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   342
void CTIPCTest::LoadFontFromFilelistL(TInt aFindFileComplete, CDir* aFoundFileList, TFindFile& aFileFinder)
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   343
	{
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   344
	TUid id1 = TUid::Uid(0);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   345
	while (!aFindFileComplete)
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   346
		{
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   347
		CleanupStack::PushL(aFoundFileList);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   348
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   349
		const TInt foundFileCount = aFoundFileList->Count();
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   350
		for (TInt i = 0; i < foundFileCount; i++)
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   351
			{			
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   352
			TParse parse;
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   353
			if (parse.Set((*aFoundFileList)[i].iName,&aFileFinder.File(),NULL) == KErrNone)
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   354
				{
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   355
				// Get filename and extension of font proposing to be loaded
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   356
				TPtrC fontFilename = parse.NameAndExt();
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   357
				id1=iFs->AddFileL(parse.FullName());
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   358
				
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   359
				iFs->RemoveFile(KNullUid);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   360
				
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   361
				}
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   362
			}
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   363
		CleanupStack::PopAndDestroy(aFoundFileList); 
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   364
		aFindFileComplete = aFileFinder.FindWild(aFoundFileList);
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   365
		}
25ffed67c7ef Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 163
diff changeset
   366
	}
0
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   367
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   368
//--------------
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   369
__CONSTRUCT_STEP__(IPCTest)
5d03bc08d59c Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   370