sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* T_LinkedFontUpdateTests.cpp
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
#ifndef T_LINKEDFONTUPDATETESTS_H_
|
sl@0
|
20 |
#define T_LINKEDFONTUPDATETESTS_H_
|
sl@0
|
21 |
|
sl@0
|
22 |
#include "TGraphicsHarness.h"
|
sl@0
|
23 |
//Global variables for Linked Font Names
|
sl@0
|
24 |
_LIT(KAddElementFontName, "UpdateAddFont");
|
sl@0
|
25 |
_LIT(KRemoveElementFontName, "UpdateRemoveFont");
|
sl@0
|
26 |
_LIT(KUpdateFontName, "UpdateFont");
|
sl@0
|
27 |
|
sl@0
|
28 |
//Element Names
|
sl@0
|
29 |
_LIT(KElement1Name, "DejaVu Sans Mono");
|
sl@0
|
30 |
_LIT(KElement2Name, "DejaVu Sans Condensed");
|
sl@0
|
31 |
_LIT(KElement3Name, "DejaVu Serif Condensed");
|
sl@0
|
32 |
|
sl@0
|
33 |
//Class for first linked fonts test step
|
sl@0
|
34 |
class CTLinkedFontsUpdateStage1Step : public CTGraphicsStep
|
sl@0
|
35 |
{
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
CTLinkedFontsUpdateStage1Step();
|
sl@0
|
38 |
protected:
|
sl@0
|
39 |
// From CTGraphicsStep
|
sl@0
|
40 |
virtual CTGraphicsBase* CreateTestL();
|
sl@0
|
41 |
};
|
sl@0
|
42 |
|
sl@0
|
43 |
_LIT(KTLinkedFontsUpdateStage1Step, "TLinkedFontsUpdateStage1");
|
sl@0
|
44 |
|
sl@0
|
45 |
class CTLinkedFontsUpdateStage1 : public CTGraphicsBase
|
sl@0
|
46 |
{
|
sl@0
|
47 |
public:
|
sl@0
|
48 |
CTLinkedFontsUpdateStage1(CTestStep* aStep);
|
sl@0
|
49 |
~CTLinkedFontsUpdateStage1();
|
sl@0
|
50 |
static void TestPanic(TInt aPanic);
|
sl@0
|
51 |
protected:
|
sl@0
|
52 |
// From CTGraphicsStep
|
sl@0
|
53 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
sl@0
|
54 |
protected:
|
sl@0
|
55 |
void SetupTestsL();
|
sl@0
|
56 |
void CloseTestsL();
|
sl@0
|
57 |
void RegisterThenUpdateTestL();
|
sl@0
|
58 |
void NegativeUpdateTestsL();
|
sl@0
|
59 |
|
sl@0
|
60 |
private:
|
sl@0
|
61 |
CLinkedTypefaceSpecification* CreateAddTypefaceLC(TBool aUpdate);
|
sl@0
|
62 |
CLinkedTypefaceSpecification* CreateRemoveTypefaceLC(TBool aUpdate);
|
sl@0
|
63 |
CLinkedTypefaceSpecification* CreateUpdateTypefaceLC(TBool aUpdate);
|
sl@0
|
64 |
CLinkedTypefaceSpecification* CreateNegativeTestTypefaceLC(const TDesC& aName);
|
sl@0
|
65 |
void AddGroups(CLinkedTypefaceSpecification* aSpec);
|
sl@0
|
66 |
|
sl@0
|
67 |
private:
|
sl@0
|
68 |
RFbsSession* iFbs;
|
sl@0
|
69 |
CFbsTypefaceStore* iTfStore;
|
sl@0
|
70 |
TBool iFontLinkingSupported;
|
sl@0
|
71 |
};
|
sl@0
|
72 |
|
sl@0
|
73 |
|
sl@0
|
74 |
//Class for second linked fonts test step
|
sl@0
|
75 |
class CTLinkedFontsUpdateStage2Step : public CTGraphicsStep
|
sl@0
|
76 |
{
|
sl@0
|
77 |
public:
|
sl@0
|
78 |
CTLinkedFontsUpdateStage2Step();
|
sl@0
|
79 |
protected:
|
sl@0
|
80 |
// From CTGraphicsStep
|
sl@0
|
81 |
virtual CTGraphicsBase* CreateTestL();
|
sl@0
|
82 |
};
|
sl@0
|
83 |
|
sl@0
|
84 |
_LIT(KTLinkedFontsUpdateStage2Step, "TLinkedFontsUpdateStage2");
|
sl@0
|
85 |
|
sl@0
|
86 |
class CTLinkedFontsUpdateStage2 : public CTGraphicsBase
|
sl@0
|
87 |
{
|
sl@0
|
88 |
public:
|
sl@0
|
89 |
CTLinkedFontsUpdateStage2(CTestStep* aStep);
|
sl@0
|
90 |
~CTLinkedFontsUpdateStage2();
|
sl@0
|
91 |
static void TestPanic(TInt aPanic);
|
sl@0
|
92 |
protected:
|
sl@0
|
93 |
// From CTGraphicsStep
|
sl@0
|
94 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
sl@0
|
95 |
protected:
|
sl@0
|
96 |
void SetupTestsL();
|
sl@0
|
97 |
void CloseTestsL();
|
sl@0
|
98 |
void ValidateLinkedFontsL();
|
sl@0
|
99 |
private:
|
sl@0
|
100 |
RFbsSession* iFbs;
|
sl@0
|
101 |
CFbsTypefaceStore* iTfStore;
|
sl@0
|
102 |
};
|
sl@0
|
103 |
|
sl@0
|
104 |
#endif /*T_LINKEDFONTUPDATETESTS_H_*/
|