From 18e210a2778bf185a849fa088e1699797e102f78 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 14 Jan 2010 16:27:36 +1000 Subject: missed file (fix test) --- .../xmlhttprequest/data/callbackException.qml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/auto/declarative/xmlhttprequest/data/callbackException.qml 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(); + } +} + + -- cgit v0.12