summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmediaserviceprovider
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-02-17 01:02:28 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-02-17 01:02:28 (GMT)
commit08815ab306eb61d4a6abdfce0fe3ea9d50d46212 (patch)
tree8665a51d756a41a801bb6a69f6d0d53a1c1430b2 /tests/auto/qmediaserviceprovider
parent25190874d12d97a9f7c9d9c25ca7aa2d6d6cfd6d (diff)
downloadQt-08815ab306eb61d4a6abdfce0fe3ea9d50d46212.zip
Qt-08815ab306eb61d4a6abdfce0fe3ea9d50d46212.tar.gz
Qt-08815ab306eb61d4a6abdfce0fe3ea9d50d46212.tar.bz2
Remove tests not relevant to playback functionality.
Diffstat (limited to 'tests/auto/qmediaserviceprovider')
-rw-r--r--tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp54
1 files changed, 2 insertions, 52 deletions
diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
index 204ed14..671cfa4 100644
--- a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
+++ b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
@@ -72,8 +72,7 @@ public:
QStringList keys() const
{
return QStringList() <<
- QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER) <<
- QLatin1String(Q_MEDIASERVICE_CAMERA);
+ QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
}
QMediaService* create(QString const& key)
@@ -109,8 +108,6 @@ public:
QList<QByteArray> devices(const QByteArray &service) const
{
QList<QByteArray> res;
- if (service == QByteArray(Q_MEDIASERVICE_CAMERA))
- res << "camera1" << "camera2";
return res;
}
@@ -183,9 +180,7 @@ public:
QStringList keys() const
{
return QStringList() <<
- QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER) <<
- QLatin1String(Q_MEDIASERVICE_CAMERA) <<
- QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE);
+ QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
}
QMediaService* create(QString const& key)
@@ -204,11 +199,6 @@ public:
QList<QByteArray> devices(const QByteArray &service) const
{
QList<QByteArray> res;
- if (service == QByteArray(Q_MEDIASERVICE_CAMERA))
- res << "camera3" << "camera4";
- else if (service == QByteArray(Q_MEDIASERVICE_AUDIOSOURCE))
- res << "audiosource1" << "audiosource2";
-
return res;
}
@@ -250,7 +240,6 @@ private slots:
void testObtainService();
void testHasSupport();
void testSupportedMimeTypes();
- void testDevices();
void testProviderHints();
private:
@@ -341,45 +330,6 @@ void tst_QMediaServiceProvider::testSupportedMimeTypes()
QVERIFY(!provider->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)).contains("audio/mp3"));
}
-void tst_QMediaServiceProvider::testDevices()
-{
- MockMediaServiceProvider mockProvider;
- QVERIFY(mockProvider.devices(QByteArray(Q_MEDIASERVICE_CAMERA)).isEmpty());
- QVERIFY(mockProvider.deviceDescription(QByteArray(Q_MEDIASERVICE_CAMERA),
- QByteArray()).isEmpty());
-
- QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
-
- QList<QByteArray> cameraDevices = provider->devices(QByteArray(Q_MEDIASERVICE_CAMERA));
- QCOMPARE(cameraDevices.count(), 4);
- QVERIFY(cameraDevices.contains(QByteArray("camera1")));
- QVERIFY(cameraDevices.contains(QByteArray("camera2")));
- QVERIFY(cameraDevices.contains(QByteArray("camera3")));
- QVERIFY(cameraDevices.contains(QByteArray("camera4")));
-
- /*
- //ensure the right plugin is choosen for a device
- QCamera camera1(QByteArray("camera1"));
- QCOMPARE( camera1.service()->objectName(), QLatin1String("MockServicePlugin1") );
- QCamera camera2(QByteArray("camera2"));
- QCOMPARE( camera2.service()->objectName(), QLatin1String("MockServicePlugin1") );
- QCamera camera3(QByteArray("camera3"));
- QCOMPARE( camera3.service()->objectName(), QLatin1String("MockServicePlugin3") );
- QCamera camera4(QByteArray("camera4"));
- QCOMPARE( camera4.service()->objectName(), QLatin1String("MockServicePlugin3") );
-
- QList<QByteArray> audioSourceDevices = provider->devices(QByteArray(Q_MEDIASERVICE_AUDIOSOURCE));
- QCOMPARE(audioSourceDevices.count(), 2);
- QVERIFY(audioSourceDevices.contains(QByteArray("audiosource1")));
- QVERIFY(audioSourceDevices.contains(QByteArray("audiosource2")));
-
- QVERIFY(provider->devices(QByteArray("non existing service")).isEmpty());
- */
-}
-
-
-
-
void tst_QMediaServiceProvider::testProviderHints()
{
{