sl@0: /* sl@0: * Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * T_LinkedFontUpdateTests.cpp sl@0: * sl@0: */ sl@0: sl@0: #ifndef T_LINKEDFONTUPDATETESTS_H_ sl@0: #define T_LINKEDFONTUPDATETESTS_H_ sl@0: sl@0: #include "TGraphicsHarness.h" sl@0: //Global variables for Linked Font Names sl@0: _LIT(KAddElementFontName, "UpdateAddFont"); sl@0: _LIT(KRemoveElementFontName, "UpdateRemoveFont"); sl@0: _LIT(KUpdateFontName, "UpdateFont"); sl@0: sl@0: //Element Names sl@0: _LIT(KElement1Name, "DejaVu Sans Mono"); sl@0: _LIT(KElement2Name, "DejaVu Sans Condensed"); sl@0: _LIT(KElement3Name, "DejaVu Serif Condensed"); sl@0: sl@0: //Class for first linked fonts test step sl@0: class CTLinkedFontsUpdateStage1Step : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTLinkedFontsUpdateStage1Step(); sl@0: protected: sl@0: // From CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: }; sl@0: sl@0: _LIT(KTLinkedFontsUpdateStage1Step, "TLinkedFontsUpdateStage1"); sl@0: sl@0: class CTLinkedFontsUpdateStage1 : public CTGraphicsBase sl@0: { sl@0: public: sl@0: CTLinkedFontsUpdateStage1(CTestStep* aStep); sl@0: ~CTLinkedFontsUpdateStage1(); sl@0: static void TestPanic(TInt aPanic); sl@0: protected: sl@0: // From CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: protected: sl@0: void SetupTestsL(); sl@0: void CloseTestsL(); sl@0: void RegisterThenUpdateTestL(); sl@0: void NegativeUpdateTestsL(); sl@0: sl@0: private: sl@0: CLinkedTypefaceSpecification* CreateAddTypefaceLC(TBool aUpdate); sl@0: CLinkedTypefaceSpecification* CreateRemoveTypefaceLC(TBool aUpdate); sl@0: CLinkedTypefaceSpecification* CreateUpdateTypefaceLC(TBool aUpdate); sl@0: CLinkedTypefaceSpecification* CreateNegativeTestTypefaceLC(const TDesC& aName); sl@0: void AddGroups(CLinkedTypefaceSpecification* aSpec); sl@0: sl@0: private: sl@0: RFbsSession* iFbs; sl@0: CFbsTypefaceStore* iTfStore; sl@0: TBool iFontLinkingSupported; sl@0: }; sl@0: sl@0: sl@0: //Class for second linked fonts test step sl@0: class CTLinkedFontsUpdateStage2Step : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTLinkedFontsUpdateStage2Step(); sl@0: protected: sl@0: // From CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: }; sl@0: sl@0: _LIT(KTLinkedFontsUpdateStage2Step, "TLinkedFontsUpdateStage2"); sl@0: sl@0: class CTLinkedFontsUpdateStage2 : public CTGraphicsBase sl@0: { sl@0: public: sl@0: CTLinkedFontsUpdateStage2(CTestStep* aStep); sl@0: ~CTLinkedFontsUpdateStage2(); sl@0: static void TestPanic(TInt aPanic); sl@0: protected: sl@0: // From CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: protected: sl@0: void SetupTestsL(); sl@0: void CloseTestsL(); sl@0: void ValidateLinkedFontsL(); sl@0: private: sl@0: RFbsSession* iFbs; sl@0: CFbsTypefaceStore* iTfStore; sl@0: }; sl@0: sl@0: #endif /*T_LINKEDFONTUPDATETESTS_H_*/