summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-02-24 16:40:49 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-02-24 16:40:49 (GMT)
commitd380019ec6b434d6d393ab50d8c63f07c3f2533e (patch)
tree088c3ad572c6ee0220fe05411743fa1b5d28cd0c /tests
parent77670c3c0fdc3021356e212e94042a0b5a4f4f8c (diff)
parentef30a6f336d55c813423bf139d8363f50181179f (diff)
downloadQt-d380019ec6b434d6d393ab50d8c63f07c3f2533e.zip
Qt-d380019ec6b434d6d393ab50d8c63f07c3f2533e.tar.gz
Qt-d380019ec6b434d6d393ab50d8c63f07c3f2533e.tar.bz2
Merge remote branch 'origin/master'
Conflicts: configure src/plugins/mediaservices/mediaservices.pro
Diffstat (limited to 'tests')
-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")));