summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml')
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
new file mode 100644
index 0000000..63165ab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+
+QtObject {
+ property bool dataOK: false
+
+ property string responseText
+ property string responseXmlRootNodeValue
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "utf16.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ responseText = x.responseText
+ if (x.responseXML)
+ responseXmlRootNodeValue = x.responseXML.documentElement.childNodes[0].nodeValue
+
+ dataOK = true;
+ }
+ }
+ x.send()
+ }
+}
+