summaryrefslogtreecommitdiff
path: root/tests/auto/integration/qmediaplayerbackend
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/integration/qmediaplayerbackend')
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 8e45a2ccb..082e81b34 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -60,6 +60,7 @@ private slots:
void construction();
void loadMedia();
void unloadMedia();
+ void loadMediaInLoadingState();
void playPauseStop();
void processEOS();
void deleteLaterAtEOS();
@@ -304,6 +305,16 @@ void tst_QMediaPlayerBackend::unloadMedia()
QVERIFY(!positionSpy.isEmpty());
}
+void tst_QMediaPlayerBackend::loadMediaInLoadingState()
+{
+ const QUrl url("http://unavailable.media/");
+ QMediaPlayer player;
+ player.setMedia(QMediaContent(url));
+ player.play();
+ // Sets new media while old has not been finished.
+ player.setMedia(QMediaContent(url));
+ QTRY_COMPARE(player.mediaStatus(), QMediaPlayer::InvalidMedia);
+}
void tst_QMediaPlayerBackend::playPauseStop()
{