summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-02-24 23:49:10 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-02-24 23:49:10 (GMT)
commit0bef5b3a51bf47851caf29bf0dedbf26a56cb8c4 (patch)
treef1c8379b25df379fda62cd3069df8e70b3ff86d7 /tests/auto
parentf39bb2af2d81640d30222cd5abc31b076105dd8b (diff)
parentef30a6f336d55c813423bf139d8363f50181179f (diff)
downloadQt-0bef5b3a51bf47851caf29bf0dedbf26a56cb8c4.zip
Qt-0bef5b3a51bf47851caf29bf0dedbf26a56cb8c4.tar.gz
Qt-0bef5b3a51bf47851caf29bf0dedbf26a56cb8c4.tar.bz2
Merge branch 'master' of ../../qt/master
Conflicts: src/multimedia/qml/qml.pri src/multimedia/qml/qmlaudio_p.h src/multimedia/qml/qmlgraphicsvideo_p.h src/multimedia/qml/qmlmediabase_p.h src/plugins/qmlmodules/multimedia/multimedia.cpp
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qmediacontent/qmediacontent.pro2
-rw-r--r--tests/auto/qmediacontent/tst_qmediacontent.cpp13
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/qmediacontent/qmediacontent.pro b/tests/auto/qmediacontent/qmediacontent.pro
index f7884f6..6c13c8b 100644
--- a/tests/auto/qmediacontent/qmediacontent.pro
+++ b/tests/auto/qmediacontent/qmediacontent.pro
@@ -2,5 +2,5 @@ load(qttest_p4)
SOURCES += tst_qmediacontent.cpp
-QT = core multimedia
+QT = core network multimedia
diff --git a/tests/auto/qmediacontent/tst_qmediacontent.cpp b/tests/auto/qmediacontent/tst_qmediacontent.cpp
index 35dd0a9..8987241 100644
--- a/tests/auto/qmediacontent/tst_qmediacontent.cpp
+++ b/tests/auto/qmediacontent/tst_qmediacontent.cpp
@@ -51,6 +51,7 @@ class tst_QMediaContent : public QObject
private slots:
void testNull();
void testUrlCtor();
+ void testRequestCtor();
void testResourceCtor();
void testResourceListCtor();
void testCopy();
@@ -77,6 +78,18 @@ void tst_QMediaContent::testUrlCtor()
QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
}
+void tst_QMediaContent::testRequestCtor()
+{
+ QNetworkRequest request(QUrl("http://example.com/movie.mov"));
+ request.setAttribute(QNetworkRequest::User, QVariant(1234));
+
+ QMediaContent media(request);
+
+ QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
+ QCOMPARE(media.canonicalResource().request(), request);
+ QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
+}
+
void tst_QMediaContent::testResourceCtor()
{
QMediaContent media(QMediaResource(QUrl("http://example.com/movie.mov")));