diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml new file mode 100644 index 00000000..f009ab78 --- /dev/null +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml @@ -0,0 +1,23 @@ +import QtQuick 1.0 + +QtObject { + property string url + + property bool dataOK: false + property bool done: false + + Component.onCompleted: { + var x = new XMLHttpRequest; + x.open("GET", url); + + x.onreadystatechange = function() { + if (x.readyState == XMLHttpRequest.DONE) { + done = true; + dataOK = x.status == 404; + } + } + + x.send(); + } +} + |