aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml')
-rw-r--r--tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml
new file mode 100644
index 0000000000..84a0bf3015
--- /dev/null
+++ b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_args.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+ x.send();
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ try {
+ x.getAllResponseHeaders("Test-header");
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+ }
+ }
+}