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>
This commit is contained in:
committed by
The Qt Project
parent
3a18ec30f0
commit
a85e55436a
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user