diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2015-08-21 13:22:27 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2015-08-21 11:23:37 +0000 |
commit | 494b6cbb94e057176e5524f3ce55a20f5b960413 (patch) | |
tree | 9e5e7dd4ac5096836c359bcb5bb3391ef98965a7 /tests/manual/gifs/tst_gifs.cpp | |
parent | 1182abcb5ab8b38a41630efe205dc4786e7d79d1 (diff) |
TabBar: add manual GIF test.
Change-Id: Ie20e3a700b5030ed8e6e172c4faad8180ac097b8
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/manual/gifs/tst_gifs.cpp')
-rw-r--r-- | tests/manual/gifs/tst_gifs.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/manual/gifs/tst_gifs.cpp b/tests/manual/gifs/tst_gifs.cpp index eb5567fc..da33eec0 100644 --- a/tests/manual/gifs/tst_gifs.cpp +++ b/tests/manual/gifs/tst_gifs.cpp @@ -54,6 +54,7 @@ private slots: void busyIndicator(); void switchGif(); void button(); + void tabBar(); private: QQuickView view; @@ -335,6 +336,37 @@ void tst_Gifs::button() gifRecorder.waitForFinish(); } +void tst_Gifs::tabBar() +{ + const QString qmlFileName = QStringLiteral("qtquickcontrols2-tabbar.qml"); + + GifRecorder gifRecorder; + gifRecorder.setDataDirPath(dataDirPath); + gifRecorder.setOutputDir(outputDir); + gifRecorder.setRecordingDuration(4); + gifRecorder.setQmlFileName(qmlFileName); + gifRecorder.setHighQuality(true); + gifRecorder.setView(&view); + + view.show(); + + gifRecorder.start(); + + QTest::mousePress(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.6, view.height() / 2), 0); + QTest::mouseRelease(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.6, view.height() / 2), 50); + + QTest::mousePress(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.9, view.height() / 2), 400); + QTest::mouseRelease(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.9, view.height() / 2), 50); + + QTest::mousePress(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.6, view.height() / 2), 800); + QTest::mouseRelease(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.6, view.height() / 2), 50); + + QTest::mousePress(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.3, view.height() / 2), 400); + QTest::mouseRelease(&view, Qt::LeftButton, Qt::NoModifier, QPoint(view.width() * 0.3, view.height() / 2), 50); + + gifRecorder.waitForFinish(); +} + QTEST_MAIN(tst_Gifs) #include "tst_gifs.moc" |