summaryrefslogtreecommitdiffstats
path: root/tests/auto/mediaobject
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-17 09:54:48 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-17 09:59:02 (GMT)
commiteda6ef48f7a1c5f93e09fd85fa54123569bb0a5f (patch)
tree459fbdb6238bc0756719a4c2a395de31a4aa1adf /tests/auto/mediaobject
parentfa8030a935acaacee570eee320e7510a4cfdc853 (diff)
downloadQt-eda6ef48f7a1c5f93e09fd85fa54123569bb0a5f.zip
Qt-eda6ef48f7a1c5f93e09fd85fa54123569bb0a5f.tar.gz
Qt-eda6ef48f7a1c5f93e09fd85fa54123569bb0a5f.tar.bz2
Phonon::VolumeSlider: Fixed the isMuteVisiblefunction
The problem is that it was relying on button->isVisible whereas it should rely on isHidden. isVisible returns false initially when the whole widget is not yet shown. I also added an autotest for it. Task-number: 256331
Diffstat (limited to 'tests/auto/mediaobject')
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp
index c1a69f7..f04a4d7 100644
--- a/tests/auto/mediaobject/tst_mediaobject.cpp
+++ b/tests/auto/mediaobject/tst_mediaobject.cpp
@@ -148,6 +148,7 @@ class tst_MediaObject : public QObject
void testPlayBeforeFinish();
void testPauseOnFinish();
void testReconnectBetweenTwoMediaObjects();
+ void volumeSliderMuteVisibility();
void cleanupTestCase();
private:
void _startPlayback(Phonon::State currentState = Phonon::StoppedState);
@@ -937,6 +938,28 @@ void tst_MediaObject::_testOneSeek(qint64 seekTo)
m_success = true;
}
+void tst_MediaObject::volumeSliderMuteVisibility()
+{
+ //this test doesn't really belong to mediaobject
+ // ### see if we should create a realy Phonon::VolumeSlider autotest
+ Phonon::VolumeSlider slider;
+ QVERIFY(slider.isMuteVisible()); // that is the default value
+ slider.setMuteVisible(true);
+ QVERIFY(slider.isMuteVisible());
+
+ //let's check that changing the visibility of the slider itself
+ //doesn't change what the slider reports
+ slider.setVisible(false);
+ QVERIFY(slider.isMuteVisible());
+ slider.setVisible(true);
+
+ slider.setMuteVisible(false);
+ QVERIFY(!slider.isMuteVisible());
+ slider.setMuteVisible(true);
+ QVERIFY(slider.isMuteVisible());
+}
+
+
#endif //QT_NO_PHONON