| 1 | .import QtQuick.LocalStorage 2.0 as Sql |
| 2 | |
| 3 | function test() { |
| 4 | var r="transaction_not_finished"; |
| 5 | |
| 6 | var db = Sql.LocalStorage.openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000, |
| 7 | function(db) { |
| 8 | db.transaction(function(tx){ |
| 9 | tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)'); |
| 10 | r = "passed"; |
| 11 | }) |
| 12 | }); |
| 13 | |
| 14 | var db = Sql.LocalStorage.openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000, |
| 15 | function(db) { |
| 16 | r = "FAILED: should have already been created"; |
| 17 | }); |
| 18 | |
| 19 | return r; |
| 20 | } |