diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-11-20 02:23:22 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-11-20 02:23:22 (GMT) |
commit | d060809fce06078964740d866e6182256fc327db (patch) | |
tree | 4c26eaef847add9cc698cf2dfb00fe3f211ef14c | |
parent | 9b4b6301803cacd288547f8de1fd0370afd83ee3 (diff) | |
parent | 606da4a8af96167e98de53f82d88708b8225e9ee (diff) | |
download | Qt-d060809fce06078964740d866e6182256fc327db.zip Qt-d060809fce06078964740d866e6182256fc327db.tar.gz Qt-d060809fce06078964740d866e6182256fc327db.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
23 files changed, 157 insertions, 114 deletions
diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp index 9e4c198..dfe3982 100644 --- a/src/declarative/qml/qmlsqldatabase.cpp +++ b/src/declarative/qml/qmlsqldatabase.cpp @@ -107,8 +107,11 @@ public: int s = query.size(); if (s<0) { // Inefficient. - query.last(); - return query.at()+1; + if (query.last()) { + return query.at()+1; + } else { + return 0; + } } else { return s; } @@ -145,13 +148,14 @@ public: return QScriptValue::Undeletable; } - QScriptClassPropertyIterator *newIterator(const QScriptValue &object); + //QScriptClassPropertyIterator *newIterator(const QScriptValue &object); private: QScriptString str_length; QScriptString str_forwardOnly; }; +/* class QmlSqlQueryScriptClassPropertyIterator : public QScriptClassPropertyIterator { public: @@ -220,6 +224,7 @@ QScriptClassPropertyIterator *QmlSqlQueryScriptClass::newIterator(const QScriptV { return new QmlSqlQueryScriptClassPropertyIterator(object); } +*/ enum SqlException { UNKNOWN_ERR, @@ -349,7 +354,9 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri return engine->undefinedValue(); } + bool ok = true; if (callback.isFunction()) { + ok = false; db.transaction(); callback.call(QScriptValue(), QScriptValueList() << tx); if (engine->hasUncaughtException()) { @@ -359,13 +366,17 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri db.rollback(); THROW_SQL(0,QmlEngine::tr("SQL transaction failed")); } else { - context->thisObject().setProperty(QLatin1String("version"), to_version, QScriptValue::ReadOnly); - QSettings ini(databaseFile(db.connectionName(),engine)+QLatin1String(".ini"),QSettings::IniFormat); - ini.setValue(QLatin1String("Version"), to_version); + ok = true; } } } + if (ok) { + context->thisObject().setProperty(QLatin1String("version"), to_version, QScriptValue::ReadOnly); + QSettings ini(databaseFile(db.connectionName(),engine)+QLatin1String(".ini"),QSettings::IniFormat); + ini.setValue(QLatin1String("Version"), to_version); + } + return engine->undefinedValue(); } @@ -439,6 +450,7 @@ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEng if (QSqlDatabase::connectionNames().contains(dbid)) { database = QSqlDatabase::database(dbid); + version = ini.value(QLatin1String("Version")).toString(); } else { created = !QFile::exists(basename+QLatin1String(".sqlite")); database = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"), dbid); @@ -456,6 +468,7 @@ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEng // Incompatible THROW_SQL(VERSION_ERR,QmlEngine::tr("SQL: database version mismatch")); } + version = ini.value("Version").toString(); } database.setDatabaseName(basename+QLatin1String(".sqlite")); } diff --git a/tests/auto/declarative/sql/data/2-selection-bindnames.js b/tests/auto/declarative/sql/data/2-selection-bindnames.js deleted file mode 100644 index 21f34db..0000000 --- a/tests/auto/declarative/sql/data/2-selection-bindnames.js +++ /dev/null @@ -1,16 +0,0 @@ -function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); - var r="transaction_not_finished"; - - db.transaction( - function(tx) { - var rs = tx.executeSql('SELECT * FROM Greeting WHERE salutation=:p2 AND salutee=:p1', {':p1':'world', ':p2':'hello'}); - if ( rs.rows.length != 4 ) - r = "SELECT RETURNED WRONG VALUE "+rs.rows.length+rs.rows.item(0)+rs.rows.item(1) - else - r = "passed"; - } - ); - - return r; -} diff --git a/tests/auto/declarative/sql/data/4-iteration-index.js b/tests/auto/declarative/sql/data/4-iteration-index.js deleted file mode 100644 index 512cf8d..0000000 --- a/tests/auto/declarative/sql/data/4-iteration-index.js +++ /dev/null @@ -1,19 +0,0 @@ -function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); - var r="transaction_not_finished"; - - db.transaction( - function(tx) { - var rs = tx.executeSql('SELECT * FROM Greeting'); - var r1="" - for(var i = 0; i < rs.rows.length; i++) - r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";" - if (r1 != "hello, world;hello, world;hello, world;hello, world;") - r = "SELECTED DATA WRONG: "+r1; - else - r = "passed"; - } - ); - - return r; -} diff --git a/tests/auto/declarative/sql/data/5-iteration-iterator.js b/tests/auto/declarative/sql/data/5-iteration-iterator.js deleted file mode 100644 index ae4fd34..0000000 --- a/tests/auto/declarative/sql/data/5-iteration-iterator.js +++ /dev/null @@ -1,19 +0,0 @@ -function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); - var r="transaction_not_finished"; - - db.transaction( - function(tx) { - var rs = tx.executeSql('SELECT * FROM Greeting') - var r1="" - for(var i in rs.rows) - r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";" - if (r1 != "hello, world;hello, world;hello, world;hello, world;") - r = "SELECTED DATA WRONG: "+r1; - else - r = "passed"; - } - ); - - return r; -} diff --git a/tests/auto/declarative/sql/data/6-iteration-efficient.js b/tests/auto/declarative/sql/data/6-iteration-efficient.js deleted file mode 100644 index fe0acfc..0000000 --- a/tests/auto/declarative/sql/data/6-iteration-efficient.js +++ /dev/null @@ -1,29 +0,0 @@ -function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); - var r="transaction_not_finished"; - - db.transaction( - function(tx) { - var rs = tx.executeSql('SELECT * FROM Greeting'); - var r1="" - var fbefiore = rs.rows.forwardOnly; - rs.rows.forwardOnly = true; - var fafter = rs.rows.forwardOnly; - if (fbefore) - r = "forward wrong before"; - else if (!fafter) - r = "forward wrong after"; - else { - for(var i=0; rs.rows[i]; ++i) { - r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";" - } - if (r1 != "hello, world;hello, world;hello, world;hello, world;") - r = "SELECTED DATA WRONG: "+r1; - else - r = "passed"; - } - } - ); - - return r; -} diff --git a/tests/auto/declarative/sql/data/changeversion.js b/tests/auto/declarative/sql/data/changeversion.js new file mode 100644 index 0000000..680d7a6 --- /dev/null +++ b/tests/auto/declarative/sql/data/changeversion.js @@ -0,0 +1,53 @@ +function test() { + var r="transaction_not_finished"; + + var db = openDatabaseSync("QmlTestDB-changeversion", "", "Test database from Qt autotests", 1000000, + function(db) { + db.changeVersion("","1.0") + db.transaction(function(tx){ + tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)'); + }) + }); + + db.transaction(function(tx){ + tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")'); + tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")'); + }); + + + db = openDatabaseSync("QmlTestDB-changeversion", "", "Test database from Qt autotests", 1000000); + + if (db.version == "1.0") + db.changeVersion("1.0","2.0",function(tx) + { + tx.executeSql('CREATE TABLE Utterance(type TEXT, phrase TEXT)') + var rs = tx.executeSql('SELECT * FROM Greeting'); + for (var i=0; i<rs.rows.length; ++i) { + var type = "Greeting"; + var phrase = rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee; + if (rs.rows.item(i).salutation == "Goodbye" + || rs.rows.item(i).salutation == "Farewell" + || rs.rows.item(i).salutation == "Good-bye") type = "Valediction"; + var ins = tx.executeSql('INSERT INTO Utterance VALUES(?,?)',[type,phrase]); + } + tx.executeSql('DROP TABLE Greeting'); + }); + else + return "db.version should be 1.0, but is " + db.version; + + var db = openDatabaseSync("QmlTestDB-changeversion", "2.0", "Test database from Qt autotests", 1000000); + + db.transaction(function(tx){ + var rs = tx.executeSql('SELECT * FROM Utterance'); + r = "" + for (var i=0; i<rs.rows.length; ++i) { + r += "(" + rs.rows.item(i).type + ": " + rs.rows.item(i).phrase + ")"; + } + if (r == "(Greeting: Hello, world)(Valediction: Goodbye, cruel world)") + r = "passed" + else + r = "WRONG DATA: " + r; + }) + + return r; +} diff --git a/tests/auto/declarative/sql/data/creation-a.js b/tests/auto/declarative/sql/data/creation-a.js new file mode 100644 index 0000000..bd7d5c5 --- /dev/null +++ b/tests/auto/declarative/sql/data/creation-a.js @@ -0,0 +1,18 @@ +function test() { + var r="transaction_not_finished"; + + var db = openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000, + function(db) { + db.transaction(function(tx){ + tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)'); + r = "passed"; + }) + }); + + var db = openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000, + function(db) { + r = "FAILED: should have already been created"; + }); + + return r; +} diff --git a/tests/auto/declarative/sql/data/1-creation.js b/tests/auto/declarative/sql/data/creation.js index aab9b5d..317b4c1 100644 --- a/tests/auto/declarative/sql/data/1-creation.js +++ b/tests/auto/declarative/sql/data/creation.js @@ -1,8 +1,7 @@ function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); var r="transaction_not_finished"; + var db = openDatabaseSync("QmlTestDB-creation", "1.0", "Test database from Qt autotests", 1000000); - // Asynchronous in WebKit, so must wait before calling test() db.transaction( function(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); diff --git a/tests/auto/declarative/sql/data/7a-error.js b/tests/auto/declarative/sql/data/error-a.js index 65d0c03..10a23f6 100644 --- a/tests/auto/declarative/sql/data/7a-error.js +++ b/tests/auto/declarative/sql/data/error-a.js @@ -1,5 +1,5 @@ function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); + var db = openDatabaseSync("QmlTestDB-error-a", "1.0", "Test database from Qt autotests", 1000000); var r="transaction_not_finished"; try { diff --git a/tests/auto/declarative/sql/data/3-iteration-item-function.js b/tests/auto/declarative/sql/data/iteration.js index 57c8a17..c34cbbb 100644 --- a/tests/auto/declarative/sql/data/3-iteration-item-function.js +++ b/tests/auto/declarative/sql/data/iteration.js @@ -1,14 +1,23 @@ function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); + var db = openDatabaseSync("QmlTestDB-iteration", "", "Test database from Qt autotests", 1000000); var r="transaction_not_finished"; db.transaction( function(tx) { + tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")'); + tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")'); + } + ) + + db.transaction( + function(tx) { var rs = tx.executeSql('SELECT * FROM Greeting'); var r1="" for(var i = 0; i < rs.rows.length; i++) r1 += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + ";" if (r1 != "hello, world;hello, world;hello, world;hello, world;") + if (r1 != "Hello, world;Goodbye, cruel world;") r = "SELECTED DATA WRONG: "+r1; else r = "passed"; diff --git a/tests/auto/declarative/sql/data/selection-bindnames.js b/tests/auto/declarative/sql/data/selection-bindnames.js new file mode 100644 index 0000000..9786821 --- /dev/null +++ b/tests/auto/declarative/sql/data/selection-bindnames.js @@ -0,0 +1,26 @@ +function test() { + var db = openDatabaseSync("QmlTestDB-bindnames", "", "Test database from Qt autotests", 1000000); + var r="transaction_not_finished"; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'goodbye', 'world' ]); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'there' ]); + } + ); + + db.transaction( + function(tx) { + var rs = tx.executeSql('SELECT * FROM Greeting WHERE salutation=:p2 AND salutee=:p1', {':p1':'world', ':p2':'hello'}); + if ( rs.rows.length != 2 ) + r = "SELECT RETURNED WRONG VALUE "+rs.rows.length+rs.rows.item(0)+rs.rows.item(1) + else + r = "passed"; + } + ); + + return r; +} diff --git a/tests/auto/declarative/sql/data/2-selection.js b/tests/auto/declarative/sql/data/selection.js index f141d2c..f116eff 100644 --- a/tests/auto/declarative/sql/data/2-selection.js +++ b/tests/auto/declarative/sql/data/selection.js @@ -1,14 +1,21 @@ function test() { - var db = openDatabaseSync("QmlTestDB", "", "Test database from Qt autotests", 1000000); + var db = openDatabaseSync("QmlTestDB-selection", "", "Test database from Qt autotests", 1000000); var r="transaction_not_finished"; db.transaction( function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + } + ); + + db.transaction( + function(tx) { + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); var rs = tx.executeSql('SELECT * FROM Greeting'); - if ( rs.rows.length != 4 ) // 1 from test1, 3 from this test. + if ( rs.rows.length != 4 ) r = "SELECT RETURNED WRONG VALUE "+rs.rows.length+rs.rows[0]+rs.rows[1] else r = "passed"; diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp index cbd14ab..b5f98e3 100644 --- a/tests/auto/declarative/sql/tst_sql.cpp +++ b/tests/auto/declarative/sql/tst_sql.cpp @@ -109,6 +109,7 @@ void tst_sql::initTestCase() { removeRecursive(dbDir()); QDir().mkpath(dbDir()); + } void tst_sql::cleanupTestCase() @@ -137,14 +138,14 @@ void tst_sql::testQml_data() QTest::addColumn<int>("databases"); // The number of databases that should have been created QTest::addColumn<bool>("qmlextension"); // Things WebKit can't do - QTest::newRow("creation") << "data/1-creation.js" << "passed" << 1 << false; - QTest::newRow("selection") << "data/2-selection.js" << "passed" << 1 << false; - QTest::newRow("selection-bindnames") << "data/2-selection-bindnames.js" << "passed" << 1 << true; // WebKit somehow breaks named parameters - QTest::newRow("iteration-item-function") << "data/3-iteration-item-function.js" << "passed" << 1 << false; - QTest::newRow("iteration-index") << "data/4-iteration-index.js" << "passed" << 1 << true; // Some HTML5 documents say to use rows by index, others by item() function - QTest::newRow("iteration-iterator") << "data/5-iteration-iterator.js" << "passed" << 1 << true; // As with previous, WebKit doesn't give an array - QTest::newRow("iteration-efficient") << "data/6-iteration-efficient.js" << "passed" << 1 << true; // It's very inefficient to find the total number of results, here is a solution - QTest::newRow("error-a") << "data/7a-error.js" << "passed" << 1 << false; + // Each test should use a newly named DB to avoid inter-test dependencies + QTest::newRow("creation") << "data/creation.js" << "passed" << 1 << false; + QTest::newRow("creation-a") << "data/creation-a.js" << "passed" << 2 << false; + QTest::newRow("changeversion") << "data/changeversion.js" << "passed" << 3 << false; + QTest::newRow("selection") << "data/selection.js" << "passed" << 4 << false; + QTest::newRow("selection-bindnames") << "data/selection-bindnames.js" << "passed" << 5 << true; + QTest::newRow("iteration") << "data/iteration.js" << "passed" << 6 << false; + QTest::newRow("error-a") << "data/error-a.js" << "passed" << 7 << false; } void tst_sql::validateAgainstWebkit_data() @@ -153,7 +154,7 @@ void tst_sql::validateAgainstWebkit_data() QTest::addColumn<QString>("result"); // The required output from the js test() function QTest::addColumn<int>("databases"); // The number of databases that should have been created QTest::addColumn<bool>("qmlextension"); // Things WebKit can't do - QTest::newRow("creation") << "data/1-creation.js" << "passed" << 1 << false; + QTest::newRow("creation") << "data/creation.js" << "passed" << 1 << false; } void tst_sql::validateAgainstWebkit() diff --git a/tests/auto/declarative/xmlhttprequest/data/abort.expect b/tests/auto/declarative/xmlhttprequest/data/abort.expect index 21b803a..f43e043 100644 --- a/tests/auto/declarative/xmlhttprequest/data/abort.expect +++ b/tests/auto/declarative/xmlhttprequest/data/abort.expect @@ -3,7 +3,7 @@ Content-Type: text/plain;charset=UTF-8 Content-Length: 9 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.expect b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.expect index 8d7b95d..a740c79 100644 --- a/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.expect +++ b/tests/auto/declarative/xmlhttprequest/data/getResponseHeader.expect @@ -1,7 +1,7 @@ GET /testdocument.html HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/open_network.expect b/tests/auto/declarative/xmlhttprequest/data/open_network.expect index 8d7b95d..a740c79 100644 --- a/tests/auto/declarative/xmlhttprequest/data/open_network.expect +++ b/tests/auto/declarative/xmlhttprequest/data/open_network.expect @@ -1,7 +1,7 @@ GET /testdocument.html HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.1.expect b/tests/auto/declarative/xmlhttprequest/data/send_data.1.expect index 104f485..81dd4a0 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.1.expect +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.1.expect @@ -3,7 +3,7 @@ Content-Type: text/plain;charset=UTF-8 Content-Length: 12 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.4.expect b/tests/auto/declarative/xmlhttprequest/data/send_data.4.expect index 933628f..8fcf3ac 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.4.expect +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.4.expect @@ -3,7 +3,7 @@ Content-Type: charset=UTF-8;text/plain Content-Length: 12 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/send_data.6.expect b/tests/auto/declarative/xmlhttprequest/data/send_data.6.expect index b466a18..97e6fac 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_data.6.expect +++ b/tests/auto/declarative/xmlhttprequest/data/send_data.6.expect @@ -3,7 +3,7 @@ Content-Type: text/plain;charset=UTF-8 Content-Length: 12 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_GET.expect b/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_GET.expect index 8d7b95d..a740c79 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_GET.expect +++ b/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_GET.expect @@ -1,7 +1,7 @@ GET /testdocument.html HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_PUT.expect b/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_PUT.expect index 4556e8d..991bd59 100644 --- a/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_PUT.expect +++ b/tests/auto/declarative/xmlhttprequest/data/send_ignoreData_PUT.expect @@ -1,7 +1,7 @@ HEAD /testdocument.html HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.expect b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.expect index da040e7..4600f2a 100644 --- a/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.expect +++ b/tests/auto/declarative/xmlhttprequest/data/setRequestHeader.expect @@ -3,7 +3,7 @@ TEST-HEADER: value TEST-HEADER2: value,value2 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 diff --git a/tests/auto/declarative/xmlhttprequest/data/status.expect b/tests/auto/declarative/xmlhttprequest/data/status.expect index 8d7b95d..a740c79 100644 --- a/tests/auto/declarative/xmlhttprequest/data/status.expect +++ b/tests/auto/declarative/xmlhttprequest/data/status.expect @@ -1,7 +1,7 @@ GET /testdocument.html HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip -accept-language: en,* +Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: 127.0.0.1:14445 |