summaryrefslogtreecommitdiffstats
path: root/tests/auto/unit/qdeclarativeaudio
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2012-03-13 13:29:26 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-16 06:58:46 +0100
commite9ebbeef72b6fd0ed375cae0b35b7a879c6fe9b5 (patch)
tree1f83f5980fe0ea3e5b85e65fc8f2ce51350de03e /tests/auto/unit/qdeclarativeaudio
parent7c0b1da0edec1228657ab06ab3eb2e6c529b84bd (diff)
Make QDeclarativeAudio use QMediaPlayer instead of the controls.
Very minor changes in semantics due to previous differences: * negative positions are not supported any more (clamped to >= 0) * setting muted to the same value previously set to the control itself won't signal any more. Change-Id: Iacf4310508d853ae82b63dee28095fce12b6ff28 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Diffstat (limited to 'tests/auto/unit/qdeclarativeaudio')
-rw-r--r--tests/auto/unit/qdeclarativeaudio/tst_qdeclarativeaudio.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/unit/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/unit/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
index 57f0dd10a..0b358d711 100644
--- a/tests/auto/unit/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ b/tests/auto/unit/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -617,18 +617,18 @@ void tst_QDeclarativeAudio::position()
QCOMPARE(spy.count(), 1);
audio.setPosition(-5403);
- QCOMPARE(audio.position(), -5403);
- QCOMPARE(provider.playerControl()->position(), qint64(-5403));
+ QCOMPARE(audio.position(), 0);
+ QCOMPARE(provider.playerControl()->position(), qint64(0));
QCOMPARE(spy.count(), 2);
audio.setPosition(-5403);
- QCOMPARE(audio.position(), -5403);
- QCOMPARE(provider.playerControl()->position(), qint64(-5403));
+ QCOMPARE(audio.position(), 0);
+ QCOMPARE(provider.playerControl()->position(), qint64(0));
QCOMPARE(spy.count(), 2);
// Check the signal change signal is emitted if the change originates from the media service.
- provider.playerControl()->setPosition(0);
- QCOMPARE(audio.position(), 0);
+ provider.playerControl()->setPosition(450);
+ QCOMPARE(audio.position(), 450);
QCOMPARE(spy.count(), 3);
connect(&audio, SIGNAL(positionChanged()), &QTestEventLoop::instance(), SLOT(exitLoop()));
@@ -691,7 +691,7 @@ void tst_QDeclarativeAudio::muted()
audio.setMuted(false);
QCOMPARE(audio.isMuted(), false);
QCOMPARE(provider.playerControl()->isMuted(), false);
- QCOMPARE(spy.count(), 3);
+ QCOMPARE(spy.count(), 2);
}
void tst_QDeclarativeAudio::bufferProgress()