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