summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativexmlhttprequest/data
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-03-05 06:08:26 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-03-05 06:08:26 (GMT)
commit769a11719ca85e9cdac4c0f1d0fcffe6145d6972 (patch)
tree8cf89cdceff0e832ff2cdf9f7ee96ea230403125 /tests/auto/declarative/qdeclarativexmlhttprequest/data
parent48fd47f64f3f73e82016161d82cdf67908a9c653 (diff)
downloadQt-769a11719ca85e9cdac4c0f1d0fcffe6145d6972.zip
Qt-769a11719ca85e9cdac4c0f1d0fcffe6145d6972.tar.gz
Qt-769a11719ca85e9cdac4c0f1d0fcffe6145d6972.tar.bz2
Don't assume documents are in UTF-8.
Task-number: QTBUG-7719
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/data')
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml28
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xmlbin0 -> 154 bytes
2 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()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml
new file mode 100644
index 0000000..0fbb126
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml
Binary files differ