diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-25 01:17:49 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-25 01:17:49 (GMT) |
commit | d9e0fad176e277d84af4d80c916becabdf01d969 (patch) | |
tree | cfd1fb57e7b50b629308c7cbdaf4ad4c46f0c836 /tests/auto | |
parent | 091467faaed8728e3f49dbb402f71372f088f808 (diff) | |
parent | b888a694c35fb0c291942a2aa4a056d7deec3245 (diff) | |
download | Qt-d9e0fad176e277d84af4d80c916becabdf01d969.zip Qt-d9e0fad176e277d84af4d80c916becabdf01d969.tar.gz Qt-d9e0fad176e277d84af4d80c916becabdf01d969.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qmediacontent/qmediacontent.pro | 2 | ||||
-rw-r--r-- | tests/auto/qmediacontent/tst_qmediacontent.cpp | 13 |
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"))); |