Home | History | Annotate | Download | only in storage

Lines Matching refs:db

27 function testTransaction(db, transactionCallback, expectedErrorCodeName)
29 db.transaction(transactionCallback,
35 function testTransactionThrowsException(db)
37 testTransaction(db, function(tx) { throw "Exception thrown in transaction callback."; }, "UNKNOWN_ERR");
40 function testTransactionFailureBecauseOfStatementFailure(db)
42 testTransaction(db,
48 function testInvalidStatement(db)
50 testTransaction(db, function(tx) { tx.executeSql("BAD STATEMENT"); }, "SYNTAX_ERR");
53 function testIncorrectNumberOfBindParameters(db)
55 testTransaction(db,
62 function testBindParameterOfWrongType(db)
67 testTransaction(db, function(tx) {
73 function testQuotaExceeded(db)
75 testTransaction(db,
82 function testVersionMismatch(db)
84 // Use another DB handle to change the version. However, in order to make sure that the DB version is not
85 // changed before the transactions in the other tests have run, we need to do it in a transaction on 'db'.
86 db.transaction(function(tx) {
90 log("FAIL: could not change the DB version.");
95 testTransaction(db,
106 var db = openDatabaseWithSuffix("SQLErrorCodesTest", "1.0", "Tests the error codes.", 1);
107 testTransactionThrowsException(db);
108 testTransactionFailureBecauseOfStatementFailure(db);
109 testInvalidStatement(db);
110 testIncorrectNumberOfBindParameters(db);
111 testBindParameterOfWrongType(db);
112 testQuotaExceeded(db);
113 testVersionMismatch(db);