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