summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp43
1 files changed, 1 insertions, 42 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index b6bd3f8..72b6b28 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -53,19 +53,6 @@
#include "../../../shared/util.h"
-class SafeLocalhostDeclarativeEngine : public QDeclarativeEngine {
-public:
- SafeLocalhostDeclarativeEngine() : QDeclarativeEngine() {}
-
- virtual bool isSafeOrigin(const QUrl& to_url, const QUrl& from_url) const
- {
- if (to_url.host() == "127.0.0.1")
- return true;
- else
- return QDeclarativeEngine::isSafeOrigin(to_url,from_url);
- }
-};
-
/*
This test case covers QML language issues. This covers everything that does not
involve evaluating ECMAScript expressions and bindings.
@@ -134,7 +121,6 @@ private slots:
void importsLocal();
void importsRemote_data();
void importsRemote();
- void importsUnsafe();
void importsInstalled_data();
void importsInstalled();
void importsOrder_data();
@@ -149,7 +135,7 @@ private slots:
void crash2();
private:
- SafeLocalhostDeclarativeEngine engine;
+ QDeclarativeEngine engine;
void testType(const QString& qml, const QString& type);
};
@@ -1276,33 +1262,6 @@ void tst_qdeclarativelanguage::importsRemote()
testType(qml,type);
}
-void tst_qdeclarativelanguage::importsUnsafe()
-{
- TestHTTPServer server(14445);
- server.serveDirectory(SRCDIR);
-
- QString qml = "import \"http://127.0.0.1:14445/qtest/declarative/qmllanguage\"\n\nTest {}";
-
- {
- QDeclarativeEngine engine; // plain engine without special localhost handling
- QDeclarativeComponent component(&engine);
- component.setData(qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports
-
- QTRY_VERIFY(!component.isLoading());
-
- QVERIFY(component.isError());
- }
-
- {
- QDeclarativeComponent component(&engine); // engine special localhost handling
- component.setData(qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports
-
- QTRY_VERIFY(!component.isLoading());
-
- QVERIFY(!component.isError());
- }
-}
-
void tst_qdeclarativelanguage::importsInstalled_data()
{
// QT-610