--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml Tue Jul 06 15:10:48 2010 +0300
@@ -0,0 +1,28 @@
+import Qt 4.7
+
+QtObject {
+ property bool dataOK: false
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("GET", "testdocument.html");
+ x.setRequestHeader("Accept-Language","en-US");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send();
+
+ try {
+ x.send()
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}