diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml new file mode 100644 index 00000000..b87823d5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml @@ -0,0 +1,16 @@ +import QtQuick 1.0 + +QtObject { + property bool exceptionThrown: false + + Component.onCompleted: { + var x = new XMLHttpRequest; + + try { + x.open("BLAH", "http://www.nokia.com"); + } catch (e) { + if (e.code == DOMException.SYNTAX_ERR) + exceptionThrown = true; + } + } +} |