diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-22 16:13:23 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-22 16:13:23 +1000 |
commit | 430ec8741e6c42a9f618b7d5246838bd50edd292 (patch) | |
tree | e2e16199bb116d936a86da40b3466b406f8027f0 /tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp | |
parent | f60a61157cb361e19c50eb53391f18b82990a026 (diff) | |
parent | 6938289ce3e1e29cc81f0e007390e0b5f6ef1a43 (diff) |
Merge branch 'qtquick2' of scm.dev.nokia.troll.no:qt/qtdeclarative-staging into v8
Conflicts:
src/declarative/items/qsgcontext2d.cpp
src/declarative/qml/qdeclarativexmlhttprequest.cpp
tests/auto/declarative/declarative.pro
tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp index e243f60872..d2b7d5b50e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp @@ -497,7 +497,7 @@ void tst_qdeclarativexmlhttprequest::send_alreadySent() delete object; } -// Test that send for a GET or HEAD ignores data +// Test that sends for GET, HEAD and DELETE ignore data void tst_qdeclarativexmlhttprequest::send_ignoreData() { { @@ -522,7 +522,7 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData() { TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); - QVERIFY(server.wait(TEST_FILE("send_ignoreData_PUT.expect"), + QVERIFY(server.wait(TEST_FILE("send_ignoreData_HEAD.expect"), TEST_FILE("send_ignoreData.reply"), QUrl())); @@ -537,6 +537,25 @@ void tst_qdeclarativexmlhttprequest::send_ignoreData() delete object; } + + { + TestHTTPServer server(SERVER_PORT); + QVERIFY(server.isValid()); + QVERIFY(server.wait(TEST_FILE("send_ignoreData_DELETE.expect"), + TEST_FILE("send_ignoreData.reply"), + QUrl())); + + QDeclarativeComponent component(&engine, TEST_FILE("send_ignoreData.qml")); + QObject *object = component.beginCreate(engine.rootContext()); + QVERIFY(object != 0); + object->setProperty("reqType", "DELETE"); + object->setProperty("url", "http://127.0.0.1:14445/testdocument.html"); + component.completeCreate(); + + QTRY_VERIFY(object->property("dataOK").toBool() == true); + + delete object; + } } // Test that send()'ing data works |