--- a/appfw/apparchitecture/tef/T_ControlPanelTest.cpp Tue Aug 31 15:24:25 2010 +0300
+++ b/appfw/apparchitecture/tef/T_ControlPanelTest.cpp Wed Sep 01 12:24:48 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -48,16 +48,15 @@
#if !defined(__E32TEST_H__)
#include <e32test.h>
#endif
-#include "T_SisFileInstaller.h"
_LIT(KCompleted, "Completed.");
-_LIT(KCtrlApp2SisFile, "z:\\apparctest\\apparctestsisfiles\\app_CTRL2.sis");
-_LIT(KCtrlApp2Component, "app_CTRL2");
-
+_LIT(KRSCDIR,"C:\\Resource\\apps\\");
+_LIT(KRSCREGDIR,"C:\\private\\10003a3f\\import\\apps\\");
_LIT(KNEWCTLPATH,"C:\\sys\\bin\\app_CTRL2.exe");
-
+_LIT(KSRCRESOURCEPATH,"Z:\\private\\10003a3f\\import\\apps\\App_CTRL2_reg.Rsc");
+_LIT(KDESTRESOURCEPATH,"C:\\private\\10003a3f\\import\\apps\\App_CTRL2_reg.Rsc");
LOCAL_D TInt SimulateKeyL(TAny*)
{
@@ -88,6 +87,17 @@
return KErrNone;
}
+void CT_ControlPanelTestStep::RemoveFilesFromCDrive()
+ {
+ TInt ret = iTestServ.SetReadOnly(KDESTRESOURCEPATH,0); //remove READ ONLY option
+ TEST(ret==KErrNone);
+
+ TRAP(ret,iTestServ.DeleteFileL(KDESTRESOURCEPATH));
+ TEST(ret==KErrNone);
+ }
+
+
+
/**
Auxiliary Fn for Test Case ID T-ControlPanelStep-testControls1L,
T-ControlPanelStep-testControls2L, T-ControlPanelStep-testControls3L
@@ -199,15 +209,15 @@
{
INFO_PRINTF1(_L("In testControls2L......"));
- INFO_PRINTF1(_L("Application installing to C Drive......"));
+ iTestServ.CreateDirectoryL(KRSCDIR);
+ iTestServ.CreateDirectoryL(KRSCREGDIR);
- CSisFileInstaller sisFileInstaller;
- INFO_PRINTF2(_L("Installing sis file from -> %S"), &KCtrlApp2SisFile);
- sisFileInstaller.InstallSisL(KCtrlApp2SisFile);
-
- INFO_PRINTF1(_L("Updating the list ......"));
- TInt ret;
- iControlCount=iControlList->UpdateCount();
+ TInt ret=iTestServ.CopyFileL(KSRCRESOURCEPATH,KDESTRESOURCEPATH);
+ TEST(ret==KErrNone);
+
+ INFO_PRINTF1(_L("Files Copied to C Drive......"));
+ INFO_PRINTF1(_L("Updating the list ......"));
+ iControlCount=iControlList->UpdateCount();
while(iControlList->UpdateCount()<=iControlCount)
{
TRAP(ret, iControlList->UpdateL());
@@ -228,9 +238,8 @@
TFileName name=iControlList->Control(iIndex)->FileName();
TEST(name.CompareF(KNEWCTLPATH)==0);
-
- sisFileInstaller.UninstallSisL(KCtrlApp2Component);
- INFO_PRINTF1(_L("Removed application from C Drive......"));
+ RemoveFilesFromCDrive();
+ INFO_PRINTF1(_L("Removed the file from C Drive......"));
INFO_PRINTF1(_L("Updating the list ......"));
iControlCount=iControlList->UpdateCount();
while(iControlList->UpdateCount()<=iControlCount)
@@ -440,14 +449,6 @@
// connect to the test utils server
User::LeaveIfError(iTestServ.Connect());
- RApaLsSession ls;
- User::LeaveIfError(ls.Connect());
-
- TRequestStatus status;
- ls.SetNotify(ETrue, status);
- User::WaitForRequest(status);
- ls.Close();
-
// Run the tests...w
TRAPD(ret,DoStepTestsInCallbackL())
TEST(ret==KErrNone);