summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-10 02:10:57 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-10 02:10:57 (GMT)
commitcdabdb79808b3788519fa3bde0d240f2b11a4b34 (patch)
treee296059c6332d73ae2c55caf7dd2026316a6dc54 /tests/auto/declarative/xmlhttprequest/data/send_data.1.qml
parentfc5fd47fc7e7d87d17386e23690af4fec80dae05 (diff)
downloadQt-cdabdb79808b3788519fa3bde0d240f2b11a4b34.zip
Qt-cdabdb79808b3788519fa3bde0d240f2b11a4b34.tar.gz
Qt-cdabdb79808b3788519fa3bde0d240f2b11a4b34.tar.bz2
More XMLHttpRequest tests
Diffstat (limited to 'tests/auto/declarative/xmlhttprequest/data/send_data.1.qml')
-rw-r--r--tests/auto/declarative/xmlhttprequest/data/send_data.1.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml
new file mode 100644
index 0000000..c0b5bf8
--- /dev/null
+++ b/tests/auto/declarative/xmlhttprequest/data/send_data.1.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Object {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}