aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml')
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml54
1 files changed, 0 insertions, 54 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
deleted file mode 100644
index 4b216d9c85..0000000000
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-import QtQuick 2.0
-
-QtObject {
- property string url
- property string expectedText
-
- property bool unsent: false
- property bool opened: false
- property bool sent: false
- property bool headersReceived: false
-
- property bool loading: false
- property bool done: false
-
- property bool reset: false
-
- property bool dataOK: false
-
- Component.onCompleted: {
- var x = new XMLHttpRequest;
-
- unsent = (x.responseText == "");
-
- x.open("GET", url);
- x.setRequestHeader("Accept-Language", "en-US");
-
- opened = (x.responseText == "");
-
- // Test to the end
- x.onreadystatechange = function() {
- if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
- headersReceived = (x.responseText == "");
- } else if (x.readyState == XMLHttpRequest.LOADING) {
- if (x.responseText == expectedText)
- loading = true;
- } else if (x.readyState == XMLHttpRequest.DONE) {
- if (x.responseText == expectedText)
- done = true;
-
- dataOK = (x.responseText == expectedText);
-
- x.open("GET", url);
- x.setRequestHeader("Accept-Language", "en-US");
-
- reset = (x.responseText == "");
- }
- }
-
- x.send()
-
- sent = (x.responseText == "");
- }
-}
-