diff options
author | Valery Kotov <kotov.valery@gmail.com> | 2015-04-22 18:18:16 +0300 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-05-05 09:24:23 +0000 |
commit | c331b6b90f14da9cbadb9309fe02baf32edd847a (patch) | |
tree | 76aa0c595bb5199bef0a4a61ee9c5363be2e8deb /tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp | |
parent | bc79a3e19598c4491f8cdc9ccd004dd26ffa1da5 (diff) |
QMLEngine: Update XHR tests with checking status code
Update QQmlXMLHttpRequest unit tests with checking status code in
resopnse message.
Task-number: QTBUG-45581
Change-Id: Ia9fdb4463582bdb098be5d0cab022993904a3d51
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp')
-rw-r--r-- | tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index ad78fafc67..56314a29f5 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -847,6 +847,7 @@ void tst_qqmlxmlhttprequest::getBinaryData() QFileInfo fileInfo("data/qml_logo.png"); QTRY_VERIFY(object->property("readSize").toInt() == fileInfo.size()); + QCOMPARE(object->property("status").toInt(), 200); } void tst_qqmlxmlhttprequest::getJsonData() @@ -1164,6 +1165,7 @@ void tst_qqmlxmlhttprequest::text() QTRY_VERIFY(object->property("dataOK").toBool() == true); QCOMPARE(object->property("xmlTest").toBool(), true); + QCOMPARE(object->property("status").toInt(), 200); } // Test the CDataSection DOM element @@ -1176,6 +1178,7 @@ void tst_qqmlxmlhttprequest::cdata() QTRY_VERIFY(object->property("dataOK").toBool() == true); QCOMPARE(object->property("xmlTest").toBool(), true); + QCOMPARE(object->property("status").toInt(), 200); } void tst_qqmlxmlhttprequest::stateChangeCallingContext() |