summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/multimedia.pro42
-rw-r--r--tests/auto/multimediawidgets.pro25
-rw-r--r--tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro4
-rw-r--r--tests/auto/qabstractvideosurface/qabstractvideosurface.pro4
-rw-r--r--tests/auto/qaudiocapturesource/qaudiocapturesource.pro1
-rw-r--r--tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro3
-rw-r--r--tests/auto/qaudioformat/qaudioformat.pro4
-rw-r--r--tests/auto/qaudioinput/qaudioinput.pro3
-rw-r--r--tests/auto/qaudiooutput/qaudiooutput.pro3
-rw-r--r--tests/auto/qcamera/qcamera.pro4
-rw-r--r--tests/auto/qcamera/tst_qcamera.cpp65
-rw-r--r--tests/auto/qcamerabackend/qcamerabackend.pro5
-rw-r--r--tests/auto/qcameraimagecapture/qcameraimagecapture.pro1
-rw-r--r--tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp2
-rw-r--r--tests/auto/qcameraviewfinder/qcameraviewfinder.pro4
-rw-r--r--tests/auto/qcamerawidgets/qcamerawidgets.pro12
-rw-r--r--tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp319
-rw-r--r--tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro4
-rw-r--r--tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp2
-rw-r--r--tests/auto/qdeclarativevideo/qdeclarativevideo.pro5
-rw-r--r--tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp2
-rw-r--r--tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro10
-rw-r--r--tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp6
-rw-r--r--tests/auto/qmediabindableinterface/qmediabindableinterface.pro1
-rw-r--r--tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro1
-rw-r--r--tests/auto/qmediacontent/qmediacontent.pro3
-rw-r--r--tests/auto/qmediaimageviewer/qmediaimageviewer.pro4
-rw-r--r--tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp21
-rw-r--r--tests/auto/qmediaimageviewerwidgets/images.qrc5
-rw-r--r--tests/auto/qmediaimageviewerwidgets/images/image.pngbin0 -> 230 bytes
-rw-r--r--tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro16
-rw-r--r--tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp142
-rw-r--r--tests/auto/qmediaobject/main.cpp2
-rw-r--r--tests/auto/qmediaobject/qmediaobject.pro4
-rw-r--r--tests/auto/qmediaobject/tst_qmediaobject.cpp1
-rwxr-xr-xtests/auto/qmediaplayer/main.cpp2
-rw-r--r--tests/auto/qmediaplayer/qmediaplayer.pro4
-rw-r--r--tests/auto/qmediaplayer/tst_qmediaplayer.cpp37
-rwxr-xr-xtests/auto/qmediaplayer/tst_qmediaplayer.h1
-rw-r--r--tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro3
-rwxr-xr-xtests/auto/qmediaplayerwidgets/main.cpp53
-rw-r--r--tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro10
-rw-r--r--tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp162
-rwxr-xr-xtests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h79
-rw-r--r--tests/auto/qmediaplaylist/qmediaplaylist.pro4
-rw-r--r--tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro4
-rw-r--r--tests/auto/qmediapluginloader/qmediapluginloader.pro4
-rwxr-xr-xtests/auto/qmediarecorder/main.cpp2
-rw-r--r--tests/auto/qmediarecorder/qmediarecorder.pro4
-rw-r--r--tests/auto/qmediaresource/qmediaresource.pro4
-rw-r--r--tests/auto/qmediaservice/qmediaservice.pro5
-rw-r--r--tests/auto/qmediaservice/tst_qmediaservice.cpp3
-rw-r--r--tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro4
-rw-r--r--tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro1
-rw-r--r--tests/auto/qmediatimerange/qmediatimerange.pro4
-rw-r--r--tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro1
-rw-r--r--tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro1
-rw-r--r--tests/auto/qmultimedia_common/mockcameraservice.h16
-rw-r--r--tests/auto/qmultimedia_common/mockmediaplayerservice.h22
-rw-r--r--tests/auto/qmultimedia_common/mockmediaserviceprovider.h1
-rw-r--r--tests/auto/qmultimedia_common/mockvideo.pri8
-rw-r--r--tests/auto/qmultimedia_common/mockvideowindowcontrol.h3
-rw-r--r--tests/auto/qpaintervideosurface/qpaintervideosurface.pro9
-rw-r--r--tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp2
-rwxr-xr-xtests/auto/qradiotuner/main.cpp2
-rw-r--r--tests/auto/qradiotuner/qradiotuner.pro4
-rw-r--r--tests/auto/qsoundeffect/qsoundeffect.pro1
-rw-r--r--tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro1
-rw-r--r--tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro1
-rw-r--r--tests/auto/qvideoframe/qvideoframe.pro4
-rw-r--r--tests/auto/qvideoframe/tst_qvideoframe.cpp2
-rw-r--r--tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro4
-rw-r--r--tests/auto/qvideowidget/qvideowidget.pro10
-rw-r--r--tests/auto/qvideowidget/tst_qvideowidget.cpp2
-rw-r--r--tests/systemtests/audio/sys_audio.qtt295
-rw-r--r--tests/systemtests/camera/sys_camera.qtt181
-rw-r--r--tests/systemtests/radio/sys_radio.qtt130
-rw-r--r--tests/systemtests/video/sys_video.qtt269
79 files changed, 1828 insertions, 264 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index b3a5771a2..a8160c376 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
-SUBDIRS+=multimedia.pro
+SUBDIRS += multimedia.pro
+contains(QT_CONFIG,multimediakitwidgets): SUBDIRS += multimediawidgets.pro
# These autotests consist of things such as static code checks
# which require that the autotest is run on the same machine
diff --git a/tests/auto/multimedia.pro b/tests/auto/multimedia.pro
index 9bacbbff6..6a6d08b9e 100644
--- a/tests/auto/multimedia.pro
+++ b/tests/auto/multimedia.pro
@@ -8,15 +8,9 @@ SUBDIRS += \
qaudioformat \
qaudioinput \
qaudiooutput \
- qcamera \
- qcamerabackend \
- qcameraimagecapture \
- qcameraviewfinder \
qmediabindableinterface \
qmediacontainercontrol \
qmediacontent \
- qmediaobject \
- qmediaplayer \
qmediaplayerbackend \
qmediaplaylistnavigator \
qmediarecorder \
@@ -28,9 +22,11 @@ SUBDIRS += \
qvideosurfaceformat \
qmetadatareadercontrol \
qmetadatawritercontrol \
-
-# This is disabled because it is unfinished
-# qmediastreamscontrol \
+ qmediaplayer \
+ qcameraimagecapture \
+ qmediaobject \
+ qcamera \
+ qcamerabackend \
# These is disabled until intent is clearer
# qvideodevicecontrol \
@@ -44,24 +40,16 @@ SUBDIRS += \
# Tests depending on private interfaces should only be built if
# these interfaces are exported.
contains (QT_CONFIG, private_tests) {
- SUBDIRS += \
- qgraphicsvideoitem \
- qmediaimageviewer \
- qmediaplaylist \
- qmediapluginloader \
- qmediaserviceprovider \
- qpaintervideosurface \
- qvideowidget \
-}
-
-contains (QT_CONFIG, declarative) {
- # All the declarative tests depend on private interfaces
- contains (QT_CONFIG, private_tests) {
SUBDIRS += \
- qsoundeffect \
- qdeclarativeaudio \
+ qmediaplaylist \
+ qmediapluginloader \
+ qmediaimageviewer \
+ qmediaserviceprovider
-
- disabled:SUBDIRS += qdeclarativevideo
- }
+ contains (QT_CONFIG, declarative) {
+ # All the declarative tests depend on private interfaces
+ SUBDIRS += \
+ qsoundeffect \
+ qdeclarativeaudio
+ }
}
diff --git a/tests/auto/multimediawidgets.pro b/tests/auto/multimediawidgets.pro
new file mode 100644
index 000000000..5a55ecc37
--- /dev/null
+++ b/tests/auto/multimediawidgets.pro
@@ -0,0 +1,25 @@
+
+TEMPLATE = subdirs
+SUBDIRS += \
+ qcameraviewfinder \
+ qcamerawidgets \
+ qmediaplayerwidgets \
+
+# This is a commment for the mock backend directory so that maketestselftest
+# doesn't believe it's an untested directory
+# qmultimedia_common
+
+# Tests depending on private interfaces should only be built if
+# these interfaces are exported.
+contains (QT_CONFIG, private_tests) {
+ SUBDIRS += \
+ qgraphicsvideoitem \
+ qpaintervideosurface \
+ qmediaimageviewerwidgets \
+ qvideowidget \
+
+ contains (QT_CONFIG, declarative) {
+ disabled:SUBDIRS += qdeclarativevideo
+ }
+}
+
diff --git a/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro b/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro
index e1fa50355..9bc5bbebc 100644
--- a/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro
+++ b/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qabstractvideobuffer
-#CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qabstractvideobuffer.cpp
diff --git a/tests/auto/qabstractvideosurface/qabstractvideosurface.pro b/tests/auto/qabstractvideosurface/qabstractvideosurface.pro
index 1778b566b..49461d385 100644
--- a/tests/auto/qabstractvideosurface/qabstractvideosurface.pro
+++ b/tests/auto/qabstractvideosurface/qabstractvideosurface.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qabstractvideosurface
-#CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qabstractvideosurface.cpp
diff --git a/tests/auto/qaudiocapturesource/qaudiocapturesource.pro b/tests/auto/qaudiocapturesource/qaudiocapturesource.pro
index 65c6cf3b4..9addb194c 100644
--- a/tests/auto/qaudiocapturesource/qaudiocapturesource.pro
+++ b/tests/auto/qaudiocapturesource/qaudiocapturesource.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qaudiocapturesource.cpp
diff --git a/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro b/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro
index 08d1634bb..bca2f3edd 100644
--- a/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro
+++ b/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudiodeviceinfo
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qaudioformat/qaudioformat.pro b/tests/auto/qaudioformat/qaudioformat.pro
index 568cad09a..60fd74a4f 100644
--- a/tests/auto/qaudioformat/qaudioformat.pro
+++ b/tests/auto/qaudioformat/qaudioformat.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudioformat
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qaudioformat.cpp
diff --git a/tests/auto/qaudioinput/qaudioinput.pro b/tests/auto/qaudioinput/qaudioinput.pro
index 20a12b8fc..c5a952bf8 100644
--- a/tests/auto/qaudioinput/qaudioinput.pro
+++ b/tests/auto/qaudioinput/qaudioinput.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudioinput
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qaudiooutput/qaudiooutput.pro b/tests/auto/qaudiooutput/qaudiooutput.pro
index dcbd4cb99..3693dbbef 100644
--- a/tests/auto/qaudiooutput/qaudiooutput.pro
+++ b/tests/auto/qaudiooutput/qaudiooutput.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudiooutput
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qcamera/qcamera.pro b/tests/auto/qcamera/qcamera.pro
index baae9dba0..9e4a7e8ae 100644
--- a/tests/auto/qcamera/qcamera.pro
+++ b/tests/auto/qcamera/qcamera.pro
@@ -1,13 +1,11 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockcamera.pri)
-# TARGET = tst_qcamera
-# CONFIG += testcase
-
SOURCES += tst_qcamera.cpp
maemo*:CONFIG += insignificant_test
diff --git a/tests/auto/qcamera/tst_qcamera.cpp b/tests/auto/qcamera/tst_qcamera.cpp
index 016e738a0..f0962394a 100644
--- a/tests/auto/qcamera/tst_qcamera.cpp
+++ b/tests/auto/qcamera/tst_qcamera.cpp
@@ -58,10 +58,7 @@
#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameraimagecapture.h>
-#include <qgraphicsvideoitem.h>
#include <qvideorenderercontrol.h>
-#include <qvideowidget.h>
-#include <qvideowindowcontrol.h>
#include "mockcameraservice.h"
@@ -1037,39 +1034,10 @@ void tst_QCamera::testCameraEncodingProperyChange()
QCOMPARE(camera.status(), QCamera::ActiveStatus);
QCOMPARE(stateChangedSignal.count(), 0);
QCOMPARE(statusChangedSignal.count(), 1);
- stateChangedSignal.clear();
- statusChangedSignal.clear();
-
- //setting the viewfinder should also trigger backend to be restarted:
- camera.setViewfinder(new QGraphicsVideoItem());
- QCOMPARE(camera.state(), QCamera::ActiveState);
- QCOMPARE(camera.status(), QCamera::LoadedStatus);
-
- QCOMPARE(stateChangedSignal.count(), 0);
- QCOMPARE(statusChangedSignal.count(), 1);
-
- QTest::qWait(10);
-
- service.mockControl->m_propertyChangesSupported = true;
- //the changes to encoding settings,
- //capture mode and encoding parameters should not trigger service restart
- stateChangedSignal.clear();
- statusChangedSignal.clear();
-
- camera.setCaptureMode(QCamera::CaptureVideo);
- camera.setCaptureMode(QCamera::CaptureStillImage);
- imageCapture.setEncodingSettings(QImageEncoderSettings());
- imageCapture.setEncodingSettings(QImageEncoderSettings());
- camera.setViewfinder(new QGraphicsVideoItem());
-
- QCOMPARE(stateChangedSignal.count(), 0);
- QCOMPARE(statusChangedSignal.count(), 0);
}
void tst_QCamera::testSetVideoOutput()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockCameraService service;
@@ -1077,21 +1045,9 @@ void tst_QCamera::testSetVideoOutput()
provider.service = &service;
QCamera camera(0, &provider);
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == &camera);
-
- camera.setViewfinder(&item);
- QVERIFY(widget.mediaObject() == 0);
- QVERIFY(item.mediaObject() == &camera);
-
camera.setViewfinder(reinterpret_cast<QVideoWidget *>(0));
- QVERIFY(item.mediaObject() == 0);
-
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == &camera);
camera.setViewfinder(reinterpret_cast<QGraphicsVideoItem *>(0));
- QVERIFY(widget.mediaObject() == 0);
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
@@ -1102,56 +1058,37 @@ void tst_QCamera::testSetVideoOutput()
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- camera.setViewfinder(&widget);
+ camera.setViewfinder(reinterpret_cast<QVideoWidget *>(0));
QVERIFY(service.rendererControl->surface() == 0);
- QVERIFY(widget.mediaObject() == &camera);
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- QVERIFY(widget.mediaObject() == 0);
}
void tst_QCamera::testSetVideoOutputNoService()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaServiceProvider provider;
provider.service = 0;
QCamera camera(0, &provider);
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- camera.setViewfinder(&item);
- QVERIFY(item.mediaObject() == 0);
-
camera.setViewfinder(&surface);
// Nothing we can verify here other than it doesn't assert.
}
void tst_QCamera::testSetVideoOutputNoControl()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockCameraService service;
service.rendererRef = 1;
- service.windowRef = 1;
MockMediaServiceProvider provider;
provider.service = &service;
QCamera camera(0, &provider);
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- camera.setViewfinder(&item);
- QVERIFY(item.mediaObject() == 0);
-
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == 0);
}
diff --git a/tests/auto/qcamerabackend/qcamerabackend.pro b/tests/auto/qcamerabackend/qcamerabackend.pro
index 8debf4134..638c2c368 100644
--- a/tests/auto/qcamerabackend/qcamerabackend.pro
+++ b/tests/auto/qcamerabackend/qcamerabackend.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
-QT += multimediakit-private
-
-# TARGET = tst_qcamerabackend
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qcameraimagecapture/qcameraimagecapture.pro b/tests/auto/qcameraimagecapture/qcameraimagecapture.pro
index 946665951..a69d2f342 100644
--- a/tests/auto/qcameraimagecapture/qcameraimagecapture.pro
+++ b/tests/auto/qcameraimagecapture/qcameraimagecapture.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qcameraimagecapture.cpp
diff --git a/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp b/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp
index ab198d553..312def45e 100644
--- a/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp
+++ b/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp
@@ -63,8 +63,6 @@ Reviewer Name Date Coverage ( Full / Test Case IDs ).
#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameraimagecapture.h>
-#include <qgraphicsvideoitem.h>
-#include <qcameraviewfinder.h>
#include "mockcameraservice.h"
#include "mockmediaserviceprovider.h"
diff --git a/tests/auto/qcameraviewfinder/qcameraviewfinder.pro b/tests/auto/qcameraviewfinder/qcameraviewfinder.pro
index 84228acb6..3f751ac95 100644
--- a/tests/auto/qcameraviewfinder/qcameraviewfinder.pro
+++ b/tests/auto/qcameraviewfinder/qcameraviewfinder.pro
@@ -1,8 +1,10 @@
load(qttest_p4)
-QT += multimediakit-private
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockcamera.pri)
SOURCES += tst_qcameraviewfinder.cpp
+QT+=widgets
diff --git a/tests/auto/qcamerawidgets/qcamerawidgets.pro b/tests/auto/qcamerawidgets/qcamerawidgets.pro
new file mode 100644
index 000000000..220e16d6b
--- /dev/null
+++ b/tests/auto/qcamerawidgets/qcamerawidgets.pro
@@ -0,0 +1,12 @@
+load(qttest_p4)
+
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
+
+include (../qmultimedia_common/mock.pri)
+include (../qmultimedia_common/mockcamera.pri)
+
+SOURCES += tst_qcamerawidgets.cpp
+
+maemo*:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp b/tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp
new file mode 100644
index 000000000..c6b448225
--- /dev/null
+++ b/tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp
@@ -0,0 +1,319 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <qabstractvideosurface.h>
+#include <qcameracontrol.h>
+#include <qcameralockscontrol.h>
+#include <qcameraexposurecontrol.h>
+#include <qcameraflashcontrol.h>
+#include <qcamerafocuscontrol.h>
+#include <qcameraimagecapturecontrol.h>
+#include <qimageencodercontrol.h>
+#include <qcameraimageprocessingcontrol.h>
+#include <qcameracapturebufferformatcontrol.h>
+#include <qcameracapturedestinationcontrol.h>
+#include <qmediaservice.h>
+#include <qcamera.h>
+#include <qcameraimagecapture.h>
+#include <qgraphicsvideoitem.h>
+#include <qvideorenderercontrol.h>
+#include <qvideowidget.h>
+#include <qvideowindowcontrol.h>
+
+#include "mockcameraservice.h"
+
+#include "mockmediaserviceprovider.h"
+#include "mockvideosurface.h"
+#include "mockvideorenderercontrol.h"
+#include "mockvideowindowcontrol.h"
+
+QT_USE_NAMESPACE
+
+Q_DECLARE_METATYPE(QtMultimediaKit::MetaData)
+
+class tst_QCameraWidgets: public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void testCameraEncodingProperyChange();
+ void testSetVideoOutput();
+ void testSetVideoOutputNoService();
+ void testSetVideoOutputNoControl();
+
+private:
+ MockSimpleCameraService *mockSimpleCameraService;
+ MockMediaServiceProvider *provider;
+};
+
+void tst_QCameraWidgets::initTestCase()
+{
+ provider = new MockMediaServiceProvider;
+ mockSimpleCameraService = new MockSimpleCameraService;
+ provider->service = mockSimpleCameraService;
+ qRegisterMetaType<QtMultimediaKit::MetaData>("QtMultimediaKit::MetaData");
+}
+
+void tst_QCameraWidgets::cleanupTestCase()
+{
+ delete mockSimpleCameraService;
+ delete provider;
+}
+
+void tst_QCameraWidgets::testCameraEncodingProperyChange()
+{
+ MockCameraService service;
+ provider->service = &service;
+ QCamera camera(0, provider);
+ QCameraImageCapture imageCapture(&camera);
+
+ QSignalSpy stateChangedSignal(&camera, SIGNAL(stateChanged(QCamera::State)));
+ QSignalSpy statusChangedSignal(&camera, SIGNAL(statusChanged(QCamera::Status)));
+
+ camera.start();
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 1);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+
+ camera.setCaptureMode(QCamera::CaptureVideo);
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ QTest::qWait(10);
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //backens should not be stopped since the capture mode is Video
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 0);
+
+ camera.setCaptureMode(QCamera::CaptureStillImage);
+ QTest::qWait(10);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //the settings change should trigger camera stop/start
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ QTest::qWait(10);
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //the settings change should trigger camera stop/start only once
+ camera.setCaptureMode(QCamera::CaptureVideo);
+ camera.setCaptureMode(QCamera::CaptureStillImage);
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ QTest::qWait(10);
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //setting the viewfinder should also trigger backend to be restarted:
+ camera.setViewfinder(new QGraphicsVideoItem());
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+
+ QTest::qWait(10);
+
+ service.mockControl->m_propertyChangesSupported = true;
+ //the changes to encoding settings,
+ //capture mode and encoding parameters should not trigger service restart
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ camera.setCaptureMode(QCamera::CaptureVideo);
+ camera.setCaptureMode(QCamera::CaptureStillImage);
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ camera.setViewfinder(new QGraphicsVideoItem());
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 0);
+}
+
+void tst_QCameraWidgets::testSetVideoOutput()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockCameraService service;
+ MockMediaServiceProvider provider;
+ provider.service = &service;
+ QCamera camera(0, &provider);
+
+ camera.setViewfinder(&widget);
+ qDebug() << widget.mediaObject();
+ QVERIFY(widget.mediaObject() == &camera);
+
+ camera.setViewfinder(&item);
+ QVERIFY(widget.mediaObject() == 0);
+ QVERIFY(item.mediaObject() == &camera);
+
+ camera.setViewfinder(reinterpret_cast<QVideoWidget *>(0));
+ QVERIFY(item.mediaObject() == 0);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(widget.mediaObject() == &camera);
+
+ camera.setViewfinder(reinterpret_cast<QGraphicsVideoItem *>(0));
+ QVERIFY(widget.mediaObject() == 0);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ camera.setViewfinder(reinterpret_cast<QAbstractVideoSurface *>(0));
+ QVERIFY(service.rendererControl->surface() == 0);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(service.rendererControl->surface() == 0);
+ QVERIFY(widget.mediaObject() == &camera);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+ QVERIFY(widget.mediaObject() == 0);
+}
+
+
+void tst_QCameraWidgets::testSetVideoOutputNoService()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaServiceProvider provider;
+ provider.service = 0;
+ QCamera camera(0, &provider);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ camera.setViewfinder(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ camera.setViewfinder(&surface);
+ // Nothing we can verify here other than it doesn't assert.
+}
+
+void tst_QCameraWidgets::testSetVideoOutputNoControl()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockCameraService service;
+ service.rendererRef = 1;
+ service.windowRef = 1;
+
+ MockMediaServiceProvider provider;
+ provider.service = &service;
+ QCamera camera(0, &provider);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ camera.setViewfinder(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == 0);
+}
+
+QTEST_MAIN(tst_QCameraWidgets)
+
+#include "tst_qcamerawidgets.moc"
diff --git a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
index a7ab28581..0b9b5e295 100644
--- a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
+++ b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private declarative
-
-# TARGET = tst_qdeclarativeaudio
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += \
$$QT.multimediakit.sources/../imports/multimedia/qdeclarativeaudio_p.h \
diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
index b75ed8485..ddf3fce13 100644
--- a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -51,7 +51,7 @@
#include <qmediaserviceprovider.h>
#include <qmetadatareadercontrol.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
class tst_QDeclarativeAudio : public QObject
{
diff --git a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
index 15e58d8a5..35d7b14cf 100644
--- a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
+++ b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private declarative
-
-# TARGET = tst_qdeclarativevideo
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += \
$$QT.multimediakit.sources/../imports/multimedia/qdeclarativevideo_p.h \
@@ -16,3 +14,4 @@ SOURCES += \
$$QT.multimediakit.sources/../imports/multimedia/qdeclarativemediabase.cpp
INCLUDEPATH += $$QT.multimediakit.sources/../imports/multimedia
+QT+=widgets
diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
index 01bc0e769..035310079 100644
--- a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
+++ b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
@@ -55,7 +55,7 @@
#include <qvideowindowcontrol.h>
#include <qvideosurfaceformat.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <QtGui/qpainter.h>
class tst_QDeclarativeVideo : public QObject
diff --git a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
index 2db21569f..25ebe0ff2 100644
--- a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
+++ b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
@@ -1,10 +1,10 @@
load(qttest_p4)
-QT += multimediakit-private
-
-# TARGET = tst_qgraphicsvideoitem
-# CONFIG += testcase
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qgraphicsvideoitem.cpp
-maemo*:CONFIG += insignificant_test
+# QPA minimal crashes with this test in QBackingStore
+qpa:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
index f932bfd7d..79b3a0ab3 100644
--- a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
+++ b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
@@ -52,9 +52,9 @@
#include <qabstractvideosurface.h>
#include <qvideosurfaceformat.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicsview.h>
+#include <QtWidgets/qapplication.h>
+#include <QtWidgets/qgraphicsscene.h>
+#include <QtWidgets/qgraphicsview.h>
QT_USE_NAMESPACE
class tst_QGraphicsVideoItem : public QObject
diff --git a/tests/auto/qmediabindableinterface/qmediabindableinterface.pro b/tests/auto/qmediabindableinterface/qmediabindableinterface.pro
index 347c49d62..95e9f24a7 100644
--- a/tests/auto/qmediabindableinterface/qmediabindableinterface.pro
+++ b/tests/auto/qmediabindableinterface/qmediabindableinterface.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qmediabindableinterface.cpp
diff --git a/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro b/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro
index db5390233..c9e94711e 100644
--- a/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro
+++ b/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediacontainercontrol.cpp
diff --git a/tests/auto/qmediacontent/qmediacontent.pro b/tests/auto/qmediacontent/qmediacontent.pro
index 47d9cea67..a843c30e4 100644
--- a/tests/auto/qmediacontent/qmediacontent.pro
+++ b/tests/auto/qmediacontent/qmediacontent.pro
@@ -1,7 +1,6 @@
load(qttest_p4)
QT += multimediakit-private network
-# TARGET = tst_qmediacontent
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediacontent.cpp
diff --git a/tests/auto/qmediaimageviewer/qmediaimageviewer.pro b/tests/auto/qmediaimageviewer/qmediaimageviewer.pro
index dab1d2462..5372a19d6 100644
--- a/tests/auto/qmediaimageviewer/qmediaimageviewer.pro
+++ b/tests/auto/qmediaimageviewer/qmediaimageviewer.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private network
-
-# TARGET = tst_qmediaimageviewer
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaimageviewer.cpp
diff --git a/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp b/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp
index ff88b9cb3..e1de92a05 100644
--- a/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp
+++ b/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp
@@ -46,14 +46,11 @@
#include <QtCore/qdir.h>
-#include <qgraphicsvideoitem.h>
#include <qmediaimageviewer.h>
#include <private/qmediaimageviewerservice_p.h>
#include <qmediaplaylist.h>
#include <qmediaservice.h>
#include <qvideorenderercontrol.h>
-#include <qvideowidget.h>
-#include <qvideowidgetcontrol.h>
#include <QtCore/qfile.h>
#include <QtNetwork/qnetworkaccessmanager.h>
@@ -998,25 +995,11 @@ void tst_QMediaImageViewer::setVideoOutput()
if (imageViewer.mediaStatus() != QMediaImageViewer::LoadedMedia)
QSKIP("failed to load test image", SkipSingle);
- QVideoWidget widget;
- QGraphicsVideoItem item;
QtTestVideoSurface surface;
- imageViewer.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &imageViewer);
-
- imageViewer.setVideoOutput(&item);
- QVERIFY(widget.mediaObject() == 0);
- QVERIFY(item.mediaObject() == &imageViewer);
-
imageViewer.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
- QVERIFY(item.mediaObject() == 0);
-
- imageViewer.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &imageViewer);
imageViewer.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
- QVERIFY(widget.mediaObject() == 0);
imageViewer.setVideoOutput(&surface);
QVERIFY(surface.isActive());
@@ -1027,13 +1010,11 @@ void tst_QMediaImageViewer::setVideoOutput()
imageViewer.setVideoOutput(&surface);
QVERIFY(surface.isActive());
- imageViewer.setVideoOutput(&widget);
+ imageViewer.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
QVERIFY(!surface.isActive());
- QVERIFY(widget.mediaObject() == &imageViewer);
imageViewer.setVideoOutput(&surface);
QVERIFY(surface.isActive());
- QVERIFY(widget.mediaObject() == 0);
}
void tst_QMediaImageViewer::debugEnums()
diff --git a/tests/auto/qmediaimageviewerwidgets/images.qrc b/tests/auto/qmediaimageviewerwidgets/images.qrc
new file mode 100644
index 000000000..1d4edce17
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/images.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>images/image.png</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/qmediaimageviewerwidgets/images/image.png b/tests/auto/qmediaimageviewerwidgets/images/image.png
new file mode 100644
index 000000000..a24db1b13
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/images/image.png
Binary files differ
diff --git a/tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro b/tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro
new file mode 100644
index 000000000..f3493685c
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro
@@ -0,0 +1,16 @@
+load(qttest_p4)
+
+QT += multimediakit-private multimediakitwidgets-private network
+CONFIG += no_private_qt_headers_warning
+
+SOURCES += tst_qmediaimageviewerwidgets.cpp
+
+RESOURCES += \
+ images.qrc
+
+!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
+
+wince* {
+ !contains(QT_CONFIG, no-jpeg): DEPLOYMENT_PLUGIN += qjpeg
+}
+QT+=widgets
diff --git a/tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp b/tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp
new file mode 100644
index 000000000..fd51b0063
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+#include <qtmultimediakitdefs.h>
+#include <QtTest/QtTest>
+
+#include <QtCore/qdir.h>
+
+#include <qgraphicsvideoitem.h>
+#include <qmediaimageviewer.h>
+#include <private/qmediaimageviewerservice_p.h>
+#include <qmediaplaylist.h>
+#include <qmediaservice.h>
+#include <qvideorenderercontrol.h>
+#include <qvideowidget.h>
+#include <qvideowidgetcontrol.h>
+
+#include <qabstractvideosurface.h>
+#include <qvideosurfaceformat.h>
+
+QT_USE_NAMESPACE
+
+class tst_QMediaImageViewerWidgets : public QObject
+{
+ Q_OBJECT
+private slots:
+ void setVideoOutput();
+};
+
+class QtTestVideoSurface : public QAbstractVideoSurface
+{
+public:
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const {
+ QList<QVideoFrame::PixelFormat> formats;
+ if (handleType == QAbstractVideoBuffer::NoHandle) {
+ formats << QVideoFrame::Format_RGB32;
+ }
+ return formats;
+ }
+
+ QVideoFrame frame() const { return m_frame; }
+
+ bool present(const QVideoFrame &frame) { m_frame = frame; return true; }
+
+private:
+ QVideoFrame m_frame;
+};
+
+void tst_QMediaImageViewerWidgets::setVideoOutput()
+{
+ QMediaImageViewer imageViewer;
+ imageViewer.setMedia(QMediaContent(QUrl("qrc:///images/image.png")));
+
+ connect(&imageViewer, SIGNAL(mediaStatusChanged(QMediaImageViewer::MediaStatus)),
+ &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(2);
+
+ if (imageViewer.mediaStatus() != QMediaImageViewer::LoadedMedia)
+ QSKIP("failed to load test image", SkipSingle);
+
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ QtTestVideoSurface surface;
+
+ imageViewer.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(&item);
+ QVERIFY(widget.mediaObject() == 0);
+ QVERIFY(item.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
+ QVERIFY(item.mediaObject() == 0);
+
+ imageViewer.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
+ QVERIFY(widget.mediaObject() == 0);
+
+ imageViewer.setVideoOutput(&surface);
+ QVERIFY(surface.isActive());
+
+ imageViewer.setVideoOutput(reinterpret_cast<QAbstractVideoSurface *>(0));
+ QVERIFY(!surface.isActive());
+
+ imageViewer.setVideoOutput(&surface);
+ QVERIFY(surface.isActive());
+
+ imageViewer.setVideoOutput(&widget);
+ QVERIFY(!surface.isActive());
+ QVERIFY(widget.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(&surface);
+ QVERIFY(surface.isActive());
+ QVERIFY(widget.mediaObject() == 0);
+}
+
+QTEST_MAIN(tst_QMediaImageViewerWidgets)
+
+#include "tst_qmediaimageviewerwidgets.moc"
diff --git a/tests/auto/qmediaobject/main.cpp b/tests/auto/qmediaobject/main.cpp
index e99d93eb9..5e822768d 100644
--- a/tests/auto/qmediaobject/main.cpp
+++ b/tests/auto/qmediaobject/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QMediaObject test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qmediaobject/qmediaobject.pro b/tests/auto/qmediaobject/qmediaobject.pro
index e33804456..66f60e1d5 100644
--- a/tests/auto/qmediaobject/qmediaobject.pro
+++ b/tests/auto/qmediaobject/qmediaobject.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaobject
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mockrecorder.pri)
diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp
index 2c96a393c..6a337ac50 100644
--- a/tests/auto/qmediaobject/tst_qmediaobject.cpp
+++ b/tests/auto/qmediaobject/tst_qmediaobject.cpp
@@ -42,7 +42,6 @@
//TESTED_COMPONENT=src/multimedia
#include "tst_qmediaobject.h"
-#include "qvideowidget.h"
#include "mockmediarecorderservice.h"
#include "mockmediaserviceprovider.h"
diff --git a/tests/auto/qmediaplayer/main.cpp b/tests/auto/qmediaplayer/main.cpp
index de905858f..417dcd3f1 100755
--- a/tests/auto/qmediaplayer/main.cpp
+++ b/tests/auto/qmediaplayer/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QMediaPlayer test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qmediaplayer/qmediaplayer.pro b/tests/auto/qmediaplayer/qmediaplayer.pro
index 26bf81326..bdb616a27 100644
--- a/tests/auto/qmediaplayer/qmediaplayer.pro
+++ b/tests/auto/qmediaplayer/qmediaplayer.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += network multimediakit-private
-
-# TARGET = tst_qmediaplayer
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += tst_qmediaplayer.h
SOURCES += main.cpp tst_qmediaplayer.cpp
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
index fb438f626..8117ae1aa 100644
--- a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
+++ b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
@@ -43,7 +43,6 @@
#include "tst_qmediaplayer.h"
-#include <qgraphicsvideoitem.h>
#include <QtNetwork/qnetworkconfigmanager.h>
// Encouraging successful diversity through copy and paste.
@@ -936,29 +935,14 @@ void tst_QMediaPlayer::testNetworkAccess()
void tst_QMediaPlayer::testSetVideoOutput()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaPlayerService service;
MockMediaServiceProvider provider(&service);
QMediaPlayer player(0, 0, &provider);
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &player);
-
- player.setVideoOutput(&item);
- QVERIFY(widget.mediaObject() == 0);
- QVERIFY(item.mediaObject() == &player);
-
player.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
- QVERIFY(item.mediaObject() == 0);
-
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &player);
-
player.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
- QVERIFY(widget.mediaObject() == 0);
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
@@ -969,54 +953,35 @@ void tst_QMediaPlayer::testSetVideoOutput()
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- player.setVideoOutput(&widget);
+ player.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
QVERIFY(service.rendererControl->surface() == 0);
- QVERIFY(widget.mediaObject() == &player);
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- QVERIFY(widget.mediaObject() == 0);
}
void tst_QMediaPlayer::testSetVideoOutputNoService()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaServiceProvider provider(0, true);
QMediaPlayer player(0, 0, &provider);
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- player.setVideoOutput(&item);
- QVERIFY(item.mediaObject() == 0);
-
player.setVideoOutput(&surface);
// Nothing we can verify here other than it doesn't assert.
}
void tst_QMediaPlayer::testSetVideoOutputNoControl()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaPlayerService service;
service.rendererRef = 1;
- service.windowRef = 1;
MockMediaServiceProvider provider(&service);
QMediaPlayer player(0, 0, &provider);
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- player.setVideoOutput(&item);
- QVERIFY(item.mediaObject() == 0);
-
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == 0);
}
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.h b/tests/auto/qmediaplayer/tst_qmediaplayer.h
index c87c65a7d..76a94cccf 100755
--- a/tests/auto/qmediaplayer/tst_qmediaplayer.h
+++ b/tests/auto/qmediaplayer/tst_qmediaplayer.h
@@ -54,7 +54,6 @@
#include <qmediastreamscontrol.h>
#include <qmedianetworkaccesscontrol.h>
#include <qvideorenderercontrol.h>
-#include <qvideowindowcontrol.h>
#include "mockmediaserviceprovider.h"
#include "mockmediaplayerservice.h"
diff --git a/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro b/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro
index a14dc3bb4..c89a30f31 100644
--- a/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro
+++ b/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaplayerbackend
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qmediaplayerwidgets/main.cpp b/tests/auto/qmediaplayerwidgets/main.cpp
new file mode 100755
index 000000000..95903a593
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore/qcoreapplication.h>
+#include <QtTest/QtTest>
+
+#include "tst_qmediaplayerwidgets.h"
+
+int main(int argc, char**argv)
+{
+ QApplication app(argc,argv);
+ int ret;
+ tst_QMediaPlayerWidgets test_api;
+ ret = QTest::qExec(&test_api, argc, argv);
+ return ret;
+}
diff --git a/tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro b/tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro
new file mode 100644
index 000000000..a750ca9fa
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+
+QT += network multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
+
+HEADERS += tst_qmediaplayerwidgets.h
+SOURCES += main.cpp tst_qmediaplayerwidgets.cpp
+
+include (../qmultimedia_common/mock.pri)
+include (../qmultimedia_common/mockplayer.pri)
diff --git a/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp
new file mode 100644
index 000000000..ac9ffa0ce
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+#include "tst_qmediaplayerwidgets.h"
+#include "mockvideosurface.h"
+#include <qgraphicsvideoitem.h>
+
+QT_USE_NAMESPACE
+
+void tst_QMediaPlayerWidgets::initTestCase()
+{
+ qRegisterMetaType<QMediaPlayer::State>("QMediaPlayer::State");
+ qRegisterMetaType<QMediaPlayer::Error>("QMediaPlayer::Error");
+ qRegisterMetaType<QMediaPlayer::MediaStatus>("QMediaPlayer::MediaStatus");
+ qRegisterMetaType<QMediaContent>("QMediaContent");
+
+ mockService = new MockMediaPlayerService;
+ mockProvider = new MockMediaServiceProvider(mockService, true);
+ player = new QMediaPlayer(0, 0, mockProvider);
+}
+
+void tst_QMediaPlayerWidgets::cleanupTestCase()
+{
+ delete player;
+}
+
+void tst_QMediaPlayerWidgets::init()
+{
+ mockService->reset();
+}
+
+void tst_QMediaPlayerWidgets::cleanup()
+{
+}
+
+void tst_QMediaPlayerWidgets::testSetVideoOutput()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaPlayerService service;
+ MockMediaServiceProvider provider(&service);
+ QMediaPlayer player(0, 0, &provider);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &player);
+
+ player.setVideoOutput(&item);
+ QVERIFY(widget.mediaObject() == 0);
+ QVERIFY(item.mediaObject() == &player);
+
+ player.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
+ QVERIFY(item.mediaObject() == 0);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &player);
+
+ player.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
+ QVERIFY(widget.mediaObject() == 0);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ player.setVideoOutput(reinterpret_cast<QAbstractVideoSurface *>(0));
+ QVERIFY(service.rendererControl->surface() == 0);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(service.rendererControl->surface() == 0);
+ QVERIFY(widget.mediaObject() == &player);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+ QVERIFY(widget.mediaObject() == 0);
+}
+
+
+void tst_QMediaPlayerWidgets::testSetVideoOutputNoService()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaServiceProvider provider(0, true);
+ QMediaPlayer player(0, 0, &provider);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ player.setVideoOutput(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ player.setVideoOutput(&surface);
+ // Nothing we can verify here other than it doesn't assert.
+}
+
+void tst_QMediaPlayerWidgets::testSetVideoOutputNoControl()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaPlayerService service;
+ service.rendererRef = 1;
+ service.windowRef = 1;
+
+ MockMediaServiceProvider provider(&service);
+ QMediaPlayer player(0, 0, &provider);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ player.setVideoOutput(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == 0);
+}
+
diff --git a/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h
new file mode 100755
index 000000000..e5f9b674a
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TST_QMEDIAPLAYER_H
+#define TST_QMEDIAPLAYER_H
+
+#include <QtTest/QtTest>
+#include <QtCore/qdebug.h>
+#include <QtCore/qbuffer.h>
+#include <QtNetwork/qnetworkconfiguration.h>
+
+#include <qabstractvideosurface.h>
+#include <qmediaplayer.h>
+#include <qmediaplayercontrol.h>
+
+#include "mockmediaserviceprovider.h"
+#include "mockmediaplayerservice.h"
+
+QT_USE_NAMESPACE
+
+class tst_QMediaPlayerWidgets: public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+private slots:
+ void testSetVideoOutput();
+ void testSetVideoOutputNoService();
+ void testSetVideoOutputNoControl();
+
+private:
+ MockMediaServiceProvider *mockProvider;
+ MockMediaPlayerService *mockService;
+ QMediaPlayer *player;
+};
+
+#endif //TST_QMEDIAPLAYER_H
diff --git a/tests/auto/qmediaplaylist/qmediaplaylist.pro b/tests/auto/qmediaplaylist/qmediaplaylist.pro
index 018d7b08d..38bac95ae 100644
--- a/tests/auto/qmediaplaylist/qmediaplaylist.pro
+++ b/tests/auto/qmediaplaylist/qmediaplaylist.pro
@@ -6,9 +6,7 @@ CONFIG += insignificant_test
include (../qmultimedia_common/mockplaylist.pri)
QT += multimediakit-private
-
-# TARGET = tst_qmediaplaylist
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
DEFINES += TESTDATA_DIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
index f5252c63b..488249177 100644
--- a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
+++ b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaplaylistnavigator
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaplaylistnavigator.cpp
diff --git a/tests/auto/qmediapluginloader/qmediapluginloader.pro b/tests/auto/qmediapluginloader/qmediapluginloader.pro
index 55f134495..3299d50e5 100644
--- a/tests/auto/qmediapluginloader/qmediapluginloader.pro
+++ b/tests/auto/qmediapluginloader/qmediapluginloader.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediapluginloader
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediapluginloader.cpp
diff --git a/tests/auto/qmediarecorder/main.cpp b/tests/auto/qmediarecorder/main.cpp
index 98484e46a..cda3faf21 100755
--- a/tests/auto/qmediarecorder/main.cpp
+++ b/tests/auto/qmediarecorder/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QMediaRecorder test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qmediarecorder/qmediarecorder.pro b/tests/auto/qmediarecorder/qmediarecorder.pro
index c4395dcc0..5243a8206 100644
--- a/tests/auto/qmediarecorder/qmediarecorder.pro
+++ b/tests/auto/qmediarecorder/qmediarecorder.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediarecorder
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockrecorder.pri)
diff --git a/tests/auto/qmediaresource/qmediaresource.pro b/tests/auto/qmediaresource/qmediaresource.pro
index dcd2a2f45..e003c7a1e 100644
--- a/tests/auto/qmediaresource/qmediaresource.pro
+++ b/tests/auto/qmediaresource/qmediaresource.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += network multimediakit-private
-
-# TARGET = tst_qmediaresource
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaresource.cpp
diff --git a/tests/auto/qmediaservice/qmediaservice.pro b/tests/auto/qmediaservice/qmediaservice.pro
index d0397ad66..4d48c4887 100644
--- a/tests/auto/qmediaservice/qmediaservice.pro
+++ b/tests/auto/qmediaservice/qmediaservice.pro
@@ -1,9 +1,6 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaservice
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaservice.cpp
-
diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp
index 8f1dc38d1..3a46c5626 100644
--- a/tests/auto/qmediaservice/tst_qmediaservice.cpp
+++ b/tests/auto/qmediaservice/tst_qmediaservice.cpp
@@ -47,8 +47,7 @@
#include <qmediacontrol.h>
#include <qmediaservice.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qstyle.h>
+#include <QtCore/qcoreapplication.h>
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
index d107ff74f..f51f84958 100644
--- a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
+++ b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaserviceprovider
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaserviceprovider.cpp
diff --git a/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro b/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro
index fcd8116a8..3ee331104 100644
--- a/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro
+++ b/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qmediastreamscontrol.cpp
diff --git a/tests/auto/qmediatimerange/qmediatimerange.pro b/tests/auto/qmediatimerange/qmediatimerange.pro
index 004bf373d..25f709fae 100644
--- a/tests/auto/qmediatimerange/qmediatimerange.pro
+++ b/tests/auto/qmediatimerange/qmediatimerange.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediatimerange
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediatimerange.cpp
diff --git a/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro b/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro
index dc2f05123..675f5b0b2 100644
--- a/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro
+++ b/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmetadatareadercontrol.cpp
diff --git a/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro b/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro
index 601b8d61d..b6da11344 100644
--- a/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro
+++ b/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmetadatawritercontrol.cpp
diff --git a/tests/auto/qmultimedia_common/mockcameraservice.h b/tests/auto/qmultimedia_common/mockcameraservice.h
index 591745b51..c51f75f5e 100644
--- a/tests/auto/qmultimedia_common/mockcameraservice.h
+++ b/tests/auto/qmultimedia_common/mockcameraservice.h
@@ -55,7 +55,10 @@
#include "../qmultimedia_common/mockcameracontrol.h"
#include "../qmultimedia_common/mockvideosurface.h"
#include "../qmultimedia_common/mockvideorenderercontrol.h"
+
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
#include "../qmultimedia_common/mockvideowindowcontrol.h"
+#endif
class MockSimpleCameraService : public QMediaService
{
@@ -102,7 +105,9 @@ public:
mockImageProcessingControl = new MockImageProcessingControl(this);
mockImageEncoderControl = new MockImageEncoderControl(this);
rendererControl = new MockVideoRendererControl(this);
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
windowControl = new MockVideoWindowControl(this);
+#endif
rendererRef = 0;
windowRef = 0;
}
@@ -148,12 +153,15 @@ public:
rendererRef += 1;
return rendererControl;
}
- } else if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
+ }
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
if (windowRef == 0) {
windowRef += 1;
return windowControl;
}
}
+#endif
return 0;
}
@@ -161,8 +169,10 @@ public:
{
if (control == rendererControl)
rendererRef -= 1;
- else if (control == windowControl)
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (control == windowControl)
windowRef -= 1;
+#endif
}
MockCameraControl *mockControl;
@@ -176,7 +186,9 @@ public:
MockImageProcessingControl *mockImageProcessingControl;
MockImageEncoderControl *mockImageEncoderControl;
MockVideoRendererControl *rendererControl;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
MockVideoWindowControl *windowControl;
+#endif
int rendererRef;
int windowRef;
};
diff --git a/tests/auto/qmultimedia_common/mockmediaplayerservice.h b/tests/auto/qmultimedia_common/mockmediaplayerservice.h
index ac1e32bc6..57697225c 100644
--- a/tests/auto/qmultimedia_common/mockmediaplayerservice.h
+++ b/tests/auto/qmultimedia_common/mockmediaplayerservice.h
@@ -48,7 +48,9 @@
#include "mockmediastreamscontrol.h"
#include "mockmedianetworkaccesscontrol.h"
#include "mockvideorenderercontrol.h"
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
#include "mockvideowindowcontrol.h"
+#endif
class MockMediaPlayerService : public QMediaService
{
@@ -61,9 +63,11 @@ public:
mockStreamsControl = new MockStreamsControl;
mockNetworkControl = new MockNetworkAccessControl;
rendererControl = new MockVideoRendererControl;
- windowControl = new MockVideoWindowControl;
rendererRef = 0;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ windowControl = new MockVideoWindowControl;
windowRef = 0;
+#endif
}
~MockMediaPlayerService()
@@ -72,7 +76,9 @@ public:
delete mockStreamsControl;
delete mockNetworkControl;
delete rendererControl;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
delete windowControl;
+#endif
}
QMediaControl* requestControl(const char *iid)
@@ -84,13 +90,15 @@ public:
rendererRef += 1;
return rendererControl;
}
- } else if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
+ }
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
if (windowRef == 0) {
windowRef += 1;
return windowControl;
}
}
-
+#endif
if (qstrcmp(iid, QMediaNetworkAccessControl_iid) == 0)
return mockNetworkControl;
@@ -101,8 +109,10 @@ public:
{
if (control == rendererControl)
rendererRef -= 1;
- else if (control == windowControl)
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (control == windowControl)
windowRef -= 1;
+#endif
}
void setState(QMediaPlayer::State state) { emit mockControl->stateChanged(mockControl->_state = state); }
@@ -154,9 +164,11 @@ public:
MockStreamsControl *mockStreamsControl;
MockNetworkAccessControl *mockNetworkControl;
MockVideoRendererControl *rendererControl;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
MockVideoWindowControl *windowControl;
- int rendererRef;
int windowRef;
+#endif
+ int rendererRef;
};
diff --git a/tests/auto/qmultimedia_common/mockmediaserviceprovider.h b/tests/auto/qmultimedia_common/mockmediaserviceprovider.h
index 3509fea9b..4573d7f96 100644
--- a/tests/auto/qmultimedia_common/mockmediaserviceprovider.h
+++ b/tests/auto/qmultimedia_common/mockmediaserviceprovider.h
@@ -43,6 +43,7 @@
#define MOCKMEDIASERVICEPROVIDER_H
#include "qmediaserviceprovider.h"
+#include "qmediaservice.h"
// Simple provider that lets you set the service
class MockMediaServiceProvider : public QMediaServiceProvider
diff --git a/tests/auto/qmultimedia_common/mockvideo.pri b/tests/auto/qmultimedia_common/mockvideo.pri
index a2492298c..6ffa0366a 100644
--- a/tests/auto/qmultimedia_common/mockvideo.pri
+++ b/tests/auto/qmultimedia_common/mockvideo.pri
@@ -3,8 +3,12 @@ INCLUDEPATH += $$PWD \
../../../src/multimedia \
../../../src/multimedia/video
+contains(QT,multimediakitwidgets)|contains(QT,multimediakitwidgets-private) {
+ HEADERS *= ../qmultimedia_common/mockvideowindowcontrol.h
+ DEFINES *= QT_MULTIMEDIAKIT_MOCK_WIDGETS
+}
+
HEADERS *= \
../qmultimedia_common/mockvideosurface.h \
- ../qmultimedia_common/mockvideorenderercontrol.h \
- ../qmultimedia_common/mockvideowindowcontrol.h
+ ../qmultimedia_common/mockvideorenderercontrol.h
diff --git a/tests/auto/qmultimedia_common/mockvideowindowcontrol.h b/tests/auto/qmultimedia_common/mockvideowindowcontrol.h
index ef8c41d80..981e266c8 100644
--- a/tests/auto/qmultimedia_common/mockvideowindowcontrol.h
+++ b/tests/auto/qmultimedia_common/mockvideowindowcontrol.h
@@ -42,6 +42,8 @@
#ifndef MOCKVIDEOWINDOWCONTROL_H
#define MOCKVIDEOWINDOWCONTROL_H
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+
#include "qvideowindowcontrol.h"
class MockVideoWindowControl : public QVideoWindowControl
@@ -68,4 +70,5 @@ public:
void setSaturation(int) {}
};
+#endif // QT_MULTIMEDIAKIT_MOCK_WIDGETS
#endif // MOCKVIDEOWINDOWCONTROL_H
diff --git a/tests/auto/qpaintervideosurface/qpaintervideosurface.pro b/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
index 9d14c4aeb..8c109b20a 100644
--- a/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
+++ b/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
@@ -1,16 +1,17 @@
load(qttest_p4)
-QT += multimediakit-private
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) {
QT += opengl
} else {
DEFINES += QT_NO_OPENGL
}
-# TARGET = tst_qpaintervideosurface
-# CONFIG += testcase
-
contains(QT_CONFIG, opengl): QT += opengl
SOURCES += tst_qpaintervideosurface.cpp
+# QPA-minimal and OpenGL don't get along
+qpa:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp b/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp
index 66fa43945..53ed906e9 100644
--- a/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp
+++ b/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp
@@ -44,7 +44,7 @@
#include <private/qpaintervideosurface_p.h>
#include <QtTest/QtTest>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <qvideosurfaceformat.h>
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
diff --git a/tests/auto/qradiotuner/main.cpp b/tests/auto/qradiotuner/main.cpp
index 8b7f83836..b2d6fd2b1 100755
--- a/tests/auto/qradiotuner/main.cpp
+++ b/tests/auto/qradiotuner/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QRadioTuner test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qradiotuner/qradiotuner.pro b/tests/auto/qradiotuner/qradiotuner.pro
index 8e2a07b02..b04057ba4 100644
--- a/tests/auto/qradiotuner/qradiotuner.pro
+++ b/tests/auto/qradiotuner/qradiotuner.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qradiotuner
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += tst_qradiotuner.h
SOURCES += main.cpp tst_qradiotuner.cpp
diff --git a/tests/auto/qsoundeffect/qsoundeffect.pro b/tests/auto/qsoundeffect/qsoundeffect.pro
index b5a510a44..c1e317893 100644
--- a/tests/auto/qsoundeffect/qsoundeffect.pro
+++ b/tests/auto/qsoundeffect/qsoundeffect.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += core declarative multimediakit-private
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro b/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro
index 486bc1e7d..e336c6eb9 100644
--- a/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro
+++ b/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro
@@ -1,5 +1,6 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideodevicecontrol.cpp
diff --git a/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro b/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro
index 57e44032f..98b64c17d 100644
--- a/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro
+++ b/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qvideoencodercontrol.cpp
diff --git a/tests/auto/qvideoframe/qvideoframe.pro b/tests/auto/qvideoframe/qvideoframe.pro
index 03af898c8..13bcf1ee1 100644
--- a/tests/auto/qvideoframe/qvideoframe.pro
+++ b/tests/auto/qvideoframe/qvideoframe.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qvideoframe
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideoframe.cpp
diff --git a/tests/auto/qvideoframe/tst_qvideoframe.cpp b/tests/auto/qvideoframe/tst_qvideoframe.cpp
index 37f7dc440..f400bfecb 100644
--- a/tests/auto/qvideoframe/tst_qvideoframe.cpp
+++ b/tests/auto/qvideoframe/tst_qvideoframe.cpp
@@ -650,7 +650,7 @@ void tst_QVideoFrame::mapImage()
QVERIFY(frame.map(mode));
QVERIFY(frame.bits());
- QCOMPARE(frame.mappedBytes(), image.numBytes());
+ QCOMPARE(frame.mappedBytes(), image.byteCount());
QCOMPARE(frame.bytesPerLine(), image.bytesPerLine());
QCOMPARE(frame.mapMode(), mode);
diff --git a/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro b/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro
index 472d2cf9c..26ea850fb 100644
--- a/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro
+++ b/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qvideosurfaceformat
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideosurfaceformat.cpp
diff --git a/tests/auto/qvideowidget/qvideowidget.pro b/tests/auto/qvideowidget/qvideowidget.pro
index 07fd03a02..4a034c17a 100644
--- a/tests/auto/qvideowidget/qvideowidget.pro
+++ b/tests/auto/qvideowidget/qvideowidget.pro
@@ -1,10 +1,10 @@
load(qttest_p4)
-QT += multimediakit-private
-
-# TARGET = tst_qvideowidget
-# CONFIG += testcase
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideowidget.cpp
-maemo*:CONFIG += insignificant_test
+# QPA seems to break some assumptions
+qpa:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp
index cfcd79927..58ab43eed 100644
--- a/tests/auto/qvideowidget/tst_qvideowidget.cpp
+++ b/tests/auto/qvideowidget/tst_qvideowidget.cpp
@@ -56,7 +56,7 @@
#include <qabstractvideosurface.h>
#include <qvideosurfaceformat.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
QT_USE_NAMESPACE
class tst_QVideoWidget : public QObject
diff --git a/tests/systemtests/audio/sys_audio.qtt b/tests/systemtests/audio/sys_audio.qtt
new file mode 100644
index 000000000..142a964df
--- /dev/null
+++ b/tests/systemtests/audio/sys_audio.qtt
@@ -0,0 +1,295 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+Ensure 2 test .mp3 file available on device
+Ensure 2 test .wav file available on device
+Ensure a valid m3u file referring to locations where indicated media is available on the device
+Ensure the device can ping destinations on the network (if applicable)
+Have an audio stream url available (e.g. http://202.6.74.107:8060/triplej.mp3 for example)
+Ensure access to Internet available to device either via 3G and WiFi
+SIM cards from Vodafone and Testra (Australia) needed for 3G streaming testing
+*/
+ initTestCase: function()
+ {
+ },
+
+ play_an_audio_file_data: {
+ mp3:[".mp3", "filename", "mpeg audio layer 3"],
+ wav:[".wav", "filename", "waveform audio"]
+ },
+
+ play_an_audio_file: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Audio File";
+ testBinary = "player";
+ testGoal = "Verify that Audio files can be played.";
+ testPreconditions = "Audio files in " + extension + " format are available on device.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | Click Open, then select desired "+filename+extension+" file to return to player UI | Verify selected file has populated playlist window |
+ | Highlight file in playlist window by clicking on it | |
+ | Select [Play] | Verify that the " + format + " file is audible on device |
+ "));
+ },
+
+ basic_player_controls_for_audio_data: {
+ mp3:[".mp3", "filename", "mpeg audio layer 3"],
+ },
+
+ basic_player_controls_for_audio: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Audio Player Controls";
+ testBinary = "player";
+ testGoal = "Verify basic API for controling audio playback ";
+ testPreconditions = "a test "+extension+" file is available on device";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select Open | |
+ | In [Open Files] either double click the desired "+filename+extension+" or highlight and click Open to be returned to the player UI | |
+ | Highlight and click Play or doubleclick to play the file | Verify that file plays properly from the start |
+ | | Verify that the correct track details are displayed on the application title bar |
+ | Select [Pause] | Verify that file has paused |
+ | | Verify that [Pause] icon has now changed to a [Play] icon |
+ | Select [Play] | Verify that file continues to play properly from where previously paused. |
+ | | Verify that [Play] icon is now a [Pause] icon again |
+ | Select [Next File] control | Verify that next file in playlist is playing from start |
+ | | Verify that the title bar has changed to reflect the seclected audio track |
+ | After some time (10-20 sec) Select [Beginning of File] icon | Verify that current file is being played from start |
+ | Let some arbitrary time pass, then Select [Beginning of File] control twice in quick succession. | Verify that previous file in playlist is playing from start |
+ | Select [Stop] control | Verify that file has stopped playing |
+ | Select [Play] | Verify that file continues to play from start of file. |
+ | Let file play till end | Verify player continues playing the next file in the playlist window |
+ | After some arbitrary time, Select [Stop] | |
+ | Select [Next File] control | Verify that next file in playlist is highlighted |
+ | | Verify that file is not automatically playing |
+ | Select [Beginning of File] control | Verify that previous file in playlist is highlighted |
+ | Select file in playlist | Verify that file plays in player. |
+ | Select number of files greater than can be displayed without scrolling in to playlist | Verify that list can be scrolled through |
+ | With file playing, verify that hardware keys can change volume up and down | |
+ | With file playing, verify that UI volume control slider can change volume up and down | |
+ | Select volume at 50% (or thereabout) | |
+ | Select [Mute] | Verify that sound is muted while file is playing |
+ | | Verify that [Mute] control is displaying the Muted icon |
+ | Select [Mute] control again | Verify that sound has reverted back to level selected prior to muting |
+ | Click on Full Screen | Verify that nothing happens when playing an audio file |
+ | Click Color Option | Verify that this has no effect when playing an audio file |
+ "));
+
+ },
+
+ seek_controls_for_audio_data: {
+ mp3:[".mp3", "filename", "mpeg audio layer 3"],
+ },
+
+ seek_controls_for_audio: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Audio Seek Controls";
+ testBinary = "player";
+ testGoal = "Verify FastForward and Rewind functionality of the API";
+ testPreconditions = "a test "+extension+" file is available on device";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | In [Open File] select the "+filename+extension+" file to return to player UI | |
+ | Select [Play] to play the file | |
+ | Click on the [1.0x] (Multiplier) dropbox and select 2.0x | Verify that file is playing at double speed |
+ | With multiplier control set on [2.0], select a new file from the playlist window | Verify that the Multiplier control has reverted back to [1.0x] |
+ | | Verify that the audio is playing at normal speed |
+ | Click on the [Multiplier] control and select 0.5x | Verify that file is playing at half speed |
+ | With multiplier control set on [0.5], select a new file from the playlist window | Verify that the Multiplier control has reverted back to [1.0x] |
+ | | Verify that the audio is playing at normal speed |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file |
+ | Click on the [1.0x] (Multiplier) dropbox and select 2.0x | Verify that file is playing at double speed |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file at double speed |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file at double speed |
+ | Click on the Multiplier dropbox and select 0.5x | Verify that file is playing at half the speed |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file at half speed |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file at half speed |
+ "));
+ },
+
+
+
+ basic_controls_for_streamed_audio_content: function()
+ {
+
+//*Note* For this test you need a playlist of streaming media urls. Suggest: http://202.6.74.107:8060/triplej.mp3 ; http://www.abc.net.au/streaming/triplej.asx ; rtsp://media1.abc.net.au/broadcast/triplej.rm ; mms://media3.abc.net.au/triplej ; depending on your platform and backend support.
+
+ // Test meta data
+ testApplication = "Multimedia - Content Streaming";
+ testBinary = "player";
+ testGoal = "Verify playback of streaming audio media";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | In player application, Select or Tap [Open] | |
+ | In [Open File] navigate and highlight test (streaming) playlist file | |
+ | Select or Tap on selected file to return to player UI | Verify selected file has populated playlist |
+ | Highlight file in playlist by selecting or clicking it | |
+ | Select [Play] | Verify that stream is playing on device |
+ | Select [Pause] | Verify that stream is paused on device |
+ | | Verify that the [Pause] button has changed to a [Play] button |
+ | Select [Play] again | Verify that stream is playing on device |
+ | Select [Stop] | |
+ | Open local mp3 file in to play list and select it to play | Verify that the mp3 plays while the stream name is still present in the playlist |
+ | Re-select the stream in the playlist | Verify that the stream starts playing again |
+ | Select [Next File] | Verify that the player started playing the next file in the playlist |
+ | Select [Previous File] | Verify that the original stream is playing again |
+ | During stream playback, have headphones connected to device | Verify that the sound is now playing through the headphones |
+ | Invoke a system notification on the device (such as an incoming SMS) | Verify that the device correctly transmits the audible system notification through the devices speakers and then returns to playing the stream through the headphones |
+ "));
+ },
+
+ record_an_audio_file: function()
+ {
+
+ // Test meta data
+ testApplication = "Multimedia - Recording Audio";
+ testBinary = "audiorecorder";
+ testGoal = "Verify that audio can be recorded.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select Input Device | |
+ | Select Audio Codec | |
+ | Select File Container | |
+ | Select Sample Rate | |
+ | Select Quality and Bitrate | |
+ | Select Output... and select location and name of output file | |
+ | Select Record | Verify that [Record] button has changed in to [Stop] |
+ | | Verify that Duration is counting seconds |
+ | | Verify that Recording is displayed |
+ | Select Stop | Verify that Duration is now 0 |
+ | Select Output File in file browser | Verify that an audio file has been generated |
+ | Play output file in media player | Verify that audible audio is recorded in file |
+ "));
+ },
+
+pause_recording_an_audio_file: function()
+ {
+
+ // Test meta data
+ testApplication = "Multimedia - Pause Recording Audio";
+ testBinary = "audiorecorder";
+ testGoal = "Verify API to be able to pause audio recording without unwanted artifacts.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select Input Device | |
+ | Select Audio Codec | |
+ | Select File Container | |
+ | Select Sample Rate | |
+ | Select Quality and Bitrate | |
+ | Select Output... and select location and name of output file | |
+ | Select Record | Verify that [Record] button has changed in to [Stop] |
+ | | Verify that Duration is counting seconds |
+ | | Verify that Recording is displayed |
+ | Speak in to the microphone. Suggest counting from 1 to 5 | |
+ | Select Pause | Verify that instead of Duration, Paused is displayed |
+ | Keep speaking in to microfon, continue counting from 6 to 10 | |
+ | Select Resume | Verify that the counter has resumed the seconds count from where it was previously paused. |
+ | Continue counting from 11 to 15 in to the microphone | |
+ | After a arbitrary time, Stop the recording. | |
+ | Select Output File in file browser | Verify that an audio file has been generated |
+ | Play output file in media player | Verify that audible audio is recorded in file and that audio is only recorded for period that Pause was not selected |
+ | | Verify that the recording reproduces the counting from 1 to 5 then continues from 11 to 15 and that the counting from 6 - 10 is not recorded |
+ | | Verify there is no audible artifact that separates the two or more recording periods, that is that the joint is seamless |
+ "));
+ },
+}
diff --git a/tests/systemtests/camera/sys_camera.qtt b/tests/systemtests/camera/sys_camera.qtt
new file mode 100644
index 000000000..781e50b5d
--- /dev/null
+++ b/tests/systemtests/camera/sys_camera.qtt
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+*/
+ initTestCase: function()
+ {
+ },
+
+ take_a_photo: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Still Camera";
+ testBinary = "declarative camera";
+ testGoal = "Verify that a photo can be taken with the camera.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Image tab to put camera in still mode | Verify the intended scene is reproduced in the preview pane/viewfinder |
+ | Select Capture Photo | Verify that image is shown on screen for preview |
+ | | Verify that a new file is in the Images folder and accessabble with the image viewer |
+ | Select given image | Verify that it is a true representation of the intended sceen |
+ | | Verify the image has no unintended artifacts and noise and is properly formatted |
+ "));
+ },
+
+change_camera_settings: function()
+{
+ // Test meta data
+ testApplication = "Multimedia - Still Camera";
+ testBinary = "declarative camera";
+ testGoal = "Verify that the camera can change its Still Camera settings successfully.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select the primary camera device from Menu/Devices | Verify the viewfinder is displaying the scene from the main camera device |
+ | Select Capture Photo | Verify that a photo was taken and that a preview image is shown on screen |
+ | Select the secandary camera device from Menu/Devices | Verify the viewfinder is displaying the scene from the secondary camera device |
+ | Select Capture Photo | Verify that a photo was taken from the secondary camera device and that a preview image is shown on screen |
+ | Change Exposure Compensatioin on the slider in the main UI | Verify that the change in value affects the picture qwality in expected fashion |
+ | Select Settings/File/Setrtings | Verify that you have an option to change Image Resolution, Image Format and Quality |
+ | Change Image Resolution to another supported resolution | Verify that you can take stills with various resolutions |
+ | Selct Flash always on from the setitngs menu | Verify that when photo is taken, the flash is always triggered |
+ | Select No Flash on from the menu | Verify that despite the lack of natural light, the flash will not trigger when taking photos |
+ | Change Image Format to another supported format | Verify that you can take stills with various Image Formats |
+ | Sellect Settings/Device/Secondary Device | Verify that you can see the view from the Front Facing Camera on the viewfinder |
+ | | Varify that you can take still images from the Front Facing Camera |
+ | Select Settings/File/Exit | Verify that the application has now closed |
+
+ "));
+},
+
+ take_a_video: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can capture and save an audio/video file.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | Select Record Video | Verify that video is shown on screen for preview |
+ | Select Pause | Verify that the Recorded counter has stopped |
+ | Select Record again | Verify that the Recorded counter has continued counting |
+ | Select Stop | Verify that the recording has now stopped |
+ | | Verify that a new file is in the Images folder and accessabble with the player |
+ | Select given video | Verify that it is a true representation of the intended sceen |
+ | | Verify that the Pause in the recording has happened and that recording continued without an issue after that |
+ | | Verify the image has no unintended artifacts and noise and is properly formatted |
+ "));
+ },
+
+ change_video_settings: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can change its Video settings successfully.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | In the Menu Bar, select Settings/Devices | Verify that you can select Primay and Secondary Camera on Device |
+ | Select Secondary Camera | Verify that devise is now showing video stram from Front Facing camera |
+ | Select Settings/File/Settings | Verify that you now have otion to select Audio Codecs, Resolution Sample Rate, Framerate, Quality, Video Codecs and Container Format |
+ | Change Audio Codecs to another supported Codecs | Verify that camera can record |
+ | Change Resolutiuon to another supported Resolution | Verify that camera can record |
+ | Change Sample Rate to another supported Sample Rate | Verify that camera can record |
+ | Change Framerate to another supported Framerate | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ | Change Video Codecs to another supported Video Codecs | Verify that camera can record |
+ | Change Container Format | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ "));
+ },
+
+
+
+
+
+
+}
diff --git a/tests/systemtests/radio/sys_radio.qtt b/tests/systemtests/radio/sys_radio.qtt
new file mode 100644
index 000000000..0f3a120bb
--- /dev/null
+++ b/tests/systemtests/radio/sys_radio.qtt
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+Ensure radio reception is available in testing area
+A device specific headset is required to be connected to device for radio testing
+*/
+
+ initTestCase: function()
+ {
+ },
+
+ play_a_radio_transmission: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Radio Transmission";
+ testBinary = "radio";
+ testGoal = "Verify that radio stations can be played.";
+ testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antena to the device and must be connected.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | | Verify that 0 KHz and No Signal is displayed |
+ | Select [Scan Up] | Audible white noise should be heard as the radio searches for a frequency lock. Frequency should be increasing in 100 KHz steps until a strong signal is found |
+ | | Verify that a radio signal can be heard. It is possible for the radio to lock on a silent station signal, in that case progress further up the frequencies |
+ | Once a strong audible signal is found | Verify that the stations frequency and Got Signal message is displayed |
+ | Select [Scan Up] | Verify that the radio has moved off the previous station and in progressing through the frequencies |
+ | Once on a radio station, Select [Freq Up] | Verify that the radio frequency has moved off the station by 100KHz and is stationary |
+ | Select [Freq Up] again | Verify that the radio frequency has moved up another 100KHz and is stationary |
+ | Select [Freq Down] twice | Verify that you are now at the frequency of the previous radio station and that the signal is audible |
+ | Select [Scan Down] | Verify that the radio has moved off the previous station, progressing through the frequencies, and finds the original station from this test |
+ | Exit the radio application | Verify that the radio station is no longer heard |
+ "));
+ },
+
+ radio_interrupted_by_system_notification: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Radio With Interruptions";
+ testBinary = "radio";
+ testGoal = "Verify that radio playback can be successfuly interrupted by system notifications and resume playback without issues.";
+ testPreconditions = "1. Audible system notifications should be enabled for this test.<br>2. Radio reception should be available in the test area.<br>3. Wired headphones act as an antena to the device and must be connected.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Locate a strong radio station signal by scanning up/down | |
+ | While on a strong and audible radio signal, evoke a system notification on device (eg: incoming SMS, alarm notification) | Verify that after the system notification has been delivered, the radio reverts to outputting the audio signal back through the headphones |
+ "));
+ },
+
+ radio_volume_control: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Radio Volume Control";
+ testBinary = "radio";
+ testGoal = "Verify that the radio volume can be controlled.";
+ testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antena to the device and must be connected.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Locate a strong radio station signal by scanning upwards | |
+ | While on a strong and audible radio signal, move volume slider to the right | Verify that the audio volume of the radio station is amplified |
+ | Move volume slider to the left | Verify that the audio volume is lowered |
+ | Move the volume slider all the way to the left | Verify that the sound is now completely muted |
+ "));
+ },
+}
diff --git a/tests/systemtests/video/sys_video.qtt b/tests/systemtests/video/sys_video.qtt
new file mode 100644
index 000000000..5922745ff
--- /dev/null
+++ b/tests/systemtests/video/sys_video.qtt
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+Ensure 2 test .mp4 files are available on device
+Ensure the device can ping destinations on the network (if applicable)
+Have a video stream url available (e.g. http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4)
+Ensure access to Internet available to device
+Ensure an active SIM card is available on the device. As some video streaming tests are carrier spacific, it is recomended in Australia to have access to Testra, Optus and Vodafone SIM's
+*/
+ initTestCase: function()
+ {
+ },
+
+ play_a_video_file_data: {
+ mp4:[".mp4", "filename", "mpeg video layer 4"]
+ },
+
+ play_a_video_file: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Video File";
+ testBinary = "player";
+ testGoal = "Verify that local, networked and carrier streamed video files can be played. ";
+ testPreconditions = "1. A test "+extension+" file is available on device.<br>2. Internet acces is enabled on the device.<br>3. Operator SIM cards are available to the device";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | In [Open File] select the "+filename+extension+" file to return to player UI | |
+ | Select [Play] to play the file | Verify selected file has populated playlist |
+ | Highlight file in playlist by clicking on it | |
+ | Select [Play] | Verify that .MP4 file is playing on device |
+ "));
+ },
+
+ basic_controls_for_video_data: {
+ mp4:[".mp4", "filename", "mpeg video layer 4"]
+ },
+
+ basic_controls_for_video: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Controls";
+ testBinary = "player";
+ testGoal = "Verify the API for basic video playback functionality";
+ testPreconditions = "a test "+extension+" file is available on device.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | In [Open File] select the "+filename+extension+" file to return to player UI | |
+ | Select [Play] to play the file | |
+ | Select [Pause] | Verify that file has paused |
+ | | Verify that the [Pause] icon has changed to a [Play] icon |
+ | Select [Play] | Verify that the [Play] icon has changed to a [Pause] icon |
+ | | Verify that file continues to play from where previously paused. |
+ | Select [Next File] | Verify that next file in playlist is playing from start |
+ | After some time (10-20 sec) Select [Beginning of File] control | Verify that current file is being played from start |
+ | Let arbitrary time pass, then Select [Beginning of File] control twice in quick succession.| Verify that previous file in playlist is playing from start |
+ | Select [Stop] | Verify that file has stopped playing |
+ | Select [Play] | Verify that file continues to play from start of file. |
+ | Let file play till end | Verify player stops at end of file. |
+ | Start playing file. | |
+ | After arbitrary time, Select [Stop] | |
+ | Select [Next File] | Verify that next file in playlist is highlighted |
+ | | Verify that file is not automatically playing |
+ | Select [Beginning of File] | Verify that previous file in playlist is highlighted |
+ | Select file in playlist | Verify that file plays in player. |
+ | Select number of files greater than can be displayed without scrolling in to playlist | Verify that list can be scrolled through |
+ | With file playing, verify that hardware keys can change volume up and down | |
+ | With file playing, verify that UI volume control slider can change volume up and down | |
+ | Select volume at 50% (or thereabout) | |
+ | Select [Mute] control | Verify that sound is muted while file is playing |
+ | | Verify that [Mute] control is displaying the Muted icon |
+ | Select [Mute] control again | Verify that sound has reverted back to level selected prior to muting |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file |
+ | Start playing file | |
+ | Select [FullScreen] control | Verify that video is now playing in Fullscreen mode |
+ | When at end of current file | Verify that next file in playlist is being played |
+ | When at last file in playlist and at end of file | Verify that fullscreen mode is exited and user returned to player interface and that [FullScreen] is no longer selected. |
+ "));
+ },
+
+ seek_controls_for_video: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Seek";
+ testBinary = "player";
+ testGoal = "Verify the API for Fast Forward/Rewind functionality.";
+ testPreconditions = "Video files are available for testing on the device.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | While playing a video file, Select or Tap on [1.0] (Multiplier) control | |
+ | Select [2.0] | Verify that file is playing at double speed |
+ | Select [Multiplier] control | |
+ | Select [0.5] | Verify that file is playing at half speed |
+ "));
+ },
+
+ basic_controls_for_streamed_content: function()
+ {
+
+//*Note* In order to play stream on Maemo, invoke player with following command from console:
+// run-standalone.sh ./player http://202.6.74.107:8060/triplej.mp3
+//*Note* For this test you need a playlist of streaming media urls. Suggest: http://202.6.74.107:8060/triplej.mp3 ; http://www.abc.net.au/streaming/triplej.asx ; rtsp://media1.abc.net.au/broadcast/triplej.rm ; mms://media3.abc.net.au/triplej ; depending on your platform and backend support.
+
+ // Test meta data
+ testApplication = "Multimedia - Content Streaming";
+ testBinary = "player";
+ testGoal = "Verify various forms of video streaming.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | In player application, Select or Tap [Open] | |
+ | In [Open File] navigate and highlight test (streaming) playlist file | |
+ | Select or Tap on selected file to return to player UI | Verify selected file has populated playlist |
+ | Highlight file in playlist by selecting or clicking it | |
+ | Select [Play] | Verify that stream is playing on device |
+ | Select [Pause] | Verify that stream is paused on device |
+ | | Verify that the [Pause] button has changed to a [Play] button |
+ | Select [Play] again | Verify that stream is playing on device |
+ | Select [Stop] | |
+ | Open local mp3 file in to play list and select it to play | Verify that the mp3 plays while the stream name is still present in the playlist |
+ | Re-select the stream in the playlist | Verify that the stream starts playing again |
+ | Select [Next File] | Verify that the player started playing the next file in the playlist |
+ | Select [Previous File] | Verify that the original stream is playing again |
+ | During stream playback, have headphones connected to device | Verify that the sound is now playing through the headphones |
+ | Invoke a system notification on the device (such as an incoming SMS) | Verify that the device correctly transmits the audible system notification through the devices speakers and then returns to playing the stream through the headphones |
+ "));
+ },
+
+ take_a_video: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can capture and save an audio/video file.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | Select Record Video | Verify that video is shown on screen for preview |
+ | Select Pause | Verify that the Recorded counter has stopped |
+ | Select Record again | Verify that the Recorded counter has continued counting |
+ | Select Stop | Verify that the recording has now stopped |
+ | | Verify that a new file is in the Images folder and accessabble with the player |
+ | Select given video | Verify that it is a true representation of the intended sceen |
+ | | Verify that the Pause in the recording has happened and that recording continued without an issue after that |
+ | | Verify the image has no unintended artifacts and noise and is properly formatted |
+ "));
+ },
+
+ change_video_settings: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can change its Video settings successfully.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | In the Menu Bar, select Settings/Devices | Verify that you can select Primay and Secondary Camera on Device |
+ | Select Secondary Camera | Verify that devise is now showing video stram from Front Facing camera |
+ | Select Settings/File/Settings | Verify that you now have otion to select Audio Codecs, Resolution Sample Rate, Framerate, Quality, Video Codecs and Container Format |
+ | Change Audio Codecs to another supported Codecs | Verify that camera can record |
+ | Change Resolutiuon to another supported Resolution | Verify that camera can record |
+ | Change Sample Rate to another supported Sample Rate | Verify that camera can record |
+ | Change Framerate to another supported Framerate | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ | Change Video Codecs to another supported Video Codecs | Verify that camera can record |
+ | Change Container Format | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ "));
+ },
+
+}