61 XQAiwInterfaceDescriptor descriptor; |
61 XQAiwInterfaceDescriptor descriptor; |
62 QString dummyOperation; |
62 QString dummyOperation; |
63 bool isEmbedded = false; |
63 bool isEmbedded = false; |
64 QList<XQAiwInterfaceDescriptor> interfaceList; |
64 QList<XQAiwInterfaceDescriptor> interfaceList; |
65 interfaceList.append(descriptor); |
65 interfaceList.append(descriptor); |
66 /*EXPECT(XQApplicationManager::list).returns(interfaceList); |
66 /*EXPECT(XQApplicationManager, list).returns(interfaceList); |
67 QPointer<XQAiwRequest> aiwRequest(new XQAiwRequest( |
67 QPointer<XQAiwRequest> aiwRequest(new XQAiwRequest( |
68 descriptor, dummyOperation, isEmbedded)); |
68 descriptor, dummyOperation, isEmbedded)); |
69 EXPECT(XQApplicationManager::create).returns(aiwRequest.data()); |
69 EXPECT(XQApplicationManager, create).returns(aiwRequest.data()); |
70 EXPECT(XQAiwRequest::send) |
70 EXPECT(XQAiwRequest, send) |
71 .willOnce(invoke(setValidatorReturnValue)) |
71 .willOnce(invoke(setValidatorReturnValue)) |
72 .returns(true);*/ |
72 .returns(true);*/ |
73 |
73 |
74 SmcDefaultValue<QString>::SetL(QString()); |
74 SmcDefaultValue<QString>::SetL(QString()); |
75 HbMainWindow *dummyWindow = NULL; |
75 HbMainWindow *dummyWindow = NULL; |
102 }*/ |
102 }*/ |
103 |
103 |
104 void UT_DialpadHashEventFilter::testeventFilter() |
104 void UT_DialpadHashEventFilter::testeventFilter() |
105 { |
105 { |
106 // start long press timer |
106 // start long press timer |
107 EXPECT(XQAiwRequest::send).times(0); |
107 EXPECT(XQAiwRequest, send).times(0); |
108 QKeyEvent keyEvent( |
108 QKeyEvent keyEvent( |
109 QEvent::KeyPress, |
109 QEvent::KeyPress, |
110 Qt::Key_NumberSign, |
110 Qt::Key_NumberSign, |
111 Qt::NoModifier); |
111 Qt::NoModifier); |
112 bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); |
112 bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); |
122 filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent2); |
122 filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent2); |
123 QVERIFY(!filtered); |
123 QVERIFY(!filtered); |
124 QVERIFY(verify()); |
124 QVERIFY(verify()); |
125 |
125 |
126 // some other buttons pressed and released |
126 // some other buttons pressed and released |
127 EXPECT(XQAiwRequest::send).times(0); |
127 EXPECT(XQAiwRequest, send).times(0); |
128 QKeyEvent keyEvent3( |
128 QKeyEvent keyEvent3( |
129 QEvent::KeyPress, |
129 QEvent::KeyPress, |
130 Qt::Key_3, |
130 Qt::Key_3, |
131 Qt::NoModifier); |
131 Qt::NoModifier); |
132 // start long press timer |
132 // start long press timer |
153 } |
153 } |
154 |
154 |
155 void UT_DialpadHashEventFilter::testhandleCallButtonPress() |
155 void UT_DialpadHashEventFilter::testhandleCallButtonPress() |
156 { |
156 { |
157 // inherited method not supported |
157 // inherited method not supported |
158 EXPECT(XQAiwRequest::send).times(0); |
158 EXPECT(XQAiwRequest, send).times(0); |
159 bool callButtonPress = m_eventFilter->handleCallButtonPress(); |
159 bool callButtonPress = m_eventFilter->handleCallButtonPress(); |
160 QVERIFY(!callButtonPress); |
160 QVERIFY(!callButtonPress); |
161 } |
161 } |
162 |
162 |
163 void UT_DialpadHashEventFilter::testhandleMailboxOperation() |
163 void UT_DialpadHashEventFilter::testhandleMailboxOperation() |