diff options
Diffstat (limited to 'tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_sent.qml')
-rw-r--r-- | tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_sent.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_sent.qml b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_sent.qml new file mode 100644 index 0000000..7538ffd --- /dev/null +++ b/tests/auto/declarative/qmlxmlhttprequest/data/getResponseHeader_sent.qml @@ -0,0 +1,20 @@ +import Qt 4.6 + +QtObject { + property bool test: false + + Component.onCompleted: { + var x = new XMLHttpRequest; + + x.open("GET", "testdocument.html"); + x.send(); + + try { + x.getResponseHeader("Test-header"); + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + test = true; + } + } +} + |