8 if (window.openDatabase) {
9 db = openDatabase("StressTest2", "1.0", "Database stress test", 200000);
11 alert("Failed to open the database on disk. This is probably because the version was bad or there is not enough space left in this domain's quota");
13 alert("Couldn't open the database. Please try with a WebKit nightly with this feature enabled");
18 db.transaction(function(tx) {
19 tx.executeSql("SELECT COUNT(*) FROM WebkitStickyNotes", [], function(result) {
21 }, function(tx, error) {
22 tx.executeSql("CREATE TABLE WebKitStickyNotes (id REAL UNIQUE, note TEXT)", [], function(result) {
23 tx.executeSql("INSERT INTO WebKitStickyNotes (id, note) VALUES (?, ?)", [1, 'Text'], function(result) {
24 tx.executeSql("INSERT INTO WebKitStickyNotes (id, note) VALUES (?, ?)", [2, 'More Text'], function(result) {
35 db.transaction(function(tx) {
36 tx.executeSql("SELECT id, note FROM WebKitStickyNotes", [], function(tx, result) {
38 }, function(tx, error) {
39 alert('Failed to retrieve notes from database - ' + error.message);
45 addEventListener('load', loaded, false);
49 <p>This test needs to run without crashes and assertion failures for a while.<p>