author | Simon Howkins <simonh@symbian.org> |
Mon, 15 Nov 2010 14:53:34 +0000 | |
branch | RCL_3 |
changeset 105 | 871af676edac |
parent 94 | 919f36ff910f |
permissions | -rw-r--r-- |
8
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
8 |
* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
11 |
* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
13 |
* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
15 |
* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
16 |
* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
17 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
18 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
19 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
20 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
21 |
// INCLUDE FILES |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
22 |
#include <e32math.h> |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
23 |
#include <es_sock.h> |
94 | 24 |
#include "downloadmgrclientapitest.h" |
8
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
25 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
26 |
// EXTERNAL DATA STRUCTURES |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
27 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
28 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
29 |
// EXTERNAL FUNCTION PROTOTYPES |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
30 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
31 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
32 |
// CONSTANTS |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
33 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
34 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
35 |
// MACROS |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
36 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
37 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
38 |
// LOCAL CONSTANTS AND MACROS |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
39 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
40 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
41 |
// MODULE DATA STRUCTURES |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
42 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
43 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
44 |
// LOCAL FUNCTION PROTOTYPES |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
45 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
46 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
47 |
// FORWARD DECLARATIONS |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
48 |
// None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
49 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
50 |
// ==================== LOCAL FUNCTIONS ======================================= |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
51 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
52 |
// ============================ MEMBER FUNCTIONS =============================== |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
53 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
54 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
55 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
56 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
57 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
58 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
59 |
Method: ManagerConnectLTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
60 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
61 |
Description: Test the RHttpDownloadMgr ConnectL method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
62 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
63 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
64 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
65 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
66 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
67 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
68 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
69 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
70 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
71 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
72 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
73 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
74 |
TInt CDownloadMgrClientApiTest::ManagerConnectLTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
75 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
76 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
77 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
78 |
_LIT( KData ,"Test the RHttpDownloadMgr ConnectL method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
79 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
80 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
81 |
RHttpDownloadMgr downloadMgr; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
82 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
83 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
84 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
85 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
86 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
87 |
downloadMgr.ConnectL( TUid::Uid( KThisAppUid ), *this, EFalse ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
88 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
89 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
90 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
91 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
92 |
// RHttpDownloadMgr::ConnectL provides no results, so if we've gotten this far assume success |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
93 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
94 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
95 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
96 |
downloadMgr.Close(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
97 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
98 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
99 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
100 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
101 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
102 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
103 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
104 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
105 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
106 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
107 |
Method: ManagerVersionTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
108 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
109 |
Description: Test the RHttpDownloadMgr Version method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
110 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
111 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
112 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
113 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
114 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
115 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
116 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
117 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
118 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
119 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
120 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
121 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
122 |
TInt CDownloadMgrClientApiTest::ManagerVersionTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
123 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
124 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
125 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
126 |
_LIT( KData ,"Test the RHttpDownloadMgr Version method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
127 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
128 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
129 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
130 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
131 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
132 |
TVersion version; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
133 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
134 |
version = iDownloadManager.Version(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
135 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
136 |
if (version.iMinor > 0) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
137 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
138 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
139 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
140 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
141 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
142 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
143 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
144 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
145 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
146 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
147 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
148 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
149 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
150 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
151 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
152 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
153 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
154 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
155 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
156 |
Method: ManagerCloseTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
157 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
158 |
Description: Test the RHttpDownloadMgr Close method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
159 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
160 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
161 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
162 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
163 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
164 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
165 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
166 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
167 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
168 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
169 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
170 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
171 |
TInt CDownloadMgrClientApiTest::ManagerCloseTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
172 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
173 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
174 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
175 |
_LIT( KData ,"Test the RHttpDownloadMgr Close method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
176 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
177 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
178 |
RHttpDownloadMgr downloadMgr; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
179 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
180 |
downloadMgr.ConnectL( TUid::Uid( KThisAppUid ), *this, EFalse ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
181 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
182 |
downloadMgr.Close(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
183 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
184 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
185 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
186 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
187 |
// RHttpDownloadMgr::Close provides no results, so if we've gotten this far assume success |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
188 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
189 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
190 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
191 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
192 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
193 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
194 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
195 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
196 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
197 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
198 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
199 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
200 |
Method: ManagerCurrentDownloadsTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
201 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
202 |
Description: Test the RHttpDownloadMgr CurrentDownloads method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
203 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
204 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
205 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
206 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
207 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
208 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
209 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
210 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
211 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
212 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
213 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
214 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
215 |
TInt CDownloadMgrClientApiTest::ManagerCurrentDownloadsTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
216 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
217 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
218 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
219 |
_LIT( KData ,"Test the RHttpDownloadMgr CurrentDownloads method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
220 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
221 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
222 |
const CDownloadArray* array; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
223 |
array = &iDownloadManager.CurrentDownloads(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
224 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
225 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
226 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
227 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
228 |
if (array->Count() == 0) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
229 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
230 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
231 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
232 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
233 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
234 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
235 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
236 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
237 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
238 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
239 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
240 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
241 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
242 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
243 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
244 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
245 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
246 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
247 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
248 |
Method: ManagerCreateDownloadLWithBoolTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
249 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
250 |
Description: Test the RHttpDownloadMgr CreateDownloadL method with TBool argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
251 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
252 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
253 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
254 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
255 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
256 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
257 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
258 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
259 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
260 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
261 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
262 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
263 |
TInt CDownloadMgrClientApiTest::ManagerCreateDownloadLWithBoolTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
264 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
265 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
266 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
267 |
_LIT( KData ,"Test the RHttpDownloadMgr CreateDownloadL method with TBool argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
268 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
269 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
270 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
271 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
272 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
273 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
274 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
275 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
276 |
TBool isNewDl = ETrue; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
277 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url, isNewDl ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
278 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
279 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
280 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
281 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
282 |
if ( &download != NULL ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
283 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
284 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
285 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
286 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
287 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
288 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
289 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
290 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
291 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
292 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
293 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
294 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
295 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
296 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
297 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
298 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
299 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
300 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
301 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
302 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
303 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
304 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
305 |
Method: ManagerCreateDownloadLTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
306 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
307 |
Description: Test the RHttpDownloadMgr CreateDownloadL method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
308 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
309 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
310 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
311 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
312 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
313 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
314 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
315 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
316 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
317 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
318 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
319 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
320 |
TInt CDownloadMgrClientApiTest::ManagerCreateDownloadLTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
321 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
322 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
323 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
324 |
_LIT( KData ,"Test the RHttpDownloadMgr CreateDownloadL method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
325 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
326 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
327 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
328 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
329 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
330 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
331 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
332 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
333 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
334 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
335 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
336 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
337 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
338 |
if ( &download != NULL ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
339 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
340 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
341 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
342 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
343 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
344 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
345 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
346 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
347 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
348 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
349 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
350 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
351 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
352 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
353 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
354 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
355 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
356 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
357 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
358 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
359 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
360 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
361 |
Method: ManagerCreateClientSideDownloadLTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
362 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
363 |
Description: Test the RHttpDownloadMgr CreateClientSideDownloadL method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
364 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
365 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
366 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
367 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
368 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
369 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
370 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
371 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
372 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
373 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
374 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
375 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
376 |
TInt CDownloadMgrClientApiTest::ManagerCreateClientSideDownloadLTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
377 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
378 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
379 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
380 |
_LIT( KData ,"Test the RHttpDownloadMgr CreateClientSideDownloadL method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
381 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
382 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
383 |
_LIT( KUnableToTest1 ,"Unable to test CreateClientSideDownloadL method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
384 |
TestModuleIf().Printf( 0, KDefinition, KUnableToTest1 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
385 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
386 |
_LIT( KUnableToTest2 ,"S60 3rd Edition SDK does not provide a way to create the required CHttpTransaction"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
387 |
TestModuleIf().Printf( 0, KDefinition, KUnableToTest2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
388 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
389 |
// CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
390 |
// CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
391 |
// CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
392 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
393 |
// CUrlRequestInfo* requestInfo = CUrlRequestInfo::NewL(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
394 |
// CleanupStack::NewL( requestInfo ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
395 |
// _LIT( KUrl, "http://testsuite.nokia-boston.com"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
396 |
// requestInfo->SetUrlL( KUrl() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
397 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
398 |
// TBool isNewDl = ETrue; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
399 |
// RHttpDownload& download = iDownloadManager.CreateClientSideDownloadL( NULL, isNewDl ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
400 |
// RHttpDownload& download = NULL; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
401 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
402 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
403 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
404 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
405 |
// if ( &download != NULL ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
406 |
// { |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
407 |
// _LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
408 |
// aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
409 |
// } |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
410 |
// else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
411 |
// { |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
412 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
413 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
414 |
// } |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
415 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
416 |
// iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
417 |
// CleanupStack::PopAndDestroy( 2 ); // scheduler, requestInfo |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
418 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
419 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
420 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
421 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
422 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
423 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
424 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
425 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
426 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
427 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
428 |
Method: ManagerCreateCodDownloadLTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
429 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
430 |
Description: Test the RHttpDownloadMgr CreateCodDownloadL method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
431 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
432 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
433 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
434 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
435 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
436 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
437 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
438 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
439 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
440 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
441 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
442 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
443 |
TInt CDownloadMgrClientApiTest::ManagerCreateCodDownloadLTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
444 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
445 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
446 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
447 |
_LIT( KData ,"Test the RHttpDownloadMgr CreateCodDownloadL method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
448 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
449 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
450 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
451 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
452 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
453 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
454 |
_LIT8( KCodUrl, "testsuite.nokia-boston.com" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
455 |
HBufC8* buf = HBufC8::NewLC( KCodUrl().Length() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
456 |
buf->Des().Copy( KCodUrl() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
457 |
_LIT8( KCodMimeType, "text/x-co-desc" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
458 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
459 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
460 |
TInt retVal; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
461 |
RHttpDownload* download; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
462 |
download = &iDownloadManager.CreateCodDownloadL( KCodUrl(), |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
463 |
buf->Des(), |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
464 |
KCodMimeType(), |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
465 |
NULL, |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
466 |
retVal ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
467 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
468 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
469 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
470 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
471 |
if ( &download != NULL ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
472 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
473 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
474 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
475 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
476 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
477 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
478 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
479 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
480 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
481 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
482 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
483 |
CleanupStack::PopAndDestroy( 2 ); // scheduler, buf |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
484 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
485 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
486 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
487 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
488 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
489 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
490 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
491 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
492 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
493 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
494 |
Method: ManagerFindDownloadTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
495 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
496 |
Description: Test the RHttpDownloadMgr FindDownload method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
497 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
498 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
499 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
500 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
501 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
502 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
503 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
504 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
505 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
506 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
507 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
508 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
509 |
TInt CDownloadMgrClientApiTest::ManagerFindDownloadTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
510 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
511 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
512 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
513 |
_LIT( KData ,"Test the RHttpDownloadMgr FindDownload method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
514 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
515 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
516 |
TBuf<128> url = _L("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
517 |
_LIT8( KMsgBody, "123456789123456789123456789"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
518 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
519 |
HBufC8* urlToFind = HBufC8::NewLC( url.Length() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
520 |
urlToFind->Des().Copy( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
521 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
522 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
523 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
524 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
525 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
526 |
RHttpDownload* download = iDownloadManager.FindDownload( *urlToFind, KMsgBody() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
527 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
528 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
529 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
530 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
531 |
if ( download == NULL ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
532 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
533 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
534 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
535 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
536 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
537 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
538 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
539 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
540 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
541 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
542 |
CleanupStack::PopAndDestroy(); // urlToFind |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
543 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
544 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
545 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
546 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
547 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
548 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
549 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
550 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
551 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
552 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
553 |
Method: ManagerPauseAllTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
554 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
555 |
Description: Test the RHttpDownloadMgr PauseAll method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
556 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
557 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
558 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
559 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
560 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
561 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
562 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
563 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
564 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
565 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
566 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
567 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
568 |
TInt CDownloadMgrClientApiTest::ManagerPauseAllTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
569 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
570 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
571 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
572 |
_LIT( KData ,"Test the RHttpDownloadMgr PauseAll method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
573 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
574 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
575 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
576 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
577 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
578 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
579 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
580 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
581 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
582 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
583 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
584 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
585 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
586 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
587 |
download.Start(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
588 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
589 |
TInt result = iDownloadManager.PauseAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
590 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
591 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
592 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
593 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
594 |
if ( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
595 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
596 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
597 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
598 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
599 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
600 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
601 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
602 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
603 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
604 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
605 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
606 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
607 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
608 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
609 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
610 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
611 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
612 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
613 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
614 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
615 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
616 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
617 |
Method: ManagerStartAllTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
618 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
619 |
Description: Test the RHttpDownloadMgr StartAll method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
620 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
621 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
622 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
623 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
624 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
625 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
626 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
627 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
628 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
629 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
630 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
631 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
632 |
TInt CDownloadMgrClientApiTest::ManagerStartAllTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
633 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
634 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
635 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
636 |
_LIT( KData ,"Test the RHttpDownloadMgr StartAll method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
637 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
638 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
639 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
640 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
641 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
642 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
643 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
644 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
645 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
646 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
647 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
648 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
649 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
650 |
TInt result = iDownloadManager.StartAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
651 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
652 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
653 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
654 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
655 |
if ( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
656 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
657 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
658 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
659 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
660 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
661 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
662 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
663 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
664 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
665 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
666 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
667 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
668 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
669 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
670 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
671 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
672 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
673 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
674 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
675 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
676 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
677 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
678 |
Method: ManagerResetAllTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
679 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
680 |
Description: Test the RHttpDownloadMgr ResetAll method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
681 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
682 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
683 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
684 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
685 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
686 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
687 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
688 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
689 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
690 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
691 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
692 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
693 |
TInt CDownloadMgrClientApiTest::ManagerResetAllTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
694 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
695 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
696 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
697 |
_LIT( KData ,"Test the RHttpDownloadMgr ResetAll method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
698 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
699 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
700 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
701 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
702 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
703 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
704 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
705 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
706 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
707 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
708 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
709 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
710 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
711 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
712 |
iDownloadManager.StartAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
713 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
714 |
TInt result = iDownloadManager.ResetAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
715 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
716 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
717 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
718 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
719 |
if ( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
720 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
721 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
722 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
723 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
724 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
725 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
726 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
727 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
728 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
729 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
730 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
731 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
732 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
733 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
734 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
735 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
736 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
737 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
738 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
739 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
740 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
741 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
742 |
Method: ManagerDeleteAllTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
743 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
744 |
Description: Test the RHttpDownloadMgr DeleteAll method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
745 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
746 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
747 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
748 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
749 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
750 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
751 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
752 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
753 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
754 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
755 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
756 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
757 |
TInt CDownloadMgrClientApiTest::ManagerDeleteAllTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
758 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
759 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
760 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
761 |
_LIT( KData ,"Test the RHttpDownloadMgr DeleteAll method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
762 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
763 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
764 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
765 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
766 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
767 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
768 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
769 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
770 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
771 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
772 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
773 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
774 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
775 |
TInt result = iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
776 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
777 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
778 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
779 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
780 |
if ( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
781 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
782 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
783 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
784 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
785 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
786 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
787 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
788 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
789 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
790 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
791 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
792 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
793 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
794 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
795 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
796 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
797 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
798 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
799 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
800 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
801 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
802 |
Method: ManagerDisconnectTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
803 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
804 |
Description: Test the RHttpDownloadMgr Disconnect method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
805 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
806 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
807 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
808 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
809 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
810 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
811 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
812 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
813 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
814 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
815 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
816 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
817 |
TInt CDownloadMgrClientApiTest::ManagerDisconnectTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
818 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
819 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
820 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
821 |
_LIT( KData ,"Test the RHttpDownloadMgr Disconnect method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
822 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
823 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
824 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
825 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
826 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
827 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
828 |
// Added To avoid user Input while Automation in is Progress |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
829 |
// 7 - SONERA GPRS Access Point |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
830 |
TInt dlresult = iDownloadManager.SetIntAttribute( EDlMgrIap, 7 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
831 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
832 |
TBuf8<128> url = _L8("http://waplabdc.nokia-boston.com/browser/users/s60_devtests/nightly_ss_on.xml"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
833 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
834 |
RHttpDownload& download = iDownloadManager.CreateDownloadL( url ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
835 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
836 |
TInt result = iDownloadManager.Disconnect(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
837 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
838 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
839 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
840 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
841 |
if ( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
842 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
843 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
844 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
845 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
846 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
847 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
848 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
849 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
850 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
851 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
852 |
iDownloadManager.DeleteAll(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
853 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
854 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
855 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
856 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
857 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
858 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
859 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
860 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
861 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
862 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
863 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
864 |
Method: ManagerGetIntAttributeTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
865 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
866 |
Description: Test the RHttpDownloadMgr GetIntAttribute method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
867 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
868 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
869 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
870 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
871 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
872 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
873 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
874 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
875 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
876 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
877 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
878 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
879 |
TInt CDownloadMgrClientApiTest::ManagerGetIntAttributeTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
880 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
881 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
882 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
883 |
_LIT( KData ,"Test the RHttpDownloadMgr GetIntAttribute method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
884 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
885 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
886 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
887 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
888 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
889 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
890 |
TInt32 value; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
891 |
TInt result = iDownloadManager.GetIntAttribute( EDlMgrAppUid, value ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
892 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
893 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
894 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
895 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
896 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
897 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
898 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
899 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
900 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
901 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
902 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
903 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
904 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
905 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
906 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
907 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
908 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
909 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
910 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
911 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
912 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
913 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
914 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
915 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
916 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
917 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
918 |
Method: ManagerGetBoolAttributeTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
919 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
920 |
Description: Test the RHttpDownloadMgr GetBoolAttribute method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
921 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
922 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
923 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
924 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
925 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
926 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
927 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
928 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
929 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
930 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
931 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
932 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
933 |
TInt CDownloadMgrClientApiTest::ManagerGetBoolAttributeTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
934 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
935 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
936 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
937 |
_LIT( KData ,"Test the RHttpDownloadMgr GetBoolAttribute method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
938 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
939 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
940 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
941 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
942 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
943 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
944 |
TBool value; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
945 |
TInt result = iDownloadManager.GetBoolAttribute( EDlMgrConnected, value ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
946 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
947 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
948 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
949 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
950 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
951 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
952 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
953 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
954 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
955 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
956 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
957 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
958 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
959 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
960 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
961 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
962 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
963 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
964 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
965 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
966 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
967 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
968 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
969 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
970 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
971 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
972 |
Method: ManagerGetStringAttribute16Test |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
973 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
974 |
Description: Test the RHttpDownloadMgr GetStringAttribute method with TDesC16 argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
975 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
976 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
977 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
978 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
979 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
980 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
981 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
982 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
983 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
984 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
985 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
986 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
987 |
TInt CDownloadMgrClientApiTest::ManagerGetStringAttribute16Test( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
988 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
989 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
990 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
991 |
_LIT( KData ,"Test the RHttpDownloadMgr GetStringAttribute method with TDesC16 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
992 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
993 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
994 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
995 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
996 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
997 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
998 |
HBufC16* stringAttr = HBufC16::NewLC( KMaxUrlLength ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
999 |
TPtr16 stringAttrPtr = stringAttr->Des(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1000 |
TInt result = iDownloadManager.GetStringAttribute( EDlMgrCodFolder, stringAttrPtr ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1001 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1002 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1003 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1004 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1005 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1006 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1007 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1008 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1009 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1010 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1011 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1012 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1013 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1014 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1015 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1016 |
CleanupStack::PopAndDestroy( 2 ); // scheduler, stringAttr |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1017 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1018 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1019 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1020 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1021 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1022 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1023 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1024 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1025 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1026 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1027 |
Method: ManagerGetStringAttribute8Test |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1028 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1029 |
Description: Test the RHttpDownloadMgr GetStringAttribute method with TDesC8 argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1030 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1031 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1032 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1033 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1034 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1035 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1036 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1037 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1038 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1039 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1040 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1041 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1042 |
TInt CDownloadMgrClientApiTest::ManagerGetStringAttribute8Test( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1043 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1044 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1045 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1046 |
_LIT( KData ,"Test the RHttpDownloadMgr GetStringAttribute method with TDesC8 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1047 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1048 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1049 |
_LIT( KFailReason1 ,"RHttpDownloadMgr GetStringAttribute method with TDesC8 argument results in a panic/leave every time it is called"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1050 |
TestModuleIf().Printf( 0, KDefinition, KFailReason1 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1051 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1052 |
_LIT( KFailReason2 ,"Unable to test GetStringAttribute method with TDesC8 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1053 |
TestModuleIf().Printf( 0, KDefinition, KFailReason2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1054 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1055 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1056 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1057 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1058 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1059 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1060 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1061 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1062 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1063 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1064 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1065 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1066 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1067 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1068 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1069 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1070 |
Method: ManagerSetIntAttributeTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1071 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1072 |
Description: Test the RHttpDownloadMgr SetIntAttribute method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1073 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1074 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1075 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1076 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1077 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1078 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1079 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1080 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1081 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1082 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1083 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1084 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1085 |
TInt CDownloadMgrClientApiTest::ManagerSetIntAttributeTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1086 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1087 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1088 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1089 |
_LIT( KData ,"Test the RHttpDownloadMgr SetIntAttribute method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1090 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1091 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1092 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1093 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1094 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1095 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1096 |
TInt result = iDownloadManager.SetIntAttribute( EDlMgrExitAction, EExitNothing ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1097 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1098 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1099 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1100 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1101 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1102 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1103 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1104 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1105 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1106 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1107 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1108 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1109 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1110 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1111 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1112 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1113 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1114 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1115 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1116 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1117 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1118 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1119 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1120 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1121 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1122 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1123 |
Method: ManagerSetBoolAttributeTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1124 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1125 |
Description: Test the RHttpDownloadMgr SetBoolAttribute method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1126 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1127 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1128 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1129 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1130 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1131 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1132 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1133 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1134 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1135 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1136 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1137 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1138 |
TInt CDownloadMgrClientApiTest::ManagerSetBoolAttributeTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1139 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1140 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1141 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1142 |
_LIT( KData ,"Test the RHttpDownloadMgr SetBoolAttribute method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1143 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1144 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1145 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1146 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1147 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1148 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1149 |
TInt result = iDownloadManager.SetBoolAttribute( EDlMgrEnableCookies, ETrue ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1150 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1151 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1152 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1153 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1154 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1155 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1156 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1157 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1158 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1159 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1160 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1161 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1162 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1163 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1164 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1165 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1166 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1167 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1168 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1169 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1170 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1171 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1172 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1173 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1174 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1175 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1176 |
Method: ManagerSetStringAttribute16Test |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1177 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1178 |
Description: Test the RHttpDownloadMgr SetStringAttribute method with TDesC16 argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1179 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1180 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1181 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1182 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1183 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1184 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1185 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1186 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1187 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1188 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1189 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1190 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1191 |
TInt CDownloadMgrClientApiTest::ManagerSetStringAttribute16Test( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1192 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1193 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1194 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1195 |
_LIT( KData ,"Test the RHttpDownloadMgr SetStringAttribute method with TDesC16 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1196 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1197 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1198 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1199 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1200 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1201 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1202 |
RSocketServ iSocketServ; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1203 |
RConnection iConnection; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1204 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1205 |
iSocketServ.Connect(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1206 |
iConnection.Open( iSocketServ ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1207 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1208 |
TName name; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1209 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1210 |
iConnection.Name( name ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1211 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1212 |
TInt result = iDownloadManager.SetStringAttribute( EDlMgrConnectionName, name ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1213 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1214 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1215 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1216 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1217 |
if( result == KErrPermissionDenied ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1218 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1219 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1220 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1221 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1222 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1223 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1224 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1225 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1226 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1227 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1228 |
iConnection.Close(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1229 |
iSocketServ.Close(); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1230 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1231 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1232 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1233 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1234 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1235 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1236 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1237 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1238 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1239 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1240 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1241 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1242 |
Method: ManagerSetStringAttribute8Test |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1243 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1244 |
Description: Test the RHttpDownloadMgr SetStringAttribute method with TDesC8 argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1245 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1246 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1247 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1248 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1249 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1250 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1251 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1252 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1253 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1254 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1255 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1256 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1257 |
TInt CDownloadMgrClientApiTest::ManagerSetStringAttribute8Test( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1258 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1259 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1260 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1261 |
_LIT( KData ,"Test the RHttpDownloadMgr SetStringAttribute method with TDesC8 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1262 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1263 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1264 |
_LIT( KFailReason1 ,"RHttpDownloadMgr SetStringAttribute method with TDesC8 argument results in a panic/leave every time it is called"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1265 |
TestModuleIf().Printf( 0, KDefinition, KFailReason1 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1266 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1267 |
_LIT( KFailReason2 ,"Unable to test SetStringAttribute method with TDesC8 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1268 |
TestModuleIf().Printf( 0, KDefinition, KFailReason2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1269 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1270 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1271 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1272 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1273 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1274 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1275 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1276 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1277 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1278 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1279 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1280 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1281 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1282 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1283 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1284 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1285 |
Method: ManagerSetDefaultIntAttributeTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1286 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1287 |
Description: Test the RHttpDownloadMgr SetDefaultIntAttribute method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1288 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1289 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1290 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1291 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1292 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1293 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1294 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1295 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1296 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1297 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1298 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1299 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1300 |
TInt CDownloadMgrClientApiTest::ManagerSetDefaultIntAttributeTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1301 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1302 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1303 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1304 |
_LIT( KData ,"Test the RHttpDownloadMgr SetDefaultIntAttribute method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1305 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1306 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1307 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1308 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1309 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1310 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1311 |
TInt result = iDownloadManager.SetDefaultIntAttribute( EDlAttrAction, ELaunch ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1312 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1313 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1314 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1315 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1316 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1317 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1318 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1319 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1320 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1321 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1322 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1323 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1324 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1325 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1326 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1327 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1328 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1329 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1330 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1331 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1332 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1333 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1334 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1335 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1336 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1337 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1338 |
Method: ManagerSetDefaultBoolAttributeTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1339 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1340 |
Description: Test the RHttpDownloadMgr SetDefaultBoolAttribute method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1341 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1342 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1343 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1344 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1345 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1346 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1347 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1348 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1349 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1350 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1351 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1352 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1353 |
TInt CDownloadMgrClientApiTest::ManagerSetDefaultBoolAttributeTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1354 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1355 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1356 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1357 |
_LIT( KData ,"Test the RHttpDownloadMgr SetDefaultBoolAttribute method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1358 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1359 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1360 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1361 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1362 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1363 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1364 |
TInt result = iDownloadManager.SetDefaultBoolAttribute( EDlAttrDisconnectOnReset, ETrue ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1365 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1366 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1367 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1368 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1369 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1370 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1371 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1372 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1373 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1374 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1375 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1376 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1377 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1378 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1379 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1380 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1381 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1382 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1383 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1384 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1385 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1386 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1387 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1388 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1389 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1390 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1391 |
Method: ManagerSetDefaultStringAttribute16Test |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1392 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1393 |
Description: Test the RHttpDownloadMgr SetDefaultStringAttribute method with TDesC16 argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1394 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1395 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1396 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1397 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1398 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1399 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1400 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1401 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1402 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1403 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1404 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1405 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1406 |
TInt CDownloadMgrClientApiTest::ManagerSetDefaultStringAttribute16Test( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1407 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1408 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1409 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1410 |
_LIT( KData ,"Test the RHttpDownloadMgr SetDefaultStringAttribute method with TDesC16 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1411 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1412 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1413 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1414 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1415 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1416 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1417 |
_LIT( KDestFilename, "c:\\logs\\DownloadMgr\\" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1418 |
TInt result = iDownloadManager.SetDefaultStringAttribute( EDlAttrDestFilename, KDestFilename() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1419 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1420 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1421 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1422 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1423 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1424 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1425 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1426 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1427 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1428 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1429 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1430 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1431 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1432 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1433 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1434 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1435 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1436 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1437 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1438 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1439 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1440 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1441 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1442 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1443 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1444 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1445 |
Method: ManagerSetDefaultStringAttribute8Test |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1446 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1447 |
Description: Test the RHttpDownloadMgr SetDefaultStringAttribute method with TDesC8 argument. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1448 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1449 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1450 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1451 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1452 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1453 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1454 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1455 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1456 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1457 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1458 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1459 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1460 |
TInt CDownloadMgrClientApiTest::ManagerSetDefaultStringAttribute8Test( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1461 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1462 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1463 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1464 |
_LIT( KData ,"Test the RHttpDownloadMgr SetDefaultStringAttribute method with TDesC8 argument"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1465 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1466 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1467 |
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1468 |
CleanupStack::PushL( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1469 |
CActiveScheduler::Install( scheduler ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1470 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1471 |
_LIT8( KUserName, "username"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1472 |
TInt result = iDownloadManager.SetDefaultStringAttribute( EDlAttrUsername, KUserName() ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1473 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1474 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1475 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1476 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1477 |
if( result == KErrNone ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1478 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1479 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1480 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1481 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1482 |
else |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1483 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1484 |
_LIT( KDescription , "Test case failed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1485 |
aResult.SetResult( KErrGeneral, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1486 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1487 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1488 |
CleanupStack::PopAndDestroy(); // scheduler |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1489 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1490 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1491 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1492 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1493 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1494 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1495 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1496 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1497 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1498 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1499 |
Method: ManagerAddObserverLTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1500 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1501 |
Description: Test the RHttpDownloadMgr AddObserverL method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1502 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1503 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1504 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1505 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1506 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1507 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1508 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1509 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1510 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1511 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1512 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1513 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1514 |
TInt CDownloadMgrClientApiTest::ManagerAddObserverLTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1515 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1516 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1517 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1518 |
_LIT( KData ,"Test the RHttpDownloadMgr AddObserverL method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1519 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1520 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1521 |
iDownloadManager.AddObserverL( *this ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1522 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1523 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1524 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1525 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1526 |
// RHttpDownloadMgr::AddObserverL provides no results, so if we've gotten this far assume success |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1527 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1528 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1529 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1530 |
iDownloadManager.RemoveObserver( *this ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1531 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1532 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1533 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1534 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1535 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1536 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1537 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1538 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1539 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1540 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1541 |
Method: ManagerRemoveObserverTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1542 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1543 |
Description: Test the RHttpDownloadMgr RemoveObserver method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1544 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1545 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1546 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1547 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1548 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1549 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1550 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1551 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1552 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1553 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1554 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1555 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1556 |
TInt CDownloadMgrClientApiTest::ManagerRemoveObserverTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1557 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1558 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1559 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1560 |
_LIT( KData ,"Test the RHttpDownloadMgr RemoveObserver method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1561 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1562 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1563 |
iDownloadManager.AddObserverL( *this ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1564 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1565 |
iDownloadManager.RemoveObserver( *this ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1566 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1567 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1568 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1569 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1570 |
// RHttpDownloadMgr::RemoveObserver provides no results, so if we've gotten this far assume success |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1571 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1572 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1573 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1574 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1575 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1576 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1577 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1578 |
/* |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1579 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1580 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1581 |
Class: CDownloadMgrClientApiTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1582 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1583 |
Method: ManagerSetNextUriObserverTest |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1584 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1585 |
Description: Test the RHttpDownloadMgr SetNextUriObserver method. |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1586 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1587 |
Parameters: TTestResult& aErrorDescription: out: |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1588 |
Test result and on error case a short description of error |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1589 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1590 |
Return Values: TInt: Always KErrNone to indicate that test was valid |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1591 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1592 |
Errors/Exceptions: None |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1593 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1594 |
Status: Approved |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1595 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1596 |
------------------------------------------------------------------------------- |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1597 |
*/ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1598 |
TInt CDownloadMgrClientApiTest::ManagerSetNextUriObserverTest( TTestResult& aResult ) |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1599 |
{ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1600 |
/* Simple server connect */ |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1601 |
_LIT( KDefinition ,"State"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1602 |
_LIT( KData ,"Test the RHttpDownloadMgr SetNextUriObserver method"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1603 |
TestModuleIf().Printf( 0, KDefinition, KData ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1604 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1605 |
iDownloadManager.SetNextUriObserver( this ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1606 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1607 |
_LIT( KData2 ,"Finished"); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1608 |
TestModuleIf().Printf( 0, KDefinition, KData2 ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1609 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1610 |
// RHttpDownloadMgr::SetNextUriObserver provides no results, so if we've gotten this far assume success |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1611 |
_LIT( KDescription , "Test case passed" ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1612 |
aResult.SetResult( KErrNone, KDescription ); |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1613 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1614 |
// Case was executed |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1615 |
return KErrNone; |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1616 |
} |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1617 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1618 |
// ================= OTHER EXPORTED FUNCTIONS ================================= |
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1619 |
|
7c90e6132015
Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff
changeset
|
1620 |
// End of File |