summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2009-04-16 14:46:48 (GMT)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2009-04-16 14:55:08 (GMT)
commit136092f23d1d979235f7b83050c8344f6aeee3cc (patch)
tree99cd0f4fb1da63c24e76c4151a5127305bc7292c
parent602da82d3c9413df41eb5b17bdf7e3c1586316b5 (diff)
downloadQt-136092f23d1d979235f7b83050c8344f6aeee3cc.zip
Qt-136092f23d1d979235f7b83050c8344f6aeee3cc.tar.gz
Qt-136092f23d1d979235f7b83050c8344f6aeee3cc.tar.bz2
Phonon autotest - checking if the backend plugin is actually deployed
In tst_mediaobject we check now explicitly if the backend plugin is deployed to the device. Since this check is done in initTestCase we also avoid a crash if the check fails. Reviewed-by: Maurice
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp
index e0275de..1b113b2 100644
--- a/tests/auto/mediaobject/tst_mediaobject.cpp
+++ b/tests/auto/mediaobject/tst_mediaobject.cpp
@@ -349,6 +349,18 @@ void tst_MediaObject::_pausePlayback()
void tst_MediaObject::initTestCase()
{
QCoreApplication::setApplicationName("tst_MediaObject");
+ m_stateChangedSignalSpy = 0;
+ m_media = 0;
+
+#ifdef Q_OS_WINCE
+ QString pluginsPath = QLibraryInfo::location(QLibraryInfo::PluginsPath);
+#ifdef DEBUG
+ QVERIFY(QFile::exists(pluginsPath + "/phonon_backend/phonon_waveoutd4.dll") || QFile::exists(pluginsPath + "/phonon_backend/phonon_phonon_ds9d4.dll"));
+#else
+ QVERIFY(QFile::exists(pluginsPath + "/phonon_backend/phonon_waveout4.dll") || QFile::exists(pluginsPath + "/phonon_backend/phonon_phonon_ds94.dll"));
+#endif
+#endif
+
m_url = qgetenv("PHONON_TESTURL");
m_media = new MediaObject(this);
@@ -856,8 +868,10 @@ void tst_MediaObject::testPlayBeforeFinish()
void tst_MediaObject::cleanupTestCase()
{
- delete m_stateChangedSignalSpy;
- delete m_media;
+ if (m_stateChangedSignalSpy)
+ delete m_stateChangedSignalSpy;
+ if (m_media)
+ delete m_media;
#ifdef Q_OS_WINCE
QTest::qWait(200);
#endif