diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-08-02 09:09:49 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-08-02 09:09:49 (GMT) |
commit | 7f4e72f438362da7b862ea682f36ec959070e1cb (patch) | |
tree | cf4d06bec18d32172d6043e32a9929cbb3f2d120 /tests | |
parent | 7b70dd1d7f5f6819b1aa28647826e2137504de54 (diff) | |
download | Qt-7f4e72f438362da7b862ea682f36ec959070e1cb.zip Qt-7f4e72f438362da7b862ea682f36ec959070e1cb.tar.gz Qt-7f4e72f438362da7b862ea682f36ec959070e1cb.tar.bz2 |
Enabled tst_mediaobject::testPlayFromResource on Symbian
Task-number: QTBUG-6562
Reviewed-by: Justin McPherson
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/mediaobject/tst_mediaobject.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp index 99a16db..613a086 100644 --- a/tests/auto/mediaobject/tst_mediaobject.cpp +++ b/tests/auto/mediaobject/tst_mediaobject.cpp @@ -124,8 +124,7 @@ class tst_MediaObject : public QObject void init(); void cleanup(); - void testPlayFromResourceDirect(); - void testPlayFromResourceFile(); + void testPlayFromResource(); void testPlayIllegalFile(); void initTestCase(); void checkForDefaults(); @@ -200,7 +199,7 @@ void tst_MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstat QWARN(QByteArray(QByteArray(QTest::toString(oldstate)) + " to " + QByteArray(QTest::toString(newstate)))); } -void tst_MediaObject::testPlayFromResourceDirect() +void tst_MediaObject::testPlayFromResource() { MediaObject media; media.setCurrentSource(Phonon::MediaSource(MEDIA_FILEPATH)); @@ -214,21 +213,6 @@ void tst_MediaObject::testPlayFromResourceDirect() QCOMPARE(media.state(), Phonon::PlayingState); } -void tst_MediaObject::testPlayFromResourceFile() -{ - QFile file(MEDIA_FILEPATH); - MediaObject media; - media.setCurrentSource(&file); - QVERIFY(media.state() != Phonon::ErrorState); - if (media.state() != Phonon::StoppedState) - QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000); - QCOMPARE(media.state(), Phonon::StoppedState); - media.play(); - if (media.state() != Phonon::PlayingState) - QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000); - QCOMPARE(media.state(), Phonon::PlayingState); -} - void tst_MediaObject::testPlayIllegalFile() { QString filename = QDir::tempPath() + QString("/test.wav"); |