diff options
Diffstat (limited to 'tests/auto/declarative/qmlxmlhttprequest/data/send_data.6.qml')
-rw-r--r-- | tests/auto/declarative/qmlxmlhttprequest/data/send_data.6.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/qmlxmlhttprequest/data/send_data.6.qml new file mode 100644 index 0000000..135f45c --- /dev/null +++ b/tests/auto/declarative/qmlxmlhttprequest/data/send_data.6.qml @@ -0,0 +1,21 @@ +import Qt 4.6 + +QtObject { + property string url + + property bool dataOK: false + + Component.onCompleted: { + var x = new XMLHttpRequest; + x.open("PUT", url); + + // Test to the end + x.onreadystatechange = function() { + if (x.readyState == XMLHttpRequest.DONE) { + dataOK = (x.responseText == "QML Rocks!\n"); + } + } + + x.send("My Sent Data"); + } +} |