summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp')
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 9aad6dd8..fb72a239 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -382,7 +382,9 @@ void tst_QMediaPlayerBackend::playPauseStop()
stateSpy.clear();
statusSpy.clear();
+ positionSpy.clear();
+ qint64 positionBeforePause = player.position();
player.pause();
QCOMPARE(player.state(), QMediaPlayer::PausedState);
@@ -391,6 +393,11 @@ void tst_QMediaPlayerBackend::playPauseStop()
QCOMPARE(stateSpy.count(), 1);
QCOMPARE(stateSpy.last()[0].value<QMediaPlayer::State>(), QMediaPlayer::PausedState);
+ QTest::qWait(2000);
+
+ QVERIFY(qAbs(player.position() - positionBeforePause) < 100);
+ QCOMPARE(positionSpy.count(), 0);
+
stateSpy.clear();
statusSpy.clear();