6 document.getElementById("console").innerHTML += message + "<br>";
11 log("Test part 1 Complete");
12 if (window.layoutTestController)
13 layoutTestController.notifyDone();
16 function errorFunction(error)
18 log("Test failed - " + error.message);
24 db.transaction(function(tx) {
25 log("Inserting some data");
26 // Load a new page while the transaction is still in progress, interrupting the transaction.
27 // This should not leave the database locked and on the next page we should be able to insert
29 tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))", [],
30 function(tx, result) { location.href = "./resources/database-lock-after-reload-2.html"; },
31 function(tx, error) { errorFunction(error); });
32 tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))");
33 }, errorFunction, function() { finishTest(); });
38 if (window.layoutTestController) {
39 layoutTestController.clearAllDatabases();
40 layoutTestController.dumpAsText();
41 layoutTestController.waitUntilDone();
46 database = openDatabase("DatabaseLockTest", "1.0", "Test for database locking", 5242880);
48 log("Error - could not open database");
52 database.transaction(function(tx) {
53 log("Adding a table");
54 tx.executeSql("CREATE TABLE DataTest (testData)", [], function(tx, result) { },
55 function(tx, error) { errorFunction(error); });
56 }, errorFunction, function() { addData(database); });
62 <body onload="runTest()">