summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlxmlhttprequest/data/getAllResponseHeaders_args.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlxmlhttprequest/data/getAllResponseHeaders_args.qml')
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/getAllResponseHeaders_args.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/declarative/qmlxmlhttprequest/data/getAllResponseHeaders_args.qml
new file mode 100644
index 0000000..37124c7
--- /dev/null
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/getAllResponseHeaders_args.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+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;
+ }
+ }
+ }
+ }
+}