First public contribution.
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
21 #if (!defined __RECOGNIZER_STEP_H__)
22 #define __RECOGNIZER_STEP_H__
23 #include <test/testexecutestepbase.h>
27 // Constants used to name test cases
28 _LIT(KCAFRecognizeStep,"CAFRecognizeStep");
29 _LIT(KCAFRecognizerSpeedStep,"CAFRecognizerSpeedStep");
30 _LIT(KCAFBufferSizeStep,"CAFBufferSizeStep");
31 _LIT(KCAFApparcStep,"CAFApparcStep");
32 _LIT(KCAF_DEF077443_Step,"CAF_DEF077443_Step");
33 _LIT(KCAF_DEF078413_Step,"CAF_DEF078413_Step");
36 class CApaDataRecognizerType;
39 * Used to test the CAgentResolver::DoRecognize() function
40 * The ini file used in this test expects the following parameters to be specified
42 * FileName - full path and filename of the file to be investigated
44 * Container - the container mime type expected
46 * Content - the content mime type expected
48 * Recognized - whether or not CAF should recognize this file
50 * If an agent recognizes the file, it fills in what it thinks the container and content mime
51 * types of the file are. The test verifies:
52 * The file was recognized correctly (either recognized, or not recognized)
53 * If it was recognized verify that the container mime type is correct
54 * If it was recognized verify that the content mime type is correct
55 * @internalComponent Exposure internally
57 class CCAFRecognizeStep : public CCAFStep
60 CCAFRecognizeStep(CCAFServer& aParent);
62 virtual TVerdict doTestStepL();
63 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
64 TVerdict doWmdrmTestStepL();
65 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
68 void CheckResultL(TBool aResult, TDes8& aContainerMimeType, TDes8& aContentMimeType, TBool aExpectedResult, TDesC16& aExpectedContainerMime, TDesC16& aExpectedContentMime);
73 * Used to test the speed of the CAgentResolver::DoRecognize() function
74 * Creates and instance of CAgentResolver and calls DoRecognize() 1000 times for the file
75 * specified in the INI file.
76 * The ini file used in this test only needs one parameter specified
78 * FileName - full path and filename of the file to be investigated
80 * Timing information in the TestExecute log file indicates how long this takes
81 * @internalComponent Exposure internally
83 class CCAFRecognizerSpeedStep : public CCAFStep
86 CCAFRecognizerSpeedStep(CCAFServer& aParent);
87 ~CCAFRecognizerSpeedStep ();
88 virtual TVerdict doTestStepL();
95 * Used to test CAgentResolver::PreferredBufferSize() function
96 * CAgentResolver should use the static configuration data in each agent's resource file
97 * to determine the buffer size required for apparc recognition
98 * @internalComponent Exposure internally
100 class CCAFBufferSizeStep : public CCAFStep
103 CCAFBufferSizeStep(CCAFServer& aParent);
104 ~CCAFBufferSizeStep();
105 virtual TVerdict doTestStepL();
112 This test verifys that the CApaCafRecognizer correctly identifies the mime type
113 * The ini file specifies two parameters
115 * FileName - the file to recognize
117 * CafMimeType - the expected mime type returned from RecognizeL()
119 * @internalComponent Exposure internally
121 class CCAFApparcStep : public CCAFStep
124 CCAFApparcStep(CCAFServer& aParent);
126 virtual TVerdict doTestStepL();
132 This test verifies that upper case Mime types can be recognized.
134 * See DEF077443: Propagated:CAF should not be performing case sensitive comparisons on MIME types
136 * @internalComponent Exposure internally
138 class CCAF_DEF077443_Step : public CCAFStep
141 CCAF_DEF077443_Step(CCAFServer& aParent);
142 ~CCAF_DEF077443_Step();
143 virtual TVerdict doTestStepL();