author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 00:16:48 +0300 | |
changeset 77 | 2be0b271d017 |
parent 72 | c76a0b1755b9 |
child 76 | cfea66083b62 |
permissions | -rw-r--r-- |
37 | 1 |
/*! |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: Unit tests for PhoneResourceAdapter. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include <QtTest/QtTest> |
|
19 |
#include <QtGui> |
|
20 |
#include <hbapplication.h> |
|
21 |
#include <QSignalSpy> |
|
22 |
#include <QVariant> |
|
23 |
#include <hbaction.h> |
|
24 |
#include <phoneappvoipcommands.hrh> |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
25 |
#include <xqphoneappcommands.h> |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
26 |
#include <mockservice.h> |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
27 |
#include "qtestmains60.h" |
37 | 28 |
#include "phoneresourceadapter.h" |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
29 |
#include "phoneuiqtbuttonscontroller.h" |
37 | 30 |
#include "phoneresourceids.h" |
31 |
#include "phoneui.hrh" |
|
32 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
33 |
class TestPhoneResourceAdapter : public QObject, MockService |
37 | 34 |
{ |
35 |
Q_OBJECT |
|
36 |
public: |
|
37 |
TestPhoneResourceAdapter(); |
|
38 |
virtual ~TestPhoneResourceAdapter(); |
|
39 |
||
40 |
public slots: |
|
41 |
void initTestCase (); |
|
42 |
void cleanupTestCase (); |
|
43 |
void init (); |
|
44 |
void cleanup (); |
|
45 |
||
46 |
private slots: |
|
47 |
void testConvert (); |
|
48 |
void testConvertToString (); |
|
49 |
void testConvertToString2 (); |
|
50 |
void testDefaultToolbarResourceId(); |
|
51 |
void testConvertCommandToString(); |
|
52 |
void testConvertToHbActions(); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
53 |
void testConvertToToolBarCommandList(); |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
54 |
void testBtToolBarCommandList(); |
37 | 55 |
|
56 |
private: |
|
57 |
void testIncallToolbar (int id); // helper function |
|
58 |
||
59 |
private: |
|
60 |
PhoneResourceAdapter *m_resourceAdapter; // class under test |
|
61 |
}; |
|
62 |
||
63 |
TestPhoneResourceAdapter::TestPhoneResourceAdapter () |
|
64 |
{ |
|
65 |
} |
|
66 |
||
67 |
TestPhoneResourceAdapter::~TestPhoneResourceAdapter () |
|
68 |
{ |
|
69 |
} |
|
70 |
||
71 |
void TestPhoneResourceAdapter::initTestCase () |
|
72 |
{ |
|
73 |
m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
|
74 |
} |
|
75 |
||
76 |
void TestPhoneResourceAdapter::cleanupTestCase () |
|
77 |
{ |
|
78 |
delete m_resourceAdapter; |
|
79 |
} |
|
80 |
||
81 |
void TestPhoneResourceAdapter::init () |
|
82 |
{ |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
83 |
initialize(); |
37 | 84 |
} |
85 |
||
86 |
void TestPhoneResourceAdapter::cleanup () |
|
87 |
{ |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
88 |
reset(); |
37 | 89 |
} |
90 |
||
91 |
void TestPhoneResourceAdapter::testConvert () |
|
92 |
{ |
|
93 |
// For coverage |
|
94 |
m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
|
95 |
PhoneUIQtButtonsController* buttonsController = |
|
96 |
m_resourceAdapter->buttonsController (); |
|
97 |
||
98 |
QMap<PhoneAction::ActionType, PhoneAction *> map; |
|
99 |
PhoneAction *action = map [PhoneAction::LeftButton]; |
|
100 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
101 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_incoming_call") ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
102 |
map = m_resourceAdapter->convert(R_PHONEUI_MTCAL_INCOMING_CALL); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
103 |
QVERIFY(verify()); |
37 | 104 |
QCOMPARE (map.size (), 1); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
105 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
106 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_disconnected") ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
107 |
map = m_resourceAdapter->convert (R_PHONEUI_INCALL_CALL_DISCONNECTED); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
108 |
QVERIFY(verify()); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
109 |
QCOMPARE (map.size (), 1); |
37 | 110 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
111 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_on_hold") ); |
37 | 112 |
map = m_resourceAdapter->convert (R_PHONEUI_INCALL_CALL_HELD); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
113 |
QVERIFY(verify()); |
37 | 114 |
QCOMPARE (map.size (), 1); |
115 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
116 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_waiting") ); |
37 | 117 |
map = m_resourceAdapter->convert (R_PHONEUI_MULTC_WAITING); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
118 |
QVERIFY(verify()); |
37 | 119 |
QCOMPARE (map.size (), 1); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
120 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
121 |
EXPECT( PhoneAction, setText).with ( QString("%:0%H%:1%T%:2%S%:3") ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
122 |
map = m_resourceAdapter->convert (R_PHONEUI_TIME_DURAT_LONG_WITH_ZERO); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
123 |
QVERIFY(verify()); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
124 |
QCOMPARE (map.size (), 1); |
37 | 125 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
126 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_calling") ); |
37 | 127 |
map = m_resourceAdapter->convert (R_PHONEUI_OUT_GOING_CALL); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
128 |
QVERIFY(verify()); |
37 | 129 |
QCOMPARE (map.size (), 1); |
130 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
131 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_private_number") ); |
37 | 132 |
map = m_resourceAdapter->convert (R_PHONEUI_MTCAL_CLI_WITHHELD); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
133 |
QVERIFY(verify()); |
37 | 134 |
QCOMPARE (map.size (), 1); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
135 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
136 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_unknown_number") ); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
137 |
map = m_resourceAdapter->convert (R_PHONEUI_MTCAL_CLI_UNKNOWN); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
138 |
QVERIFY(verify()); |
37 | 139 |
QCOMPARE (map.size (), 1); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
140 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
141 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_emergency_call") ); |
37 | 142 |
map = m_resourceAdapter->convert (R_PHONEUI_EMERGENCY_CALL_HEADER); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
143 |
QVERIFY(verify()); |
37 | 144 |
QCOMPARE (map.size (), 1); |
145 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
146 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_attempting") ); |
37 | 147 |
map = m_resourceAdapter->convert (R_PHONEUI_ATTEMPTING_EMERGENCY_CALL_TEXT); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
148 |
QVERIFY(verify()); |
37 | 149 |
QCOMPARE (map.size (), 1); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
150 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
151 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_other_conference_call") ); |
37 | 152 |
map = m_resourceAdapter->convert (R_PHONEUI_CONFERENCE_CALL); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
153 |
QVERIFY(verify()); |
37 | 154 |
QCOMPARE (map.size (), 1); |
155 |
||
156 |
TBuf<10> buffer(_L("123")); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
157 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_info_sending") ); |
37 | 158 |
map = m_resourceAdapter->convert (R_PHONEUI_SENDING_DTMF_WAIT_NOTE_TEXT, &buffer); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
159 |
QVERIFY(verify()); |
37 | 160 |
QCOMPARE (map.size(), 1); |
161 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
162 |
EXPECT( PhoneAction, setText).with ( QString("txt_phone_info_send_string") ); |
37 | 163 |
map = m_resourceAdapter->convert(R_PHONEUI_DTMF_WAIT_CHARACTER_CONFIRMATION_QUERY_TEXT, &buffer); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
164 |
QVERIFY(verify()); |
37 | 165 |
QCOMPARE(map.size(), 1); |
166 |
||
167 |
// TODO |
|
168 |
map = m_resourceAdapter->convert (R_PHONEUI_CALLHANDLING_INCALL_HANDSET_CBA); |
|
169 |
||
170 |
map = m_resourceAdapter->convert (0); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
171 |
// QCOMPARE (map.size (), 0); |
37 | 172 |
} |
173 |
||
174 |
void TestPhoneResourceAdapter::testConvertToString () |
|
175 |
{ |
|
176 |
m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
|
177 |
||
178 |
QString testString = m_resourceAdapter->convertToString(R_PHONE_ERROR_CALL_NOT_ALLOWED); |
|
179 |
QVERIFY( false == testString.isEmpty() ); |
|
180 |
||
181 |
QString testString2 = m_resourceAdapter->convertToString(R_ERROR_NOTE_NOT_ALLOWED); |
|
182 |
QVERIFY( false == testString2.isEmpty() ); |
|
183 |
||
184 |
QString testString3 = m_resourceAdapter->convertToString(R_NOTETEXT_INVALID_PHONENUMBER); |
|
185 |
QVERIFY( false == testString3.isEmpty() ); |
|
186 |
||
187 |
QString testString4 = m_resourceAdapter->convertToString(R_NOTETEXT_NO_ANSWER); |
|
188 |
QVERIFY( false == testString4.isEmpty() ); |
|
189 |
||
190 |
QString testString5 = m_resourceAdapter->convertToString(R_PHONE_ERROR_NUMBER_BUSY); |
|
191 |
QVERIFY( false == testString5.isEmpty() ); |
|
192 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
193 |
QString testString6 = m_resourceAdapter->convertToString(R_PHONE_ERROR_REQUEST_REJECTED); |
37 | 194 |
QVERIFY( false == testString6.isEmpty() ); |
195 |
||
196 |
QString testString7 = m_resourceAdapter->convertToString(R_PHONE_SS_NOTIFICATION_INCAL_INFO_HOLD_TEXT); |
|
197 |
QVERIFY( false == testString7.isEmpty() ); |
|
198 |
||
199 |
QString testString8 = m_resourceAdapter->convertToString(R_INCAL_INFO_HOLD_TEXT); |
|
200 |
QVERIFY( false == testString8.isEmpty() ); |
|
201 |
||
202 |
QString testString9 = m_resourceAdapter->convertToString(R_INCAL_REMOTE_ACTIVE_TEXT); |
|
203 |
QVERIFY( false == testString9.isEmpty() ); |
|
204 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
205 |
/*QString testString10 = m_resourceAdapter->convertToString(R_INCAL_INFO_CONF_HOLD_TEXT); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
206 |
QVERIFY( false == testString10.isEmpty() );*/ |
37 | 207 |
|
208 |
QString testString11 = m_resourceAdapter->convertToString(R_PHONE_INCALL_INFO_NO_NETWORK_SUPPORT); |
|
209 |
QVERIFY( false == testString11.isEmpty() ); |
|
210 |
||
211 |
QString testString12 = m_resourceAdapter->convertToString(R_PHONE_ERROR_EMERGENCY_CALLS_ONLY); |
|
212 |
QVERIFY( false == testString12.isEmpty() ); |
|
213 |
||
214 |
QString testString13 = m_resourceAdapter->convertToString(R_NOTETEXT_NUMBER_NOT_IN_USE); |
|
215 |
QVERIFY( false == testString13.isEmpty() ); |
|
216 |
||
217 |
QString testString14 = m_resourceAdapter->convertToString(R_NOTETEXT_NETWORK_BUSY); |
|
218 |
QVERIFY( false == testString14.isEmpty() ); |
|
219 |
||
220 |
QString testString15 = m_resourceAdapter->convertToString(R_NOTETEXT_ERROR_IN_CONNECTION); |
|
221 |
QVERIFY( false == testString15.isEmpty() ); |
|
222 |
||
223 |
QString testString16 = m_resourceAdapter->convertToString(R_PHONEUI_ERROR_EMERGENCY_ATTEMPT_FAILED); |
|
224 |
QVERIFY( false == testString16.isEmpty() ); |
|
225 |
||
226 |
QString testString17 = m_resourceAdapter->convertToString(R_PHONE_SS_NOTIFICATION_INCAL_TRANSFERRED_TEXT); |
|
227 |
QVERIFY( false == testString17.isEmpty() ); |
|
228 |
||
229 |
QString testString18 = m_resourceAdapter->convertToString(R_PHONE_ERROR_NO_SERVICE); |
|
230 |
QVERIFY( false == testString18.isEmpty() ); |
|
231 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
232 |
QString testString19 = m_resourceAdapter->convertToString(R_NOTETEXT_NUMBER_BARRED); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
233 |
QVERIFY( false == testString19.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
234 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
235 |
/*QString testString20 = m_resourceAdapter->convertToString(R_PHONEUI_NO_VIDEO_NETWORK); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
236 |
QVERIFY( false == testString20.isEmpty() );*/ |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
237 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
238 |
QString testString21 = m_resourceAdapter->convertToString(R_PHONEUI_VIDEO_CALL_NOT_POSSIBLE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
239 |
QVERIFY( false == testString21.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
240 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
241 |
QString testString22 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE127); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
242 |
QVERIFY( false == testString22.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
243 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
244 |
QString testString23 = m_resourceAdapter->convertToString(R_CALL_INFO_NOT_SUPPORTED); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
245 |
QVERIFY( false == testString23.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
246 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
247 |
QString testString24 = m_resourceAdapter->convertToString(R_CALL_INFO_SERVICE_NOT_AVAILABLE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
248 |
QVERIFY( false == testString24.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
249 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
250 |
QString testString25 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE38); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
251 |
QVERIFY( false == testString25.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
252 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
253 |
QString testString26 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE55); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
254 |
QVERIFY( false == testString26.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
255 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
256 |
QString testString27 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE58); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
257 |
QVERIFY( false == testString27.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
258 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
259 |
QString testString28 = m_resourceAdapter->convertToString(R_NOTE_PHONE_OUT_OF_3G_COVERAGE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
260 |
QVERIFY( false == testString28.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
261 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
262 |
QString testString29 = m_resourceAdapter->convertToString(R_NOTE_VIDEO_CALL_ONLY_POSSIBLE_UNDER_3G_COVERAGE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
263 |
QVERIFY( false == testString29.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
264 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
265 |
QString testString30 = m_resourceAdapter->convertToString(R_NOTE_CALLED_NUMBER_HAS_BARRED_INCOMING_CALLS); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
266 |
QVERIFY( false == testString30.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
267 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
268 |
QString testString31 = m_resourceAdapter->convertToString(R_INCAL_REMOTE_CREATE_CONFERENCE_TEXT); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
269 |
QVERIFY( false == testString31.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
270 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
271 |
QString testString32 = m_resourceAdapter->convertToString(R_NOTETEXT_CALL_BARRINGS); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
272 |
QVERIFY( false == testString32.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
273 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
274 |
QString testString33 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE16); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
275 |
QVERIFY( false == testString33.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
276 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
277 |
QString testString34 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE18); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
278 |
QVERIFY( false == testString34.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
279 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
280 |
QString testString35 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE21); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
281 |
QVERIFY( false == testString35.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
282 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
283 |
QString testString36 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE22); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
284 |
QVERIFY( false == testString36.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
285 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
286 |
QString testString37 = m_resourceAdapter->convertToString(R_CALL_INFO_CAUSE_VALUE34); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
287 |
QVERIFY( false == testString37.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
288 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
289 |
QString testString38 = m_resourceAdapter->convertToString(R_PHONE_ERROR_CALL_NOT_ALLOWED_FDN); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
290 |
QVERIFY( false == testString38.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
291 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
292 |
QString testString39 = m_resourceAdapter->convertToString(R_NOTE_UNABLE_TO_MAKE_VIDEO_CALL_NOT_SUPPORTED_BY_OTHER_PHONE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
293 |
QVERIFY( false == testString39.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
294 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
295 |
QString testString40 = m_resourceAdapter->convertToString(R_NOTETEXT_DIVERTING_INCOMING_CALL); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
296 |
QVERIFY( false == testString40.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
297 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
298 |
QString testString41 = m_resourceAdapter->convertToString(R_NOTETEXT_DIVERTING); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
299 |
QVERIFY( false == testString41.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
300 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
301 |
QString testString42 = m_resourceAdapter->convertToString(R_NOTETEXT_ALL_INCOMING_CALLS_DIVERTED); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
302 |
QVERIFY( false == testString42.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
303 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
304 |
QString testString43 = m_resourceAdapter->convertToString(R_PHONE_ERROR_CHECK_CLIR); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
305 |
QVERIFY( false == testString43.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
306 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
307 |
QString testString44 = m_resourceAdapter->convertToString(R_PHONE_SS_NOTIFICATION_CLIR_SUPPR_REJECT_TEXT); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
308 |
QVERIFY( false == testString44.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
309 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
310 |
QString testString45 = m_resourceAdapter->convertToString(R_NOTE_TEXT_CLIR_CHANGE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
311 |
QVERIFY( false == testString45.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
312 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
313 |
QString testString46 = m_resourceAdapter->convertToString(R_PHONE_ERROR_CHECK_NETWORK_SERVICES); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
314 |
QVERIFY( false == testString46.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
315 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
316 |
QString testString47 = m_resourceAdapter->convertToString(R_PHONE_INCALL_INFO_VIDEO_CALL_NOT_ALLOWED_DURING_RESTORE); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
317 |
QVERIFY( false == testString47.isEmpty() ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
318 |
|
37 | 319 |
QString testString99 = m_resourceAdapter->convertToString(0); |
320 |
QCOMPARE( testString99, QString ("") ); |
|
321 |
} |
|
322 |
||
323 |
void TestPhoneResourceAdapter::testConvertToString2 () |
|
324 |
{ |
|
325 |
m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
|
326 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
327 |
QString testString = m_resourceAdapter->convertToStringWithParam( |
37 | 328 |
R_PHONE_TEXT_COLP_CONNECTED, QString("123456")); |
329 |
||
330 |
QVERIFY( false == testString.isEmpty() ); |
|
331 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
332 |
QString testString2 = m_resourceAdapter->convertToStringWithParam(0, QString()); |
37 | 333 |
QCOMPARE( testString2, QString ("") ); |
334 |
} |
|
335 |
||
336 |
void TestPhoneResourceAdapter::testIncallToolbar (int id) |
|
337 |
{ |
|
338 |
QMap<PhoneAction::ActionType, PhoneAction *> map; |
|
339 |
PhoneAction *action; |
|
340 |
map = m_resourceAdapter->convert (id); |
|
341 |
QCOMPARE (map.size (), 4); |
|
342 |
||
343 |
switch(id) { |
|
344 |
case R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA: |
|
345 |
action = map [PhoneAction::ToolbarButton1]; |
|
346 |
QCOMPARE (action->icon (), HbIcon("qtg_mono_dialer")); |
|
347 |
action = map [PhoneAction::ToolbarButton2]; |
|
348 |
QCOMPARE (action->icon (), HbIcon("qtg_mono_mic_unmute")); |
|
349 |
QCOMPARE (action->command (), (int)EPhoneInCallCmdUnmute); |
|
350 |
action = map [PhoneAction::ToolbarButton3]; |
|
351 |
QCOMPARE (action->icon (), HbIcon("qtg_mono_speaker")); |
|
352 |
QCOMPARE (action->command (), (int)EPhoneInCallCmdActivateIhf); |
|
353 |
break; |
|
354 |
default: |
|
355 |
action = map [PhoneAction::ToolbarButton1]; |
|
356 |
QCOMPARE (action->icon (), HbIcon("qtg_mono_dialer")); |
|
357 |
action = map [PhoneAction::ToolbarButton2]; |
|
358 |
QCOMPARE (action->icon (), HbIcon("qtg_mono_mic_mute")); |
|
359 |
QCOMPARE (action->command (), (int)EPhoneInCallCmdMute); |
|
360 |
action = map [PhoneAction::ToolbarButton3]; |
|
361 |
QCOMPARE (action->icon (), HbIcon("qtg_mono_speaker")); |
|
362 |
QCOMPARE (action->command (), (int)EPhoneInCallCmdActivateIhf); |
|
363 |
break; |
|
364 |
} |
|
365 |
} |
|
366 |
||
367 |
void TestPhoneResourceAdapter::testDefaultToolbarResourceId() |
|
368 |
{ |
|
369 |
QVERIFY(m_resourceAdapter->defaultToolbarResourceId()== |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
370 |
R_PHONEUI_INCALL_DIALER_CBA); |
37 | 371 |
} |
372 |
||
373 |
void TestPhoneResourceAdapter::testConvertCommandToString () |
|
374 |
{ |
|
375 |
m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
|
376 |
||
377 |
QString testString = m_resourceAdapter->convertCommandToString( |
|
378 |
EPhoneInCallCmdEndAllCalls); |
|
379 |
QVERIFY( false == testString.isEmpty() ); |
|
380 |
||
381 |
testString = m_resourceAdapter->convertCommandToString( |
|
382 |
EPhoneInCallCmdTransfer); |
|
383 |
QVERIFY( false == testString.isEmpty() ); |
|
384 |
||
385 |
testString = m_resourceAdapter->convertCommandToString( |
|
386 |
EPhoneCmdHandoverToWlan); |
|
387 |
QVERIFY( false == testString.isEmpty() ); |
|
388 |
||
389 |
testString = m_resourceAdapter->convertCommandToString( |
|
390 |
EPhoneCmdHandoverToGsm); |
|
391 |
QVERIFY( false == testString.isEmpty() ); |
|
392 |
||
393 |
testString = m_resourceAdapter->convertCommandToString(0); |
|
394 |
QCOMPARE( testString, QString ("") ); |
|
395 |
} |
|
396 |
||
397 |
void TestPhoneResourceAdapter::testConvertToHbActions() |
|
398 |
{ |
|
399 |
m_resourceAdapter = PhoneResourceAdapter::Instance (this); |
|
400 |
||
401 |
QList<HbAction*> testList = m_resourceAdapter->convertToHbActions(R_PHONEUI_DTMF_WAIT_CHARACTER_CONFIRMATION_QUERY); |
|
402 |
QCOMPARE( testList.count(), 2 ); |
|
403 |
QCOMPARE( (int)EPhoneInCallCmdContinueSendingDtmfString, |
|
404 |
testList.at(0)->data().toInt()); |
|
405 |
QCOMPARE( (int)EPhoneInCallCmdCancelSendingDtmfString, |
|
406 |
testList.at(1)->data().toInt()); |
|
407 |
qDeleteAll(testList); |
|
408 |
testList.clear(); |
|
409 |
||
410 |
testList = m_resourceAdapter->convertToHbActions(R_PHONEUI_SENDING_DTMF_WAIT_NOTE); |
|
411 |
QCOMPARE( testList.count(), 1 ); |
|
412 |
QCOMPARE( (int)EPhoneInCallCmdCancelSendingDtmfString, |
|
413 |
testList.at(0)->data().toInt()); |
|
414 |
qDeleteAll(testList); |
|
415 |
testList.clear(); |
|
416 |
||
417 |
testList = m_resourceAdapter->convertToHbActions(0); |
|
418 |
QCOMPARE( testList.count(), 0 ); |
|
419 |
} |
|
420 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
421 |
void TestPhoneResourceAdapter::testConvertToToolBarCommandList () |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
422 |
{ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
423 |
m_resourceAdapter = PhoneResourceAdapter::Instance(this); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
424 |
PhoneUIQtButtonsController* buttonsController = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
425 |
m_resourceAdapter->buttonsController(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
426 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
427 |
QList<PhoneAction::ToolBarItem> testList; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
428 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
429 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
430 |
QCOMPARE(2,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
431 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
432 |
QVERIFY(PhoneCallComingCmdSilent == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
433 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
434 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
435 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
436 |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
437 |
// Set soft reject dimmed |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
438 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,true); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
439 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_CBA); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
440 |
QCOMPARE(2,testList.count()); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
441 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
442 |
QVERIFY(PhoneCallComingCmdSilent == testList.at(1).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
443 |
QVERIFY(false == testList.at(0).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
444 |
QVERIFY(true == testList.at(1).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
445 |
testList.clear(); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
446 |
|
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
447 |
// Set soft reject |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
448 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,false); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
449 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
450 |
QCOMPARE(2,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
451 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
452 |
QVERIFY(PhoneInCallCmdReject == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
453 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
454 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
455 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
456 |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
457 |
// Set soft reject dimmed |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
458 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,true); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
459 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_REJECT_CBA); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
460 |
QCOMPARE(2,testList.count()); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
461 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
462 |
QVERIFY(PhoneInCallCmdReject == testList.at(1).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
463 |
QVERIFY(false == testList.at(0).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
464 |
QVERIFY(true == testList.at(1).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
465 |
testList.clear(); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
466 |
|
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
467 |
// Set soft reject |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
468 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,false); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
469 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
470 |
QCOMPARE(2,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
471 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
472 |
QVERIFY(PhoneCallComingCmdSilent == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
473 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
474 |
QVERIFY(false == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
475 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
476 |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
477 |
// Set soft reject dimmed |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
478 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,true); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
479 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCOMINGCALL_SOFT_REJECT_CBA); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
480 |
QCOMPARE(2,testList.count()); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
481 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
482 |
QVERIFY(PhoneCallComingCmdSilent == testList.at(1).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
483 |
QVERIFY(false == testList.at(0).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
484 |
QVERIFY(false == testList.at(1).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
485 |
testList.clear(); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
486 |
|
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
487 |
// Set soft reject |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
488 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,false); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
489 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLWAITING_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
490 |
QCOMPARE(2,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
491 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
492 |
QVERIFY(PhoneInCallCmdJoinToConference == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
493 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
494 |
QVERIFY(false == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
495 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
496 |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
497 |
// Set soft reject dimmed |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
498 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,true); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
499 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLWAITING_CBA); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
500 |
QCOMPARE(2,testList.count()); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
501 |
QVERIFY(PhoneCallComingCmdSoftReject == testList.at(0).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
502 |
QVERIFY(PhoneInCallCmdJoinToConference == testList.at(1).mCommandId); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
503 |
QVERIFY(false == testList.at(0).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
504 |
QVERIFY(false == testList.at(1).mEnabled); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
505 |
testList.clear(); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
506 |
|
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
507 |
// Set soft reject |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
508 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::DisableSoftReject,false); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
509 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
510 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_EMERGENCY_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
511 |
QCOMPARE(2,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
512 |
QVERIFY(PhoneInCallCmdActivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
513 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
514 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
515 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
516 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
517 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
518 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_DIALER_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
519 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
520 |
QVERIFY(PhoneInCallCmdActivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
521 |
QVERIFY(PhoneInCallCmdHold == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
522 |
QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
523 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
524 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
525 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
526 |
QVERIFY(true == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
527 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
528 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
529 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
530 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
531 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
532 |
QVERIFY(PhoneInCallCmdActivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
533 |
QVERIFY(PhoneInCallCmdHold == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
534 |
QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
535 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
536 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
537 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
538 |
QVERIFY(true == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
539 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
540 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
541 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
542 |
// Set flags hold and ihf |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
543 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::Ihf,true); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
544 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::Hold,true); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
545 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
546 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_EMERGENCY_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
547 |
QCOMPARE(2,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
548 |
QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
549 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
550 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
551 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
552 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
553 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
554 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_INCALL_DIALER_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
555 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
556 |
QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
557 |
QVERIFY(PhoneInCallCmdUnhold == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
558 |
QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
559 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
560 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
561 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
562 |
QVERIFY(true == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
563 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
564 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
565 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
566 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
567 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
568 |
QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
569 |
QVERIFY(PhoneInCallCmdUnhold == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
570 |
QVERIFY(PhoneInCallCmdOpenContacts == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
571 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
572 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
573 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
574 |
QVERIFY(true == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
575 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
576 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
577 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
578 |
// Set flag multi call |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
579 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::MultiCall,true); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
580 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
581 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
582 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
583 |
QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
584 |
QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
585 |
QVERIFY(PhoneInCallCmdCreateConference == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
586 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
587 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
588 |
QVERIFY(true == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
589 |
QVERIFY(true == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
590 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
591 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
592 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
593 |
// Set flag outgoing and conference call |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
594 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::Outgoing,true); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
595 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::Conference,true); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
596 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
597 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_UNMUTE_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
598 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
599 |
QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
600 |
QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
601 |
QVERIFY(PhoneInCallCmdJoinToConference == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
602 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
603 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
604 |
QVERIFY(false == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
605 |
QVERIFY(false == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
606 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
607 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
608 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
609 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_CALLSETUP_EMPTY_DTMFDIALER_CBA); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
610 |
QCOMPARE(4,testList.count()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
611 |
QVERIFY(PhoneInCallCmdDeactivateIhf == testList.at(0).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
612 |
QVERIFY(PhoneInCallCmdSwap == testList.at(1).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
613 |
QVERIFY(PhoneInCallCmdJoinToConference == testList.at(2).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
614 |
QVERIFY(PhoneInCallCmdOpenDialer == testList.at(3).mCommandId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
615 |
QVERIFY(true == testList.at(0).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
616 |
QVERIFY(false == testList.at(1).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
617 |
QVERIFY(false == testList.at(2).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
618 |
QVERIFY(true == testList.at(3).mEnabled); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
619 |
testList.clear(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
620 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
621 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
622 |
void TestPhoneResourceAdapter::testBtToolBarCommandList () |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
623 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
624 |
m_resourceAdapter = PhoneResourceAdapter::Instance(this); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
625 |
PhoneUIQtButtonsController* buttonsController = |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
626 |
m_resourceAdapter->buttonsController(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
627 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
628 |
QList<PhoneAction::ToolBarItem> testList; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
629 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::BluetoothAvailable,true); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
630 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::IhfAsPushButton,false); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
631 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
632 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_BTAA_CBA); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
633 |
QVERIFY(0 < testList.count()); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
634 |
QVERIFY(PhoneInCallCmdBtHandsfree == testList.at(0).mCommandId); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
635 |
QVERIFY(true == testList.at(0).mEnabled); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
636 |
testList.clear(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
637 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
638 |
buttonsController->setButtonFlags(PhoneUIQtButtonsController::Btaa,true); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
639 |
testList = m_resourceAdapter->convertToToolBarCommandList(R_PHONEUI_CALLHANDLING_INCALL_BTAA_CBA); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
640 |
QVERIFY(0 < testList.count()); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
641 |
QVERIFY(PhoneInCallCmdHandset == testList.at(0).mCommandId); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
642 |
QVERIFY(true == testList.at(0).mEnabled); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
643 |
testList.clear(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
644 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
645 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
646 |
QTEST_MAIN_S60(TestPhoneResourceAdapter) |
37 | 647 |
#include "unit_tests.moc" |