First public contribution.
2 * Copyright (c) 2003-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.
19 #include <test/testexecutelog.h>
22 #include "cafserver.h"
23 #include "ManagerStep.h"
25 #include "dirstreamable.h"
26 #include "virtualpathptr.h"
28 #include "attributeset.h"
29 #include "stringattributeset.h"
30 #include "contentIterator.h"
32 using namespace ContentAccess;
37 * This step deletes a file using the CAF framework
41 CCAFDeleteStep::~CCAFDeleteStep()
45 CCAFDeleteStep::CCAFDeleteStep(CCAFServer& aParent) : iParent(aParent)
47 SetTestStepName(KCAFDeleteStep);
51 TVerdict CCAFDeleteStep::doTestStepL()
58 SetTestStepResult(EFail);
60 // Find the file to delete and the expected return code from the INI file
61 GetStringFromConfig(ConfigSection(),_L("filename"),fileName);
62 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
64 INFO_PRINTF3(_L("Delete File %S Expected result: %d"), &fileName, expectedResult);
68 TRAP(result, CManager::DeleteFileL(fileName));
70 if(result != KErrNone)
72 INFO_PRINTF2(_L("Delete file left: %d"), result);
73 if(result== expectedResult)
75 SetTestStepResult(EPass);
78 else if(result == expectedResult)
80 SetTestStepResult(EPass);
82 else INFO_PRINTF2(_L("Delete file left with error: %d"), result);
85 return TestStepResult();
90 * This step copies a file using the CAF framework
94 CCAFCopyFileStep::~CCAFCopyFileStep()
98 CCAFCopyFileStep::CCAFCopyFileStep(CCAFServer& aParent) : iParent(aParent)
100 SetTestStepName(KCAFCopyFileStep);
104 TVerdict CCAFCopyFileStep::doTestStepL()
112 SetTestStepResult(EFail);
114 // Find the file to copy and the expected return code from the INI file
115 GetStringFromConfig(ConfigSection(),_L("source"),source);
116 GetStringFromConfig(ConfigSection(),_L("destination"),destination);
117 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
119 INFO_PRINTF4(_L("Copy %S to %S, Expected result: %d"), &source, &destination, expectedResult);
123 CManager *manager = CManager::NewLC();
125 result = manager->CopyFile(source, destination);
126 if(result == expectedResult)
128 SetTestStepResult(EPass);
132 INFO_PRINTF2(_L("CopyFile(source as filename overload) returned with unexpected error: %d"), result);
134 // set up 2nd overload testing
138 // read the input file and pass it to the CAF
140 CleanupClosePushL(fs);
141 User::LeaveIfError(fs.ShareProtected());
143 result = file.Open(fs, source, EFileRead | EFileStream | EFileShareAny);
144 if (result == KErrNone)
146 CleanupClosePushL(file);
148 // test the RFile overload
149 result = manager->CopyFile(file, destination);
151 if ((result == expectedResult)&&(TestStepResult()==EPass))
153 SetTestStepResult(EPass);
157 INFO_PRINTF2(_L("CopyFile(source as RFile handle overload) returned with unexpected error: %d"), result);
160 CleanupStack::PopAndDestroy(&file);
163 else if ((result == expectedResult)&&(TestStepResult()==EPass))
165 SetTestStepResult(EPass);
169 INFO_PRINTF2(_L("CopyFile(source as RFile handle overload) returned with unexpected error: %d"), result);
172 CleanupStack::PopAndDestroy(&fs);
174 CleanupStack::PopAndDestroy(manager);
177 return TestStepResult();
180 * This step renames a file using the CAF framework
184 CCAFRenameFileStep::~CCAFRenameFileStep()
188 CCAFRenameFileStep::CCAFRenameFileStep(CCAFServer& aParent) : iParent(aParent)
190 SetTestStepName(KCAFRenameFileStep);
194 TVerdict CCAFRenameFileStep::doTestStepL()
202 SetTestStepResult(EFail);
204 // Find the file to copy and the expected return code from the INI file
205 GetStringFromConfig(ConfigSection(),_L("source"),source);
206 GetStringFromConfig(ConfigSection(),_L("destination"),destination);
207 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
209 INFO_PRINTF4(_L("Rename from %S to %S, Expected result: %d"), &source, &destination, expectedResult);
213 CManager *manager = CManager::NewLC();
214 result = manager->RenameFile(source, destination);
215 CleanupStack::PopAndDestroy(manager);
217 if(result == expectedResult)
219 SetTestStepResult(EPass);
223 INFO_PRINTF2(_L("RenameFile() returned with unexpected error: %d"), result);
227 return TestStepResult();
232 * This step creates a directory using the CAF framework
236 CCAFMkDirStep::~CCAFMkDirStep()
240 CCAFMkDirStep::CCAFMkDirStep(CCAFServer& aParent) : iParent(aParent)
242 SetTestStepName(KCAFMkDirStep);
246 TVerdict CCAFMkDirStep::doTestStepL()
252 SetTestStepResult(EFail);
254 // Find the file to copy and the expected return code from the INI file
255 GetStringFromConfig(ConfigSection(),_L("path"),path);
256 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
258 INFO_PRINTF3(_L("Create directory %S, Expected result: %d"), &path, expectedResult);
262 CManager *manager = CManager::NewLC();
263 result = manager->MkDir(path);
264 CleanupStack::PopAndDestroy(manager);
266 if(result == expectedResult)
268 SetTestStepResult(EPass);
272 INFO_PRINTF2(_L("MkDir() returned with unexpected error: %d"), result);
276 return TestStepResult();
281 * This step creates several directory using the CAF framework
285 CCAFMkDirAllStep::~CCAFMkDirAllStep()
289 CCAFMkDirAllStep::CCAFMkDirAllStep(CCAFServer& aParent) : iParent(aParent)
291 SetTestStepName(KCAFMkDirAllStep);
295 TVerdict CCAFMkDirAllStep::doTestStepL()
301 SetTestStepResult(EFail);
303 // Find the file to copy and the expected return code from the INI file
304 GetStringFromConfig(ConfigSection(),_L("path"),path);
305 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
307 INFO_PRINTF3(_L("Create directory %S, Expected result: %d"), &path, expectedResult);
311 CManager *manager = CManager::NewLC();
312 // remove directory in case it already exists
313 manager->RmDir(path);
314 result = manager->MkDirAll(path);
315 CleanupStack::PopAndDestroy(manager);
317 if(result == expectedResult)
319 SetTestStepResult(EPass);
323 INFO_PRINTF2(_L("MkDirAll() returned with unexpected error: %d"), result);
327 return TestStepResult();
331 * This step removes a directory using the CAF framework
335 CCAFRmDirStep::~CCAFRmDirStep()
339 CCAFRmDirStep::CCAFRmDirStep(CCAFServer& aParent) : iParent(aParent)
341 SetTestStepName(KCAFRmDirStep);
345 TVerdict CCAFRmDirStep::doTestStepL()
351 SetTestStepResult(EFail);
353 // Find the file to copy and the expected return code from the INI file
354 GetStringFromConfig(ConfigSection(),_L("path"),path);
355 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
357 INFO_PRINTF3(_L("Remove directory %S, Expected result: %d"), &path, expectedResult);
361 CManager *manager = CManager::NewLC();
362 result = manager->RmDir(path);
363 CleanupStack::PopAndDestroy(manager);
365 if(result == expectedResult)
367 SetTestStepResult(EPass);
371 INFO_PRINTF2(_L("RmDir() returned with unexpected error: %d"), result);
375 return TestStepResult();
379 * This step lists the contents of a directory using the CAF framework
383 CCAFGetDirStep::~CCAFGetDirStep()
387 CCAFGetDirStep::CCAFGetDirStep(CCAFServer& aParent) : iParent(aParent)
389 SetTestStepName(KCAFGetDirStep);
393 TVerdict CCAFGetDirStep::doTestStepL()
400 CDir *entrylist = NULL;
401 CDir *dirlist = NULL;
402 CDir *filelist = NULL;
405 SetTestStepResult(EFail);
407 // Find the file to copy and the expected return code from the INI file
408 GetStringFromConfig(ConfigSection(),_L("path"),path);
409 GetIntFromConfig(ConfigSection(),_L("API"),GetDirAPI);
410 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
412 INFO_PRINTF3(_L("List contents of directory %S, Expected result: %d"), &path, expectedResult);
416 CManager *manager = CManager::NewLC();
419 result = manager->GetDir(path,ESortByName, KEntryAttNormal, entrylist);
421 else if(GetDirAPI == 2)
423 result = manager->GetDir(path,ESortByName, KEntryAttNormal, entrylist, dirlist);
427 result = manager->GetDir(path,TUidType(), ESortByName, filelist);
429 CleanupStack::PopAndDestroy(manager);
433 INFO_PRINTF2(_L("%d items in EntryList:"), entrylist->Count());
434 DisplayList(*entrylist);
441 INFO_PRINTF2(_L("%d items in DirList:"), dirlist->Count());
442 DisplayList(*dirlist);
449 INFO_PRINTF2(_L("%d items in FileList:"), filelist->Count());
450 DisplayList(*filelist);
455 if(result == expectedResult)
457 SetTestStepResult(EPass);
461 INFO_PRINTF2(_L("GetDir() returned with unexpected error: %d"), result);
465 return TestStepResult();
469 void CCAFGetDirStep::DisplayList(CDir& aDir)
472 for(i = 0; i < aDir.Count(); i++)
474 INFO_PRINTF2(_L(" %S"), &aDir[i].iName );
480 * This step tests the notification functions
484 CCAFManagerNotifyStep::~CCAFManagerNotifyStep()
488 CCAFManagerNotifyStep::CCAFManagerNotifyStep(CCAFServer& aParent) : iParent(aParent)
490 SetTestStepName(KCAFManagerNotifyStep);
494 TVerdict CCAFManagerNotifyStep::doTestStepL()
498 TRequestStatus status = KRequestPending;
505 SetTestStepResult(EPass);
507 // Find the file to copy and the expected return code from the INI file
508 GetStringFromConfig(ConfigSection(),_L("path"),uri);
509 GetIntFromConfig(ConfigSection(),_L("Status1"),Status1);
510 GetIntFromConfig(ConfigSection(),_L("Cancel1"),Cancel1);
511 GetIntFromConfig(ConfigSection(),_L("Cancel2"),Cancel2);
513 INFO_PRINTF2(_L("Performing notification tests on %S"), &uri);
516 CManager *manager = CManager::NewLC();
518 manager->NotifyStatusChange(uri, ERightsAvailable, status);
519 User::WaitForRequest(status);
520 if(status.Int() != Status1)
522 INFO_PRINTF3(_L("Status expected: %d returned unexpected status %d"), Status1, status.Int());
523 SetTestStepResult(EFail);
525 result = manager->CancelNotifyStatusChange(uri, status);
526 if(result != Cancel1)
528 INFO_PRINTF3(_L("Cancel request expected return value: %d returned unexpected value %d"), Cancel1, result);
529 SetTestStepResult(EFail);
532 // Wait for rights expired but cancel before they arrive
533 manager->NotifyStatusChange(uri, ERightsExpired, status);
534 result = manager->CancelNotifyStatusChange(uri, status);
535 if(result != Cancel2)
537 INFO_PRINTF3(_L("Cancel2 request expected return value: %d returned unexpected value %d"), Cancel2, result);
538 SetTestStepResult(EFail);
541 CleanupStack::PopAndDestroy(manager);
545 return TestStepResult();
549 * This step sets a property in the agents
553 CCAFManagerSetPropertyStep::~CCAFManagerSetPropertyStep()
557 CCAFManagerSetPropertyStep::CCAFManagerSetPropertyStep(CCAFServer& aParent) : iParent(aParent)
559 SetTestStepName(KCAFManagerSetPropertyStep);
563 TVerdict CCAFManagerSetPropertyStep::doTestStepL()
568 SetTestStepResult(EFail);
570 // Find the file to copy and the expected return code from the INI file
571 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
573 INFO_PRINTF2(_L("Set Property expected result: %d"), expectedResult);
577 CManager *manager = CManager::NewLC();
578 result = manager->SetProperty(EAgentPropertyBufferSize, 100);
579 CleanupStack::PopAndDestroy(manager);
581 // dummy test Agent expects KErrNotSupported
582 if(result == expectedResult || result == KErrNotSupported)
584 SetTestStepResult(EPass);
588 INFO_PRINTF2(_L("SetProperty() returned with unexpected error: %d"), result);
592 return TestStepResult();
597 * This step asks the agent to display information about a file
601 CCAFManagerDisplayInfoStep::~CCAFManagerDisplayInfoStep()
605 CCAFManagerDisplayInfoStep::CCAFManagerDisplayInfoStep(CCAFServer& aParent) : iParent(aParent)
607 SetTestStepName(KCAFManagerDisplayInfoStep);
611 TVerdict CCAFManagerDisplayInfoStep::doTestStepL()
617 SetTestStepResult(EFail);
619 // Find the file to copy and the expected return code from the INI file
620 GetStringFromConfig(ConfigSection(),_L("uri"),uri);
621 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
623 INFO_PRINTF3(_L("DisplayInfo for %S expected result: %d"), &uri, expectedResult);
627 CManager *manager = CManager::NewLC();
628 TRAP(result, manager->DisplayInfoL(EFileProperties, TVirtualPathPtr(uri)));
629 CleanupStack::PopAndDestroy(manager);
631 if(result == expectedResult)
633 SetTestStepResult(EPass);
637 INFO_PRINTF2(_L("DisplayInfoL() left with unexpected error: %d"), result);
641 return TestStepResult();
645 * This step asks CAF for a list of agents
649 CCAFManagerListAgentsStep::~CCAFManagerListAgentsStep()
653 CCAFManagerListAgentsStep::CCAFManagerListAgentsStep(CCAFServer& aParent) : iParent(aParent)
655 SetTestStepName(KCAFManagerListAgentsStep);
659 TVerdict CCAFManagerListAgentsStep::doTestStepL()
666 RArray <TAgent> agents;
668 SetTestStepResult(EFail);
670 // Find the file to copy and the expected return code from the INI file
671 GetIntFromConfig(ConfigSection(),_L("count"),expectedNumber);
672 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
674 INFO_PRINTF2(_L("List agents expected result: %d"), expectedResult);
678 CManager *manager = CManager::NewLC();
679 TRAP(result, manager->ListAgentsL(agents));
680 CleanupStack::PopAndDestroy(manager);
683 for (i = 0; i < agents.Count(); i++)
685 TPtrC agentName = agents[i].Name();
686 INFO_PRINTF2(_L(" %S"), &agentName);
689 INFO_PRINTF2(_L("List agents expected result: %d"), expectedResult);
691 if(result == expectedResult)
693 if(expectedNumber == agents.Count())
695 SetTestStepResult(EPass);
699 INFO_PRINTF2(_L("Expected number of agents: %d"), expectedNumber);
704 INFO_PRINTF2(_L("ListAgents left with unexpected error: %d"), result);
710 return TestStepResult();
714 * This step attempts to perform an agent specific command
718 CCAFManagerAgentSpecificStep::~CCAFManagerAgentSpecificStep()
722 CCAFManagerAgentSpecificStep::CCAFManagerAgentSpecificStep(CCAFServer& aParent) : iParent(aParent)
724 SetTestStepName(KCAFManagerAgentSpecificStep);
728 TVerdict CCAFManagerAgentSpecificStep::doTestStepL()
735 TBuf8 <100> actualOutput;
740 RArray <TAgent> agents;
741 _LIT(KTestAgentName, "Reference Test Agent");
743 SetTestStepResult(EPass);
745 GetIntFromConfig(ConfigSection(),_L("command"),command);
746 GetStringFromConfig(ConfigSection(),_L("input"),input16);
747 GetStringFromConfig(ConfigSection(),_L("output"),output16);
748 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
751 output.Copy(output16);
754 CManager *manager = CManager::NewLC();
755 TRAP(result, manager->ListAgentsL(agents));
757 INFO_PRINTF1(_L("Running synchronous Agent specific command"));
758 actualOutput.SetLength(0);
759 if(result == KErrNone && agents.Count() > 0)
761 for(index = 0; index < agents.Count(); index++)
763 if(agents[index].Name() == KTestAgentName())
768 result = manager->AgentSpecificCommand(agents[index],command, input, actualOutput);
772 SetTestStepResult(EFail);
774 if(result != expectedResult)
776 SetTestStepResult(EFail);
777 INFO_PRINTF3(_L("Async Expected result: %d, actual result: %d"), expectedResult, result);
779 else if(actualOutput != output)
781 SetTestStepResult(EFail);
782 INFO_PRINTF3(_L("Async Expected output: %S, actual output: %S"), &output, &actualOutput);
785 INFO_PRINTF1(_L("Running asynchronous Agent specific command"));
786 TRequestStatus status;
787 actualOutput.SetLength(0);
788 if((result == KErrNone || result == expectedResult) && agents.Count() > 0)
790 manager->AgentSpecificCommand(agents[index], command, input, actualOutput, status);
791 User::WaitForRequest(status);
795 SetTestStepResult(EFail);
797 if(status.Int() != expectedResult)
799 SetTestStepResult(EFail);
800 INFO_PRINTF3(_L("Async Expected result: %d, actual result: %d"), expectedResult, status.Int());
802 else if(actualOutput != output)
804 SetTestStepResult(EFail);
805 INFO_PRINTF3(_L("Async Expected output: %S, actual output: %S"), &output, &actualOutput);
808 CleanupStack::PopAndDestroy(manager);
812 return TestStepResult();
816 * This step attempts to display configuration information
820 CCAFManagerDisplayConfigStep::~CCAFManagerDisplayConfigStep()
824 CCAFManagerDisplayConfigStep::CCAFManagerDisplayConfigStep(CCAFServer& aParent) : iParent(aParent)
826 SetTestStepName(KCAFManagerDisplayConfigStep);
829 TVerdict CCAFManagerDisplayConfigStep::doTestStepL()
832 TInt result = KErrNone;
834 RArray <TAgent> agents;
837 SetTestStepResult(EPass);
839 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
842 manager = CManager::NewL();
843 CleanupStack::PushL(manager);
844 TRAP(result, manager->ListAgentsL(agents));
846 if(result == KErrNone && agents.Count() > 0)
848 TRAP(result, manager->DisplayManagementInfoL(agents[0]));
852 SetTestStepResult(EFail);
854 if(result != expectedResult && result != KErrNotSupported) // dummy test agent expects -5
856 SetTestStepResult(EFail);
857 INFO_PRINTF3(_L("Expected result: %d, actual result: %d"), expectedResult, result);
860 CleanupStack::PopAndDestroy(manager);
864 return TestStepResult();
868 * Manager attribute step
872 CCAFManagerAttributeStep::~CCAFManagerAttributeStep()
876 CCAFManagerAttributeStep::CCAFManagerAttributeStep(CCAFServer& aParent) : iParent(aParent)
878 SetTestStepName(KCAFManagerAttributeStep);
881 TVerdict CCAFManagerAttributeStep::doTestStepL()
883 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
884 TBool wmdrmFlag = EFalse;
885 GetBoolFromConfig(ConfigSection(),_L("wmdrmEnabled"), wmdrmFlag);
889 TVerdict verdict = doWmdrmTestStepL();
892 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
895 TInt value = KErrNone;
902 SetTestStepResult(EPass);
904 GetIntFromConfig(ConfigSection(),_L("attribute"),attribute);
905 GetStringFromConfig(ConfigSection(),_L("uri"),uri);
906 GetStringFromConfig(ConfigSection(),_L("uniqueid"),uniqueId);
907 GetIntFromConfig(ConfigSection(),_L("value"),expectedValue);
910 manager = CManager::NewL();
913 CleanupStack::PushL(manager);
914 User::LeaveIfError(manager->GetAttribute(attribute, value, TVirtualPathPtr(uri, uniqueId)));
915 if(expectedValue!= value)
917 SetTestStepResult(EFail);
918 INFO_PRINTF3(_L("CManager::GetAttribute() Expected value: %d, actual value: %d"), expectedValue, value);
920 CleanupStack::PopAndDestroy(manager);
924 SetTestStepResult(EFail);
925 INFO_PRINTF1(_L("CManager construction failed"));
930 return TestStepResult();
934 * Manager attributeset step
938 CCAFManagerAttributeSetStep::~CCAFManagerAttributeSetStep()
942 CCAFManagerAttributeSetStep::CCAFManagerAttributeSetStep(CCAFServer& aParent) : iParent(aParent)
944 SetTestStepName(KCAFManagerAttributeSetStep);
947 TVerdict CCAFManagerAttributeSetStep::doTestStepL()
949 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
950 TBool wmdrmFlag = EFalse;
951 GetBoolFromConfig(ConfigSection(),_L("wmdrmEnabled"), wmdrmFlag);
955 TVerdict verdict = doWmdrmTestStepL();
958 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
966 TInt result = KErrNone;
972 SetTestStepResult(EPass);
974 GetStringFromConfig(ConfigSection(),_L("uri"),uri);
975 GetStringFromConfig(ConfigSection(),_L("uniqueid"),uniqueId);
976 GetIntFromConfig(ConfigSection(),_L("attribute1"),attribute1);
977 GetIntFromConfig(ConfigSection(),_L("attribute2"),attribute2);
978 GetIntFromConfig(ConfigSection(),_L("value1"),expectedValue1);
979 GetIntFromConfig(ConfigSection(),_L("value2"),expectedValue2);
982 manager = CManager::NewL();
985 CleanupStack::PushL(manager);
986 RAttributeSet attributeSet;
987 CleanupClosePushL(attributeSet);
988 attributeSet.AddL(attribute1);
989 attributeSet.AddL(attribute2);
990 result = manager->GetAttributeSet(attributeSet, TVirtualPathPtr(uri, uniqueId));
991 if(result != KErrNone)
993 SetTestStepResult(EFail);
994 INFO_PRINTF1(_L("CManager::GetAttribute() failed"));
996 User::LeaveIfError(attributeSet.GetValue(attribute1, value1));
997 User::LeaveIfError(attributeSet.GetValue(attribute2, value2));
998 if(expectedValue1 != value1 || expectedValue2 != value2 || attributeSet.Count() != 2)
1000 SetTestStepResult(EFail);
1001 INFO_PRINTF1(_L("CManager::GetAttributeSet() values don't match expected values"));
1003 CleanupStack::PopAndDestroy(&attributeSet);
1004 CleanupStack::PopAndDestroy(manager);
1008 SetTestStepResult(EFail);
1009 INFO_PRINTF1(_L("CManager construction failed"));
1014 return TestStepResult();
1019 * Manager string attribute step
1023 CCAFManagerStringAttributeStep::~CCAFManagerStringAttributeStep()
1027 CCAFManagerStringAttributeStep::CCAFManagerStringAttributeStep(CCAFServer& aParent) : iParent(aParent)
1029 SetTestStepName(KCAFManagerStringAttributeStep);
1032 TVerdict CCAFManagerStringAttributeStep::doTestStepL()
1034 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1035 TBool wmdrmFlag = EFalse;
1036 GetBoolFromConfig(ConfigSection(),_L("wmdrmEnabled"), wmdrmFlag);
1040 TVerdict verdict = doWmdrmTestStepL();
1043 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1045 TInt expectedResult;
1047 TPtrC expectedValue;
1049 TInt result = KErrNone;
1055 SetTestStepResult(EPass);
1057 GetIntFromConfig(ConfigSection(),_L("attribute"),attribute);
1058 GetStringFromConfig(ConfigSection(),_L("uri"),uri);
1059 GetStringFromConfig(ConfigSection(),_L("uniqueid"),uniqueId);
1060 GetStringFromConfig(ConfigSection(),_L("value"),expectedValue);
1061 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
1064 manager = CManager::NewL();
1067 CleanupStack::PushL(manager);
1068 result = manager->GetStringAttribute(attribute, value, TVirtualPathPtr(uri, uniqueId));
1069 if(result != expectedResult)
1071 SetTestStepResult(EFail);
1072 INFO_PRINTF3(_L("CManager::GetStringAttribute() Expected result: %d, actual result: %d"), expectedResult, result);
1074 if(value != expectedValue)
1076 SetTestStepResult(EFail);
1077 INFO_PRINTF3(_L("CManager::GetStringAttribute() Expected value: %S, actual result: %S"), &expectedValue, &value);
1080 CleanupStack::PopAndDestroy(manager);
1084 SetTestStepResult(EFail);
1085 INFO_PRINTF1(_L("CManager construction failed"));
1090 return TestStepResult();
1094 * Manager StringAttributeSet step
1098 CCAFManagerStringAttributeSetStep::~CCAFManagerStringAttributeSetStep()
1102 CCAFManagerStringAttributeSetStep::CCAFManagerStringAttributeSetStep(CCAFServer& aParent) : iParent(aParent)
1104 SetTestStepName(KCAFManagerStringAttributeSetStep);
1107 TVerdict CCAFManagerStringAttributeSetStep::doTestStepL()
1109 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1110 TBool wmdrmFlag = EFalse;
1111 GetBoolFromConfig(ConfigSection(),_L("wmdrmEnabled"), wmdrmFlag);
1115 TVerdict verdict = doWmdrmTestStepL();
1118 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1120 TPtrC expectedValue1;
1121 TPtrC expectedValue2;
1128 TInt result = KErrNone;
1134 SetTestStepResult(EPass);
1136 GetStringFromConfig(ConfigSection(),_L("uri"),uri);
1137 GetStringFromConfig(ConfigSection(),_L("uniqueid"),uniqueId);
1138 GetIntFromConfig(ConfigSection(),_L("attribute1"),attribute1);
1139 GetIntFromConfig(ConfigSection(),_L("attribute2"),attribute2);
1140 GetStringFromConfig(ConfigSection(),_L("value1"),expectedValue1);
1141 GetStringFromConfig(ConfigSection(),_L("value2"),expectedValue2);
1142 GetIntFromConfig(ConfigSection(),_L("result1"),result1);
1143 GetIntFromConfig(ConfigSection(),_L("result2"),result2);
1147 manager = CManager::NewL();
1150 CleanupStack::PushL(manager);
1151 RStringAttributeSet attributeSet;
1152 CleanupClosePushL(attributeSet);
1153 attributeSet.AddL(attribute1);
1154 attributeSet.AddL(attribute2);
1155 result = manager->GetStringAttributeSet(attributeSet, TVirtualPathPtr(uri, uniqueId));
1156 if(result != KErrNone)
1158 SetTestStepResult(EFail);
1159 INFO_PRINTF1(_L("CManager::GetAttribute() failed"));
1161 if(result1 != attributeSet.GetValue(attribute1, value1))
1163 INFO_PRINTF1(_L("RStringAttributeSet::GetValue failed"));
1165 if(result2 != attributeSet.GetValue(attribute2, value2))
1167 INFO_PRINTF1(_L("RStringAttributeSet::GetValue failed"));
1169 if(value1 != expectedValue1 || value2 != expectedValue2 || attributeSet.Count() != 2)
1171 SetTestStepResult(EFail);
1172 INFO_PRINTF1(_L("CManager::GetAttributeSet() values don't match expected values"));
1174 CleanupStack::PopAndDestroy(&attributeSet);
1175 CleanupStack::PopAndDestroy(manager);
1179 SetTestStepResult(EFail);
1180 INFO_PRINTF1(_L("CManager construction failed"));
1185 return TestStepResult();
1191 CIteratorTestStateMachine::CIteratorTestStateMachine(CCAFContentIteratorStep *aParent) : CActive(EPriorityStandard)
1196 CIteratorTestStateMachine::~CIteratorTestStateMachine()
1203 void CIteratorTestStateMachine::DoCancel()
1206 CActiveScheduler::Stop();
1210 void CIteratorTestStateMachine::RunTestL(const TDesC& aPath, TBool aRecursive, const TDesC8& aMimeType)
1212 iPath = aPath.AllocL();
1213 iMimeType = aMimeType.AllocL();
1214 iRecursive = aRecursive;
1216 // This function will only return once all files have been found
1217 // and the RunL() method calls CActiveScheduler::Stop()
1218 CActiveScheduler::Add(this);
1219 iStatus = KRequestPending;
1221 TRequestStatus *ptr = &iStatus;
1222 User::RequestComplete(ptr, KErrNone);
1223 CActiveScheduler::Start();
1226 void CIteratorTestStateMachine::RunL()
1228 TBuf <KMaxDataTypeLength> mime16;
1229 TVirtualPathPtr location(KNullDesC(), KNullDesC());
1231 if(iStatus.Int() != KErrNone)
1235 CActiveScheduler::Stop();
1241 case 0: // create iterator
1242 iter = CContentIterator::NewL(*iPath, iRecursive, *iMimeType);
1243 iStatus = KRequestPending;
1244 iter->Next(iStatus);
1249 case 1: // get result of Next request
1250 location = iter->VirtualPath();
1251 mime16.Copy(iter->MimeType());
1252 iParent->PrintResult(location.URI(), location.UniqueId(), mime16);
1253 iStatus = KRequestPending;
1254 iter->Next(iStatus);
1258 CActiveScheduler::Stop();
1265 * Content Iterator Step
1269 CCAFContentIteratorStep::~CCAFContentIteratorStep()
1273 CCAFContentIteratorStep::CCAFContentIteratorStep(CCAFServer& aParent) : iParent(aParent)
1275 SetTestStepName(KCAFContentIteratorStep);
1278 TVerdict CCAFContentIteratorStep::doTestStepL()
1282 TBuf8 <KMaxDataTypeLength> mimeType8;
1284 SetTestStepResult(EPass);
1286 GetStringFromConfig(ConfigSection(),_L("path"),path);
1287 GetStringFromConfig(ConfigSection(),_L("mimetype"),mimeType);
1289 mimeType8.Copy(mimeType);
1293 CIteratorTestStateMachine *t = new CIteratorTestStateMachine(this);
1295 t->RunTestL(path, ETrue, mimeType8);
1299 return TestStepResult();
1302 void CCAFContentIteratorStep::PrintResult(const TDesC& aFileName, const TDesC& aUniqueId, const TDesC& aMimeType)
1304 INFO_PRINTF4(_L("File: %S, UniqueId: %S, MimeType: %S"), &aFileName, &aUniqueId, &aMimeType);
1309 * This step asks the agent to display information about a file using the file handle
1312 CCAFManagerDisplayInfoByFileHandleStep::~CCAFManagerDisplayInfoByFileHandleStep()
1316 CCAFManagerDisplayInfoByFileHandleStep::CCAFManagerDisplayInfoByFileHandleStep(CCAFServer& aParent) : iParent(aParent)
1318 SetTestStepName(KCAFManagerDisplayInfoByFileHandleStep);
1322 TVerdict CCAFManagerDisplayInfoByFileHandleStep::doTestStepL()
1326 //initialisation for testing purposes such as iUri, iFs, iFile, iExpectedResult and iUniqueId.
1327 InitialiseFileHandleParametersL();
1329 SetTestStepResult(EFail);
1332 CManager *manager = CManager::NewLC();
1334 TRAP(result, manager->DisplayInfoL(EFileProperties, iFile, iUniqueId));
1335 if(result == iExpectedResult)
1337 SetTestStepResult(EPass);
1338 INFO_PRINTF1(_L("CManager::DisplayInfoL()(RFile handle overload) PASSED"));
1342 INFO_PRINTF1(_L("CManager::DisplayInfoL()(RFile handle overload) returned unexpected error"));
1343 INFO_PRINTF3(_L("CManager::DisplayInfoL()(RFile handle overload) Expected result: %d, actual result: %d"), iExpectedResult, result);
1346 //cleanup manager instance
1347 CleanupStack::PopAndDestroy(manager);
1348 //cleanup iFs and iFile instances by closing the handles.
1349 CleanupStack::PopAndDestroy(2, &iFs);
1352 return TestStepResult();
1356 * Manager attribute step using file handle.
1360 CCAFManagerAttributeByFileHandleStep::~CCAFManagerAttributeByFileHandleStep()
1364 CCAFManagerAttributeByFileHandleStep::CCAFManagerAttributeByFileHandleStep(CCAFServer& aParent) : iParent(aParent)
1366 SetTestStepName(KCAFManagerAttributeByFileHandleStep);
1369 TVerdict CCAFManagerAttributeByFileHandleStep::doTestStepL()
1372 TInt value = KErrNone;
1373 TInt result= KErrNone;
1376 //initialisation for testing purposes such as iUri, iFs, iFile, iExpectedResult and iUniqueId.
1377 InitialiseFileHandleParametersL();
1378 GetIntFromConfig(ConfigSection(),_L("attribute"),attribute);
1379 GetIntFromConfig(ConfigSection(),_L("value"),expectedValue);
1381 SetTestStepResult(EFail);
1384 CManager *manager = CManager::NewLC();
1386 result = manager->GetAttribute(attribute, value, iFile, iUniqueId);
1387 //expectedResult has priority over the values collected.
1388 if(result == iExpectedResult)
1390 if(value == expectedValue)
1392 SetTestStepResult(EPass);
1393 INFO_PRINTF1(_L("CManager::GetAttribute()(RFile handle overload) PASSED"));
1397 INFO_PRINTF1(_L("CManager::GetAttribute()(RFile handle overload) values don't match expected values"));
1398 INFO_PRINTF3(_L("CManager::GetAttribute()(RFile handle overload) Expected value: %d, actual value: %d"), expectedValue, value);
1403 INFO_PRINTF1(_L("CManager::GetAttribute()(RFile handle overload) returned unexpected error"));
1404 INFO_PRINTF3(_L("CManager::GetAttribute()(RFile handle overload) Expected result: %d, actual result: %d"), iExpectedResult, result);
1407 //cleanup manager instance
1408 CleanupStack::PopAndDestroy(manager);
1409 //cleanup iFs and iFile instances by closing the handles.
1410 CleanupStack::PopAndDestroy(2, &iFs);
1413 return TestStepResult();
1417 * Manager attributeset step by file handle.
1421 CCAFManagerAttributeSetByFileHandleStep::~CCAFManagerAttributeSetByFileHandleStep()
1425 CCAFManagerAttributeSetByFileHandleStep::CCAFManagerAttributeSetByFileHandleStep(CCAFServer& aParent) : iParent(aParent)
1427 SetTestStepName(KCAFManagerAttributeSetByFileHandleStep);
1430 TVerdict CCAFManagerAttributeSetByFileHandleStep::doTestStepL()
1434 TInt expectedValue1;
1435 TInt expectedValue2;
1438 TInt result = KErrNone;
1440 //initialisation for testing purposes such as iUri, iFs, iFile, iExpectedResult and iUniqueId.
1441 InitialiseFileHandleParametersL();
1442 GetIntFromConfig(ConfigSection(),_L("attribute1"),attribute1);
1443 GetIntFromConfig(ConfigSection(),_L("attribute2"),attribute2);
1444 GetIntFromConfig(ConfigSection(),_L("value1"),expectedValue1);
1445 GetIntFromConfig(ConfigSection(),_L("value2"),expectedValue2);
1447 SetTestStepResult(EFail);
1450 CManager *manager = CManager::NewLC();
1452 RAttributeSet attributeSet;
1453 CleanupClosePushL(attributeSet);
1454 attributeSet.AddL(attribute1);
1455 attributeSet.AddL(attribute2);
1457 result = manager->GetAttributeSet(attributeSet, iFile, iUniqueId);
1458 //expectedResult has priority over the values collected.
1459 if(result == iExpectedResult)
1461 User::LeaveIfError(attributeSet.GetValue(attribute1, value1));
1462 User::LeaveIfError(attributeSet.GetValue(attribute2, value2));
1463 if(value1 == expectedValue1 && value2 == expectedValue2)
1465 SetTestStepResult(EPass);
1466 INFO_PRINTF1(_L("CManager::GetAttributeSet()(RFile handle overload) PASSED"));
1470 INFO_PRINTF1(_L("CManager::GetAttributeSet()(RFile handle overload) values don't match expected values"));
1471 INFO_PRINTF3(_L("CManager::GetAttributeSet()(RFile handle overload) Expected value: %d, actual value: %d"), expectedValue1, value1);
1472 INFO_PRINTF3(_L("CManager::GetAttributeSet()(RFile handle overload) Expected value: %d, actual value: %d"), expectedValue2, value2);
1477 INFO_PRINTF1(_L("CManager::GetAttributeSet()(RFile handle overload) returned unexpected error"));
1478 INFO_PRINTF3(_L("CManager::GetAttributeSet()(RFile handle overload) Expected result: %d, actual result: %d"), iExpectedResult, result);
1481 //cleanup manager and attributeSet instances
1482 CleanupStack::PopAndDestroy(2, manager);
1483 //cleanup iFs and iFile instances by closing the handles.
1484 CleanupStack::PopAndDestroy(2, &iFs);
1487 return TestStepResult();
1492 * Manager string attribute step by file handle
1496 CCAFManagerStringAttributeByFileHandleStep::~CCAFManagerStringAttributeByFileHandleStep()
1500 CCAFManagerStringAttributeByFileHandleStep::CCAFManagerStringAttributeByFileHandleStep(CCAFServer& aParent) : iParent(aParent)
1502 SetTestStepName(KCAFManagerStringAttributeByFileHandleStep);
1505 TVerdict CCAFManagerStringAttributeByFileHandleStep::doTestStepL()
1508 TInt result = KErrNone;
1509 TPtrC expectedValue;
1512 //initialisation for testing purposes such as iUri, iFs, iFile, iExpectedResult and iUniqueId.
1513 InitialiseFileHandleParametersL();
1514 GetIntFromConfig(ConfigSection(),_L("attribute"),attribute);
1515 GetStringFromConfig(ConfigSection(),_L("value"),expectedValue);
1517 SetTestStepResult(EFail);
1520 CManager* manager = CManager::NewLC();
1522 result = manager->GetStringAttribute(attribute, value, iFile, iUniqueId);
1523 //expectedResult has priority over the values collected.
1524 if(result == iExpectedResult)
1526 if (value == expectedValue)
1528 SetTestStepResult(EPass);
1529 INFO_PRINTF1(_L("CManager::GetStringAttribute()(RFile handle overload) PASSED"));
1533 INFO_PRINTF1(_L("CManager::GetStringAttribute()(RFile handle overload) values don't match expected values"));
1534 INFO_PRINTF3(_L("CManager::GetStringAttribute()(RFile handle overload) Expected value: %S, actual value: %S"), &expectedValue, &value);
1539 INFO_PRINTF1(_L("CManager::GetStringAttribute()(RFile handle overload) returned unexpected error"));
1540 INFO_PRINTF3(_L("CManager::GetStringAttribute()(RFile handle overload) Expected result: %d, actual result: %d"), iExpectedResult, result);
1543 //cleanup manager instance
1544 CleanupStack::PopAndDestroy(manager);
1545 //cleanup iFs and iFile instances by closing the handles.
1546 CleanupStack::PopAndDestroy(2, &iFs);
1549 return TestStepResult();
1553 * Manager StringAttributeSet step by file handle.
1557 CCAFManagerStringAttributeSetByFileHandleStep::~CCAFManagerStringAttributeSetByFileHandleStep()
1561 CCAFManagerStringAttributeSetByFileHandleStep::CCAFManagerStringAttributeSetByFileHandleStep(CCAFServer& aParent) : iParent(aParent)
1563 SetTestStepName(KCAFManagerStringAttributeSetByFileHandleStep);
1566 TVerdict CCAFManagerStringAttributeSetByFileHandleStep::doTestStepL()
1570 TInt result = KErrNone;
1571 TPtrC expectedValue1;
1572 TPtrC expectedValue2;
1576 //initialisation for testing purposes such as iUri, iFs, iFile, iExpectedResult and iUniqueId.
1577 InitialiseFileHandleParametersL();
1578 GetIntFromConfig(ConfigSection(),_L("attribute1"),attribute1);
1579 GetIntFromConfig(ConfigSection(),_L("attribute2"),attribute2);
1580 GetStringFromConfig(ConfigSection(),_L("value1"),expectedValue1);
1581 GetStringFromConfig(ConfigSection(),_L("value2"),expectedValue2);
1583 SetTestStepResult(EFail);
1586 CManager* manager = CManager::NewLC();
1588 RStringAttributeSet attributeSet;
1589 CleanupClosePushL(attributeSet);
1590 attributeSet.AddL(attribute1);
1591 attributeSet.AddL(attribute2);
1593 result = manager->GetStringAttributeSet(attributeSet, iFile, iUniqueId);
1594 //expectedResult has priority over the values collected.
1595 if(result == iExpectedResult)
1597 User::LeaveIfError(attributeSet.GetValue(attribute1, value1));
1598 User::LeaveIfError(attributeSet.GetValue(attribute2, value2));
1599 if (value1 == expectedValue1 && value2 == expectedValue2)
1601 SetTestStepResult(EPass);
1602 INFO_PRINTF1(_L("CManager::GetStringAttributeSet()(RFile handle overload) PASSED"));
1606 INFO_PRINTF1(_L("CManager::GetStringAttributeSet()(RFile handle overload) values don't match expected values"));
1607 INFO_PRINTF3(_L("CManager::GetStringAttributeSet()(RFile handle overload) Expected value: %S, actual value: %S"), &expectedValue1, &value1);
1608 INFO_PRINTF3(_L("CManager::GetStringAttributeSet()(RFile handle overload) Expected value: %S, actual value: %S"), &expectedValue2, &value2);
1613 INFO_PRINTF1(_L("CManager::GetStringAttributeSet()(RFile handle overload) returned unexpected error"));
1614 INFO_PRINTF3(_L("CManager::GetStringAttributeSet()(RFile handle overload) Expected result: %d, actual result: %d"), iExpectedResult, result);
1617 //cleanup manager and attributeSet instances
1618 CleanupStack::PopAndDestroy(2, manager);
1619 //cleanup iFs and iFile instances by closing the handles.
1620 CleanupStack::PopAndDestroy(2, &iFs);
1623 return TestStepResult();
1626 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1628 // The following methods test the various manager attribute APIs for WMDRM content.
1630 TVerdict CCAFManagerAttributeStep::doWmdrmTestStepL()
1632 SetTestStepResult(EFail);
1635 GetIntFromConfig(ConfigSection(),_L("attribute"), attribVal);
1638 GetIntFromConfig(ConfigSection(),_L("value"), expectedValue);
1643 HBufC8* headerData = NULL;
1645 if(GetStringFromConfig(ConfigSection(),_L("header"), header))
1647 headerData = ConvertDes16toHBufC8LC(header);
1651 headerData = CreateWmdrmHeaderLC();
1655 CManager *manager = CManager::NewLC();
1657 User::LeaveIfError(manager->GetAttribute(*headerData, attribVal, value));
1658 if(expectedValue == value)
1660 SetTestStepResult(EPass);
1664 INFO_PRINTF3(_L("CManager::GetAttribute() Expected value: %d, actual value: %d"), expectedValue, value);
1667 CleanupStack::PopAndDestroy(2, headerData);
1670 return TestStepResult();
1674 TVerdict CCAFManagerAttributeSetStep::doWmdrmTestStepL()
1676 SetTestStepResult(EFail);
1679 GetIntFromConfig(ConfigSection(),_L("attribute1"),attribute1);
1682 GetIntFromConfig(ConfigSection(),_L("attribute2"),attribute2);
1684 TInt expectedValue1;
1685 GetIntFromConfig(ConfigSection(),_L("value1"),expectedValue1);
1687 TInt expectedValue2;
1688 GetIntFromConfig(ConfigSection(),_L("value2"),expectedValue2);
1693 HBufC8* headerData = NULL;
1695 if(GetStringFromConfig(ConfigSection(),_L("header"), header))
1697 headerData = ConvertDes16toHBufC8LC(header);
1701 headerData = CreateWmdrmHeaderLC();
1704 RAttributeSet attributeSet;
1705 CleanupClosePushL(attributeSet);
1706 attributeSet.AddL(attribute1);
1707 attributeSet.AddL(attribute2);
1709 CManager *manager = CManager::NewLC();
1710 TInt result = manager->GetAttributeSet(*headerData, attributeSet);
1711 if(result == KErrNone)
1713 SetTestStepResult(EPass);
1717 INFO_PRINTF1(_L("CManager::GetAttributeSet() failed"));
1721 User::LeaveIfError(attributeSet.GetValue(attribute1, value1));
1724 User::LeaveIfError(attributeSet.GetValue(attribute2, value2));
1726 if(expectedValue1 == value1 && expectedValue2 == value2 && attributeSet.Count() == 2)
1728 SetTestStepResult(EPass);
1732 INFO_PRINTF1(_L("CManager::GetAttributeSet() values don't match expected values"));
1735 CleanupStack::PopAndDestroy(3, headerData);
1739 return TestStepResult();
1743 TVerdict CCAFManagerStringAttributeStep::doWmdrmTestStepL()
1745 SetTestStepResult(EFail);
1748 GetIntFromConfig(ConfigSection(),_L("attribute"),attribVal);
1750 TPtrC expectedValue;
1751 GetStringFromConfig(ConfigSection(),_L("value"),expectedValue);
1753 TInt expectedResult;
1754 GetIntFromConfig(ConfigSection(),_L("result"),expectedResult);
1759 HBufC8* headerData = NULL;
1761 if(GetStringFromConfig(ConfigSection(),_L("header"), header))
1763 headerData = ConvertDes16toHBufC8LC(header);
1767 headerData = CreateWmdrmHeaderLC();
1770 CManager* manager = CManager::NewLC();
1772 TInt result = manager->GetStringAttribute(*headerData, attribVal, value);
1773 if(result == expectedResult && value == expectedValue)
1775 SetTestStepResult(EPass);
1779 INFO_PRINTF3(_L("CManager::GetStringAttribute() Expected result: %d, actual result: %d"), expectedResult, result);
1780 INFO_PRINTF3(_L("CManager::GetStringAttribute() Expected value: %S, actual value: %S"), &expectedValue, &value);
1783 CleanupStack::PopAndDestroy(2, headerData);
1787 return TestStepResult();
1791 TVerdict CCAFManagerStringAttributeSetStep::doWmdrmTestStepL()
1793 SetTestStepResult(EFail);
1796 GetIntFromConfig(ConfigSection(),_L("attribute1"),attribute1);
1799 GetIntFromConfig(ConfigSection(),_L("attribute2"),attribute2);
1801 TPtrC expectedValue1;
1802 GetStringFromConfig(ConfigSection(),_L("value1"),expectedValue1);
1804 TPtrC expectedValue2;
1805 GetStringFromConfig(ConfigSection(),_L("value2"),expectedValue2);
1810 HBufC8* headerData = NULL;
1812 if(GetStringFromConfig(ConfigSection(),_L("header"), header))
1814 headerData = ConvertDes16toHBufC8LC(header);
1818 headerData = CreateWmdrmHeaderLC();
1821 RStringAttributeSet attributeSet;
1822 CleanupClosePushL(attributeSet);
1823 attributeSet.AddL(attribute1);
1824 attributeSet.AddL(attribute2);
1826 CManager* manager = CManager::NewLC();
1827 TInt result = manager->GetStringAttributeSet(*headerData, attributeSet);
1830 if(result == KErrNone)
1832 TInt result3 = attributeSet.GetValue(attribute1, value1);
1833 TInt result4 = attributeSet.GetValue(attribute2, value2);
1835 if(value1 == expectedValue1 && value2 == expectedValue2 && attributeSet.Count() == 2
1836 && result3 == KErrNone && result4 == KErrNone)
1838 SetTestStepResult(EPass);
1842 INFO_PRINTF3(_L("RStringAttributeSet::GetValue() for attribute1.Expected value: %S, actual value: %S"), &expectedValue1, &value1);
1843 INFO_PRINTF3(_L("RStringAttributeSet::GetValue() for attribute2.Expected value: %S, actual value: %S"), &expectedValue2, &value2);
1844 INFO_PRINTF3(_L("RStringAttributeSet::GetValue() for attribute1. Expected result: %d, actual result: %d"), 0, result3);
1845 INFO_PRINTF3(_L("RStringAttributeSet::GetValue() for attribute2. Expected result: %d, actual result: %d"), 0, result4);
1850 INFO_PRINTF1(_L("CManager::GetStringAttributeSet() failed"));
1853 CleanupStack::PopAndDestroy(3, headerData);
1857 return TestStepResult();
1860 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT