common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NonNativeAppsStep.h
author Maciej Seroka <maciejs@symbian.org>
Fri, 27 Nov 2009 12:22:12 +0000
changeset 793 0c32c669a39d
child 872 17498133d9ad
permissions -rw-r--r--
Added new smoke test for phone languages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
793
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     4
// under the terms of the License "Symbian Foundation License v1.0"
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     7
//
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    10
//
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    11
// Contributors:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    12
//
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    13
// Description:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    14
//
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    15
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    16
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    17
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    18
/**
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    19
 @file
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    20
 @test
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    21
 @internalComponent - Internal Symbian test code  
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    22
*/
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    23
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    24
#if (!defined __T_NONNATIVEAPPSTEP_H__)
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    25
#define __T_NONNATIVEAPPSTEP_H__
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    26
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    27
#include <APASERVERAPP.H>
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    28
#include <EIKSERVERAPP.H>
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    29
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    30
#include "ApparcTestServer.h"
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    31
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    32
// RTstFileArray
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    33
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    34
class RTstFileArray
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    35
	{
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    36
public:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    37
	RTstFileArray(TInt aGranularity);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    38
	void Close();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    39
	void AppendL(const TDesC& aFullFileName, const TDesC8& aExpectedDataType);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    40
	inline TInt Count() const {return iFileArray.Count();}
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    41
	void Get(TPtrC& aFullFileName, TPtrC8& aExpectedDataType, TInt aIndex) const;
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    42
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    43
	struct SFile
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    44
		{
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    45
		HBufC* iFullFileName;
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    46
		HBufC8* iExpectedDataType;
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    47
		};
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    48
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    49
	RArray<SFile> iFileArray;
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    50
	};
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    51
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    52
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    53
// RTstAppService
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    54
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    55
class RTstAppService : public RApaAppServiceBase
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    56
	{
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    57
public:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    58
	static TInt DoTestL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    59
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    60
	RTstAppService(TUid aServiceUid);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    61
	void ConnectL();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    62
	void ReceiveTestResult(TRequestStatus& aRequestStatus, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    63
	// from RApaAppServiceBase
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    64
	virtual TUid ServiceUid() const;
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    65
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    66
	const TUid iServiceUid;
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    67
	};
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    68
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    69
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    70
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    71
// CT_NonNativeApps test class. 
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    72
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    73
class CT_NonNativeAppsStep : public CTestStep
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    74
	{
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    75
public:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    76
	CT_NonNativeAppsStep();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    77
	~CT_NonNativeAppsStep();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    78
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    79
	virtual TVerdict doTestStepPreambleL();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    80
	virtual TVerdict doTestStepPostambleL();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    81
	virtual TVerdict doTestStepL();
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    82
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    83
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    84
	HBufC8* OpenFileAndReadBufferLC(RApaLsSession& aApparcServer, RFs& aFileServer, const TDesC& aFullFileName);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    85
	void OpenFileAndSetFilePositionToSomewhereUnusualLC(RFile& aFile, TInt& aFilePosition, RFs& aFileServer, const TDesC& aFullFileName);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    86
	void TestFilePosition(RFile& aFile, TInt aFilePosition);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    87
	void TestResultsOfAppForDocumentAndServiceL(TUid aServiceUid, TInt aError, const TUid& aAppUid, const TDataType& aDataType, const TDesC8& aExpectedDataType);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    88
	void CheckPropertyUpdateAndResetL(const TDesC& aExpectedNewValue);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    89
	void CheckApplicationLaunchesOkayL(RApaLsSession& aApparcServer, const CApaCommandLine& aCommandLine, TAny* aOption);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    90
	void CheckApplicationFailsToLaunchL(RApaLsSession& aApparcServer, const CApaCommandLine& aCommandLine, TAny* aOption);	
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    91
	void WaitForApplistUpdate(RApaLsSession& aApparcServer);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    92
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    93
	void TestAppForDocumentL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    94
	void TestAppForDocumentAndServiceL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    95
	void TestRecognizingL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    96
	void TestStartDocumentL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    97
	void TestRegisterNonNativeApplicationL(RApaLsSession& aApparcServer, RFs& aFileServer);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    98
	void TestGetAppIconForNonNativeL(RApaLsSession& aApparcServer, RFs& aFileServer, CApaRegistrationResourceFileWriter* const aRegistrationResourceFileWriter, CApaLocalisableResourceFileWriter* const aLocalisableResourceFileWriter);	
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    99
	void TestCommitNNAppUpdatesL(RApaLsSession& aApparcServer);	
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   100
	void TestForceCommitNNAppUpdatesL(RApaLsSession& aApparcServer);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   101
	void TestForceCommitL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   102
	void TestRollbackRegistrationL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine);
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   103
	void TestRollbackDeregistrationL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine);	
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   104
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   105
private:
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   106
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   107
	};
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   108
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   109
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   110
_LIT(KT_NonNativeAppsStep,"T_NonNativeApps");
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   111
0c32c669a39d Added new smoke test for phone languages
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   112
#endif