diff options
Diffstat (limited to 'tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml')
-rw-r--r-- | tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml b/tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml new file mode 100644 index 0000000000..7c024bfda6 --- /dev/null +++ b/tests/auto/qml/qqmlxmlhttprequest/data/utf16.qml @@ -0,0 +1,29 @@ +import QtQuick 2.0 + +QtObject { + property bool dataOK: false + + property string fileName + property string responseText + property string responseXmlRootNodeValue + + function startRequest() { + var x = new XMLHttpRequest; + + x.open("GET", fileName); + + // 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() + } +} + |