@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−#include "HomeKeyWatcher.h"
17+#include "WindowInputMonitor.h"
1818
1919#include <QTest>
2020#include <QSignalSpy>
@@ -71,7 +71,7 @@ public:
7171
7272using namespace UnityUtil;
7373
74−class HomeKeyWatcherTest : public QObject {
74+class WindowInputMonitorTest : public QObject {
7575 Q_OBJECT
7676private Q_SLOTS:
7777 void init(); // called right before each and every test function is executed
@@ -88,25 +88,25 @@ private:
8888 FakeTimerFactory *m_fakeTimerFactory;
8989};
9090
91−void HomeKeyWatcherTest::init()
91+void WindowInputMonitorTest::init()
9292{
9393 m_fakeTimerFactory = new FakeTimerFactory;
9494}
9595
96−void HomeKeyWatcherTest::cleanup()
96+void WindowInputMonitorTest::cleanup()
9797{
9898 delete m_fakeTimerFactory;
9999 m_fakeTimerFactory = nullptr;
100100}
101101
102102
103−void HomeKeyWatcherTest::passTime(qint64 timeSpanMs)
103+void WindowInputMonitorTest::passTime(qint64 timeSpanMs)
104104{
105105 qint64 finalTime = FakeElapsedTimer::msecsSinceEpoch + timeSpanMs;
106106 m_fakeTimerFactory->updateTime(finalTime);
107107}
108108
109−void HomeKeyWatcherTest::touchTapTouch_data()
109+void WindowInputMonitorTest::touchTapTouch_data()
110110{
111111 QTest::addColumn<int>("silenceBeforeTap");
112112 QTest::addColumn<int>("tapDuration");
@@ -121,14 +121,14 @@ void HomeKeyWatcherTest::touchTapTouch_data()
121121 QTest::newRow("isolated long press") << 1000 << 200 << 1000 << 0;
122122}
123123
124−void HomeKeyWatcherTest::touchTapTouch()
124+void WindowInputMonitorTest::touchTapTouch()
125125{
126126 QFETCH(int, silenceBeforeTap);
127127 QFETCH(int, tapDuration);
128128 QFETCH(int, silenceAfterTap);
129129 QFETCH(int, expectedActivatedCount);
130− HomeKeyWatcher homeKeyWatcher(m_fakeTimerFactory->create(), new FakeElapsedTimer);
131− QSignalSpy activatedSpy(&homeKeyWatcher, &HomeKeyWatcher::activated);
130+ WindowInputMonitor homeKeyWatcher(m_fakeTimerFactory->create(), new FakeElapsedTimer);
131+ QSignalSpy activatedSpy(&homeKeyWatcher, &WindowInputMonitor::activated);
132132 QVERIFY(activatedSpy.isValid());
133133
134134 {
@@ -186,10 +186,10 @@ void HomeKeyWatcherTest::touchTapTouch()
186186 QCOMPARE(activatedSpy.count(), expectedActivatedCount);
187187}
188188
189−void HomeKeyWatcherTest::tapWhileTouching()
189+void WindowInputMonitorTest::tapWhileTouching()
190190{
191− HomeKeyWatcher homeKeyWatcher(m_fakeTimerFactory->create(), new FakeElapsedTimer);
192− QSignalSpy activatedSpy(&homeKeyWatcher, &HomeKeyWatcher::activated);
191+ WindowInputMonitor homeKeyWatcher(m_fakeTimerFactory->create(), new FakeElapsedTimer);
192+ QSignalSpy activatedSpy(&homeKeyWatcher, &WindowInputMonitor::activated);
193193 QVERIFY(activatedSpy.isValid());
194194
195195 {
@@ -318,6 +318,6 @@ AbstractTimer *FakeTimerFactory::create(QObject *parent)
318318 return fakeTimer;
319319}
320320
321−QTEST_GUILESS_MAIN(HomeKeyWatcherTest)
321+QTEST_GUILESS_MAIN(WindowInputMonitorTest)
322322
323−#include "HomeKeyWatcherTest.moc"
323+#include "WindowInputMonitorTest.moc"