diff options
author | Bernd Weimer <bweimer@blackberry.com> | 2014-03-31 16:18:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-02 18:20:55 +0200 |
commit | a85e55436a8b9f95cc45b122a5b998d480237fce (patch) | |
tree | d45ff36741d0233584c41d9d47f4f5652c6161c6 /tests | |
parent | 3a18ec30f030d52026880c67d928654822eede8f (diff) | |
download | qtmultimedia-a85e55436a8b9f95cc45b122a5b998d480237fce.tar.gz |
Fix unit tests
Random playback mode is not good for testing index changed signal,
because the same media might be played successively.
Calling show() might result in showFullScreen() on some platforms,
which is not expected by some video widget tests.
Change-Id: Ib47433fc6411b6dfa244a245aae508df5627ec62
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/unit/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp | 3 | ||||
-rw-r--r-- | tests/auto/unit/qvideowidget/tst_qvideowidget.cpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/unit/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp b/tests/auto/unit/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp index b0f7d8b73..1992dbc8a 100644 --- a/tests/auto/unit/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp +++ b/tests/auto/unit/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp @@ -413,8 +413,7 @@ void tst_QMediaPlaylistNavigator::testCurrentIndexChangedSignal() { QMediaNetworkPlaylistProvider playlist; QMediaPlaylistNavigator navigator(&playlist); - navigator.setPlaybackMode(QMediaPlaylist::Random); - QCOMPARE(navigator.playbackMode(), QMediaPlaylist::Random); + QCOMPARE(navigator.playbackMode(), QMediaPlaylist::Sequential); QCOMPARE(navigator.currentIndex(), -1); //Creating a QSignalSpy object for currentIndexChanged() signal diff --git a/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp b/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp index c6c9bc113..23e5699d9 100644 --- a/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp +++ b/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp @@ -907,7 +907,7 @@ void tst_QVideoWidget::fullScreenWindowControl() QtTestVideoObject object(new QtTestWindowControl, 0, 0); QVideoWidget widget; object.bind(&widget); - widget.show(); + widget.showNormal(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); Qt::WindowFlags windowFlags = widget.windowFlags(); @@ -992,7 +992,7 @@ void tst_QVideoWidget::fullScreenWidgetControl() QtTestVideoObject object(0, new QtTestWidgetControl, 0); QVideoWidget widget; object.bind(&widget); - widget.show(); + widget.showNormal(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); Qt::WindowFlags windowFlags = widget.windowFlags(); @@ -1078,7 +1078,7 @@ void tst_QVideoWidget::fullScreenRendererControl() QtTestVideoObject object(0, 0, new QtTestRendererControl); QVideoWidget widget; object.bind(&widget); - widget.show(); + widget.showNormal(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); Qt::WindowFlags windowFlags = widget.windowFlags(); |