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