Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativexmlhttprequest / data / redirectError.qml
1 import QtQuick 1.0
2
3 QtObject {
4     property string url
5
6     property bool dataOK: false
7     property bool done: false
8         
9     Component.onCompleted: {
10         var x = new XMLHttpRequest;
11         x.open("GET", url);
12
13         x.onreadystatechange = function() {
14             if (x.readyState == XMLHttpRequest.DONE) {
15                 done = true;
16                 dataOK = x.status == 404;
17             }
18         }
19
20         x.send();
21     }
22 }
23