diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-05 06:08:26 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-05 06:08:26 (GMT) |
commit | 769a11719ca85e9cdac4c0f1d0fcffe6145d6972 (patch) | |
tree | 8cf89cdceff0e832ff2cdf9f7ee96ea230403125 /tests/auto/declarative/qdeclarativexmlhttprequest/data | |
parent | 48fd47f64f3f73e82016161d82cdf67908a9c653 (diff) | |
download | Qt-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.qml | 28 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml | bin | 0 -> 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 Binary files differnew file mode 100644 index 0000000..0fbb126 --- /dev/null +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml |