summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/declarative/sql/data/test1.js3
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/declarative/sql/data/test1.js b/tests/auto/declarative/sql/data/test1.js
index 2ae9988..ea3b7b0 100644
--- a/tests/auto/declarative/sql/data/test1.js
+++ b/tests/auto/declarative/sql/data/test1.js
@@ -1,5 +1,4 @@
-var db;
-db = openDatabase("QmlTestDB", "", "Test database from Qt autotests", 1000000);
+var db = openDatabase("QmlTestDB", "", "Test database from Qt autotests", 1000000);
var r="testerror";
// Asynchronous in WebKit, so must wait before calling test()
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index 3179c99..b0a6021 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -91,6 +91,8 @@ void tst_sql::verifyAgainstWebKit()
QWebPageWithJavaScriptConsoleMessages webpage;
QDir().mkpath(tmpdir);
webpage.settings()->setOfflineStoragePath(tmpdir);
+ webpage.settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
+
webpage.mainFrame()->evaluateJavaScript(js);
QTest::qWait(200); // WebKit db access is asynchronous
QTRY_COMPARE(webpage.mainFrame()->evaluateJavaScript("test()").toString(),result);