diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-01-14 06:27:36 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-01-14 06:27:36 (GMT) |
commit | 18e210a2778bf185a849fa088e1699797e102f78 (patch) | |
tree | 8c157988d5eed034732f85e79558cef1c261e40c | |
parent | 2867712a03610312aa997ce0abc2eefe71a975d3 (diff) | |
download | Qt-18e210a2778bf185a849fa088e1699797e102f78.zip Qt-18e210a2778bf185a849fa088e1699797e102f78.tar.gz Qt-18e210a2778bf185a849fa088e1699797e102f78.tar.bz2 |
missed file
(fix test)
-rw-r--r-- | tests/auto/declarative/xmlhttprequest/data/callbackException.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/declarative/xmlhttprequest/data/callbackException.qml b/tests/auto/declarative/xmlhttprequest/data/callbackException.qml new file mode 100644 index 0000000..9255922 --- /dev/null +++ b/tests/auto/declarative/xmlhttprequest/data/callbackException.qml @@ -0,0 +1,25 @@ +import Qt 4.6 + +QtObject { + id: obj + property string url + property string which + property bool threw: false + + onWhichChanged: { + var x = new XMLHttpRequest; + + x.onreadystatechange = function() { + if (x.readyState == which) { + obj.threw = true + throw(new Error("Exception from Callback")) + } + } + + x.open("GET", url); + x.setRequestHeader("Test-header", "TestValue"); + x.send(); + } +} + + |