blob: 729676ac4d8f2acb117fbe830df3e2e01dddb67d [file] [log] [blame]
<html>
<head>
<script>
function finishTest()
{
if (window.testRunner)
testRunner.notifyDone();
}
function runTest()
{
if (window.testRunner) {
testRunner.clearAllDatabases();
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
try {
var db = openDatabase("NullCallbacks", "1.0", "Test for null callbacks.", 1);
db.transaction(function(tx) {
tx.executeSql("CREATE TABLE IF NOT EXISTS Test (Foo INT)", null);
tx.executeSql("INSERT INTO Test VALUES (?)", [1], null, null);
tx.executeSql("INSERT INTO Test VALUES (?)", [2], null);
tx.executeSql("INSERT INTO Test VALUES (3)", null, null, null);
tx.executeSql("INSERT INTO Test VALUES (?)", [4], null,
function(tx, error) {});
}, null, null);
db.transaction(function(tx) {
tx.executeSql("INSERT INTO Test VALUES (?)", [5]);
}, null, function() { finishTest(); });
} catch(err) {
document.getElementById("console").innerHTML = "FAIL";
finishTest();
}
}
</script>
</head>
<body onload="runTest()">
This test checks that 'null' can be used wherever we expect an optional callback.
<pre id="console">PASS</pre>
</body>
</html>