summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_args.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_args.qml')
-rw-r--r--tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_args.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_args.qml b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_args.qml
new file mode 100644
index 0000000..d5aa4b1
--- /dev/null
+++ b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_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.getResponseHeader();
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+ }
+ }
+}