summaryrefslogtreecommitdiffstats
path: root/tests/auto/mediaobject
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2009-04-16 16:46:48 +0200
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2009-04-16 16:55:08 +0200
commit136092f23d1d979235f7b83050c8344f6aeee3cc (patch)
tree99cd0f4fb1da63c24e76c4151a5127305bc7292c /tests/auto/mediaobject
parent602da82d3c9413df41eb5b17bdf7e3c1586316b5 (diff)
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
Diffstat (limited to 'tests/auto/mediaobject')
-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 e0275deed1..1b113b2c9f 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