From 6c1d99c2490e1af5c42d03cf10e8fe4d2e30c025 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 28 Apr 2015 16:03:07 +0200 Subject: Fix default value for XMLHttpRequest.response property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default value for responseType is the empty string, for which the expected data type for the response property is a string - same as when the response type is set to "text". In other words: By default the response property should contain the string representation of the data. Task-number: QTBUG-45862 Change-Id: I563160e5cdfbf93aca7e283e455d77a6b9deceb4 Reviewed-by: Pasi Keränen Reviewed-by: Valery Kotov Reviewed-by: Lars Knoll --- tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml b/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml index bf59a1e9f9..b47a0f1af0 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml @@ -48,7 +48,7 @@ QtObject { if (x.statusText == expectedStatus) done = true; - dataOK = (x.responseText == "QML Rocks!\n"); + dataOK = (x.responseText == "QML Rocks!\n") && (x.response == "QML Rocks!\n"); x.open("GET", url); x.setRequestHeader("Accept-Language", "en-US"); -- cgit v1.2.3