summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp')
-rw-r--r--tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp b/tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp
index 0af7b18..100a11b 100644
--- a/tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp
+++ b/tests/auto/declarative/xmlhttprequest/tst_xmlhttprequest.cpp
@@ -84,10 +84,14 @@ private slots:
void statusText();
void responseText();
void responseXML_invalid();
+ void invalidMethodUsage();
+ // Attributes
void document();
void element();
void attr();
+ void text();
+ void cdata();
// Crashes
// void outstanding_request_at_shutdown();
@@ -962,6 +966,10 @@ void tst_xmlhttprequest::responseText()
}
}
+void tst_xmlhttprequest::invalidMethodUsage()
+{
+}
+
void tst_xmlhttprequest::responseXML_invalid()
{
QmlComponent component(&engine, TEST_FILE("responseXML_invalid.qml"));
@@ -1017,6 +1025,34 @@ void tst_xmlhttprequest::attr()
delete object;
}
+// Test the Text DOM element
+void tst_xmlhttprequest::text()
+{
+ QmlComponent component(&engine, TEST_FILE("text.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
+// Test the CDataSection DOM element
+void tst_xmlhttprequest::cdata()
+{
+ QmlComponent component(&engine, TEST_FILE("cdata.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
QTEST_MAIN(tst_xmlhttprequest)
#include "tst_xmlhttprequest.moc"