105 |
105 |
106 void TestPhoneNoteController::testShowGlobalNoteDefault () |
106 void TestPhoneNoteController::testShowGlobalNoteDefault () |
107 { |
107 { |
108 TPhoneCmdParamGlobalNote globalNoteParam; |
108 TPhoneCmdParamGlobalNote globalNoteParam; |
109 globalNoteParam.SetTimeout(0); |
109 globalNoteParam.SetTimeout(0); |
110 globalNoteParam.SetWaitForReady(ETrue); |
|
111 m_noteController->showGlobalNote(&globalNoteParam); |
110 m_noteController->showGlobalNote(&globalNoteParam); |
112 QTest::qWait(2500); |
111 QTest::qWait(2500); |
113 |
112 |
114 globalNoteParam.SetTimeout(KPhoneNoteNoTimeout); |
113 globalNoteParam.SetTimeout(KPhoneNoteNoTimeout); |
115 m_noteController->showGlobalNote(&globalNoteParam); |
114 m_noteController->showGlobalNote(&globalNoteParam); |
118 |
117 |
119 void TestPhoneNoteController::testShowGlobalInfoNoteWithResourceId () |
118 void TestPhoneNoteController::testShowGlobalInfoNoteWithResourceId () |
120 { |
119 { |
121 TPhoneCmdParamGlobalNote globalNoteParam; |
120 TPhoneCmdParamGlobalNote globalNoteParam; |
122 globalNoteParam.SetTextResourceId(R_NOTETEXT_NO_ANSWER); |
121 globalNoteParam.SetTextResourceId(R_NOTETEXT_NO_ANSWER); |
123 globalNoteParam.SetWaitForReady(EFalse); |
|
124 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
122 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
125 |
123 |
126 m_noteController->showGlobalNote(&globalNoteParam); |
124 m_noteController->showGlobalNote(&globalNoteParam); |
127 |
125 |
128 QTest::qWait(5000); |
126 QTest::qWait(5000); |
129 } |
127 } |
130 |
128 |
131 void TestPhoneNoteController::testShowGlobalWarningNoteWithText () |
129 void TestPhoneNoteController::testShowGlobalWarningNoteWithText () |
132 { |
130 { |
133 TPhoneCmdParamGlobalNote globalNoteParam; |
131 TPhoneCmdParamGlobalNote globalNoteParam; |
134 globalNoteParam.SetWaitForReady(ETrue); |
|
135 globalNoteParam.SetType( EPhoneMessageBoxWarning ); |
132 globalNoteParam.SetType( EPhoneMessageBoxWarning ); |
136 globalNoteParam.SetText(_L("Test note 1")); |
133 globalNoteParam.SetText(_L("Test note 1")); |
137 |
134 |
138 m_noteController->showGlobalNote(&globalNoteParam); |
135 m_noteController->showGlobalNote(&globalNoteParam); |
139 } |
136 } |
140 |
137 |
141 void TestPhoneNoteController::testShowGlobalNoteWithTextAndResourceId () |
138 void TestPhoneNoteController::testShowGlobalNoteWithTextAndResourceId () |
142 { |
139 { |
143 TPhoneCmdParamGlobalNote globalNoteParam; |
140 TPhoneCmdParamGlobalNote globalNoteParam; |
144 globalNoteParam.SetTextResourceId(R_PHONE_TEXT_COLP_CONNECTED); |
141 globalNoteParam.SetTextResourceId(R_PHONE_TEXT_COLP_CONNECTED); |
145 globalNoteParam.SetWaitForReady(EFalse); |
|
146 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
142 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
147 globalNoteParam.SetText(_L("Test number")); |
143 globalNoteParam.SetText(_L("Test number")); |
148 |
144 |
149 m_noteController->showGlobalNote(&globalNoteParam); |
145 m_noteController->showGlobalNote(&globalNoteParam); |
150 |
146 |
153 |
149 |
154 void TestPhoneNoteController::testShowGlobalNoteTwoTimes () |
150 void TestPhoneNoteController::testShowGlobalNoteTwoTimes () |
155 { |
151 { |
156 TPhoneCmdParamGlobalNote globalNoteParam; |
152 TPhoneCmdParamGlobalNote globalNoteParam; |
157 //globalNoteParam.SetTextResourceId(R_NOTETEXT_NO_ANSWER); |
153 //globalNoteParam.SetTextResourceId(R_NOTETEXT_NO_ANSWER); |
158 globalNoteParam.SetWaitForReady(EFalse); |
|
159 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
154 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
160 globalNoteParam.SetText(_L("Test note 2")); |
155 globalNoteParam.SetText(_L("Test note 2")); |
161 |
156 |
162 m_noteController->showGlobalNote(&globalNoteParam); |
157 m_noteController->showGlobalNote(&globalNoteParam); |
163 |
158 |
171 |
166 |
172 void TestPhoneNoteController::testShowGlobalNoteThreeTimes () |
167 void TestPhoneNoteController::testShowGlobalNoteThreeTimes () |
173 { |
168 { |
174 TPhoneCmdParamGlobalNote globalNoteParam; |
169 TPhoneCmdParamGlobalNote globalNoteParam; |
175 //globalNoteParam.SetTextResourceId(R_NOTETEXT_NO_ANSWER); |
170 //globalNoteParam.SetTextResourceId(R_NOTETEXT_NO_ANSWER); |
176 globalNoteParam.SetWaitForReady(EFalse); |
|
177 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
171 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
178 globalNoteParam.SetText(_L("Test note 4")); |
172 globalNoteParam.SetText(_L("Test note 4")); |
179 |
173 |
180 m_noteController->showGlobalNote(&globalNoteParam); |
174 m_noteController->showGlobalNote(&globalNoteParam); |
181 |
175 |
295 |
289 |
296 void TestPhoneNoteController::testShowIndicationDialogWithText () |
290 void TestPhoneNoteController::testShowIndicationDialogWithText () |
297 { |
291 { |
298 TPhoneCmdParamGlobalNote globalNoteParam; |
292 TPhoneCmdParamGlobalNote globalNoteParam; |
299 globalNoteParam.SetNotificationDialog( ETrue ); |
293 globalNoteParam.SetNotificationDialog( ETrue ); |
300 globalNoteParam.SetType( EAknGlobalWarningNote ); |
294 globalNoteParam.SetType( EPhoneMessageBoxWarning ); |
301 globalNoteParam.SetText(_L("Test indication 1")); |
295 globalNoteParam.SetText(_L("Test indication 1")); |
302 |
296 |
303 m_noteController->showGlobalNote(&globalNoteParam); |
297 m_noteController->showGlobalNote(&globalNoteParam); |
304 } |
298 } |
305 |
299 |