diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js')
-rw-r--r-- | tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js b/tests/auto/declarative/qdeclarativesqldatabase/data/creation-a.js new file mode 100644 index 0000000..bd7d5c5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativesqldatabase/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; +} |