diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-24 04:07:26 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-24 04:07:26 (GMT) |
commit | 562ff1d1fcb726932aa4483655aa0d4c6a9746f2 (patch) | |
tree | 458e725c4431493bf8433df435b483f97a115bec /tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | |
parent | d33d30719d3c17fc1505e1b508999c76c6abc6b4 (diff) | |
download | Qt-562ff1d1fcb726932aa4483655aa0d4c6a9746f2.zip Qt-562ff1d1fcb726932aa4483655aa0d4c6a9746f2.tar.gz Qt-562ff1d1fcb726932aa4483655aa0d4c6a9746f2.tar.bz2 |
Revert 95aa8c8fc76e2309a629b05994a2677b0887140b.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp index 506e1ee..c3be943 100644 --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp @@ -86,8 +86,6 @@ private slots: void noResizeGraphicsWidget(); void networkRequestUrl(); void failNetworkRequest(); - void networkSafety(); - void networkSafety_data(); // void networkComponent(); void deleteComponentCrash(); @@ -508,41 +506,6 @@ void tst_QDeclarativeLoader::vmeErrors() delete loader; } -void tst_QDeclarativeLoader::networkSafety_data() -{ - QTest::addColumn<QUrl>("url"); - QTest::addColumn<QString>("message"); - - QTest::newRow("same origin") << QUrl("http://127.0.0.1:14445/sameorigin.qml") << QString(); - QTest::newRow("different origin") << QUrl("http://127.0.0.1:14445/differentorigin.qml") << QString("QML Loader (http://127.0.0.1:14445/differentorigin.qml:3:1) \"http://evil.place/evil.qml\" is not a safe origin from \"http://127.0.0.1:14445/differentorigin.qml\""); -} - -void tst_QDeclarativeLoader::networkSafety() -{ - TestHTTPServer server(SERVER_PORT); - QVERIFY(server.isValid()); - server.serveDirectory(SRCDIR "/data"); - - QFETCH(QUrl, url); - QFETCH(QString, message); - - if (!message.isEmpty()) - QTest::ignoreMessage(QtWarningMsg, message.toLatin1()); - - QDeclarativeComponent component(&engine, url); - TRY_WAIT(component.status() == QDeclarativeComponent::Ready); - QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create()); - QVERIFY(loader != 0); - - if (message.isEmpty()) { - TRY_WAIT(loader->status() == QDeclarativeLoader::Ready); - } else { - TRY_WAIT(loader->status() == QDeclarativeLoader::Null); - } - - delete loader; -} - QTEST_MAIN(tst_QDeclarativeLoader) #include "tst_qdeclarativeloader.moc" |