| if (window.openDatabase) { |
| db = openDatabase("StressTest2", "1.0", "Database stress test", 200000); |
| 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"); |
| alert("Couldn't open the database. Please try with a WebKit nightly with this feature enabled"); |
| db.transaction(function(tx) { |
| tx.executeSql("SELECT COUNT(*) FROM WebkitStickyNotes", [], function(result) { |
| tx.executeSql("CREATE TABLE WebKitStickyNotes (id REAL UNIQUE, note TEXT)", [], function(result) { |
| tx.executeSql("INSERT INTO WebKitStickyNotes (id, note) VALUES (?, ?)", [1, 'Text'], function(result) { |
| tx.executeSql("INSERT INTO WebKitStickyNotes (id, note) VALUES (?, ?)", [2, 'More Text'], function(result) { |
| db.transaction(function(tx) { |
| tx.executeSql("SELECT id, note FROM WebKitStickyNotes", [], function(tx, result) { |
| alert('Failed to retrieve notes from database - ' + error.message); |
| addEventListener('load', loaded, false); |
| <p>This test needs to run without crashes and assertion failures for a while.<p> |