summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativexmlhttprequest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest')
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp6
33 files changed, 37 insertions, 16 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
index f43e043..4d21122 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
@@ -1,9 +1,9 @@
PUT /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: text/plain;charset=UTF-8
Content-Length: 9
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
index d7b9266..729793e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
@@ -13,6 +13,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("GET", urlDummy);
x.setRequestHeader("Test-header", "TestValue");
+ x.setRequestHeader("Accept-Language", "en-US");
x.send();
x.onreadystatechange = function() {
@@ -35,6 +36,7 @@ QtObject {
}
}
x.open("PUT", url);
+ x.setRequestHeader("Accept-Language", "en-US");
x.send("Test Data");
}
}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
index 72a45e7..33ca020 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
@@ -21,10 +21,12 @@ QtObject {
readyState = true;
x.open("PUT", url);
+ x.setRequestHeader("Accept-Language", "en-US");
x.abort();
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
index aa78cde..c0957ed 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
@@ -21,6 +21,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
index 8d67fad..9096999 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
@@ -31,6 +31,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
index 2f949e1..7a65e25 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
@@ -37,6 +37,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
index c06bae3..72fb9d7 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
@@ -20,6 +20,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
index 19e37fa..b07f8e7 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
@@ -20,6 +20,7 @@ QtObject {
readyState = true;
x.open("GET", url, true, "username", "password");
+ x.setRequestHeader("Accept-Language","en-US");
if (x.readyState == XMLHttpRequest.OPENED)
openedState = true;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
index 4bb3a7a..9fa4847 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
@@ -22,6 +22,7 @@ QtObject {
unsent = (x.responseText == "");
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
opened = (x.responseText == "");
@@ -39,6 +40,7 @@ QtObject {
dataOK = (x.responseText == expectedText);
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
reset = (x.responseText == "");
}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
index 0bad7df..a9ef3e8 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
@@ -7,6 +7,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("GET", "testdocument.html");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
index 81dd4a0..2effbdc 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
@@ -1,9 +1,9 @@
POST /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: text/plain;charset=UTF-8
Content-Length: 12
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
index 03543a9..171e0b1 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
@@ -8,6 +8,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("POST", url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
index 79a27b6..09b742b 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
index e048769..8786917 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "text/plain;charset=latin1");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
index 8fcf3ac..8336860 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
@@ -1,9 +1,9 @@
POST /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: charset=UTF-8;text/plain
Content-Length: 12
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
index 7ab0b27..6789480 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "charset=UTF-8;text/plain");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
index 29bf2c2..08d999d 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "charset=latin1;text/plain");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
index 97e6fac..4f10bbc 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
@@ -1,9 +1,9 @@
PUT /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Content-Type: text/plain;charset=UTF-8
Content-Length: 12
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
index 135f45c..e047fc8 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
@@ -8,6 +8,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("PUT", url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
index 4a09527..ba0db25 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("POST", url);
x.setRequestHeader("Content-Type", "text/plain");
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
index dd5fa46..ddf520e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
@@ -9,6 +9,7 @@ QtObject {
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open(reqType, url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
index 991bd59..74a9798 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
@@ -1,7 +1,7 @@
HEAD /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
index 4600f2a..7b8e260 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
@@ -1,9 +1,9 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
TEST-HEADER: value
TEST-HEADER2: value,value2
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
index b0723aa..61eea33 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
@@ -9,6 +9,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
x.setRequestHeader("Test-header", "value");
x.setRequestHeader("Test-header2", "value");
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
index bf31eca..b22b239 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
@@ -21,6 +21,7 @@ QtObject {
readyState = true;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
x.setRequestHeader(header, "Value");
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
index c2bbc6e..666c791 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
@@ -10,6 +10,7 @@ QtObject {
var x = new XMLHttpRequest;
x.open("GET", url);
+ x.setRequestHeader("Accept-Language","en-US");
// Test to the end
x.onreadystatechange = function() {
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
index a740c79..c6cad70 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
@@ -1,7 +1,7 @@
GET /testdocument.html HTTP/1.1
+ACCEPT-LANGUAGE: en-US
Connection: Keep-Alive
Accept-Encoding: gzip
-Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 127.0.0.1:14445
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
index 04202c4..c903e12 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
@@ -27,6 +27,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.status;
@@ -54,6 +55,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.status;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
index 8becc3b..a3b98be 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
@@ -27,6 +27,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.statusText;
@@ -54,6 +55,7 @@ QtObject {
}
x.open("GET", url);
+ x.setRequestHeader("Accept-Language", "en-US");
try {
var a = x.statusText;
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
index 13ed959..1d26f2c 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
@@ -55,12 +55,6 @@ public:
tst_qdeclarativexmlhttprequest() {}
private slots:
- void initTestCase() {
- if (QLocale::system().name().replace(QChar::fromAscii('_'),QChar::fromAscii('-')) != QLatin1String("en-US")) {
- qWarning() << "Test will fail unless LANG is en_US";
- }
- }
-
void domExceptionCodes();
void callbackException();
void callbackException_data();