7 document
.getElementById("console").innerHTML
+= message
+ "<br>";
13 if (window
.testRunner
)
14 testRunner
.notifyDone();
17 function errorFunction(error
)
19 log("Test failed - " + error
.message
);
25 function successFunction(message
)
27 log("Transaction succeeded - " + message
);
28 if (++successCount
== 2)
34 if (window
.testRunner
) {
35 testRunner
.clearAllDatabases();
36 testRunner
.dumpAsText();
37 testRunner
.waitUntilDone();
40 var database
= openDatabase("SuccessCallbackDatabase", "1.0", "Test for success callback <rdar://5737692>", 1);
41 database
.transaction(function(tx
) { tx
.executeSql("CREATE TABLE IF NOT EXISTS SuccessCallbackTest (randomData)", []); }, errorFunction
, function() { successFunction("Transaction with one statement"); });
42 database
.transaction(function(tx
) { }, errorFunction
, function() { successFunction("Empty transaction"); });
48 <body onload=
"runTest()">
49 This test confirms that a successful transaction - both with and without a statement - receives its successCallback