1 chrome.test.runTests([function tab() {
2 // Check that the localstorage stuff we stored is still there.
3 chrome.test.assertTrue(localStorage.foo == "bar");
5 // Check that the database stuff we stored is still there.
7 console.log("Opening database...");
8 var db = window.openDatabase("mydb2", "1.0", "database test", 2048);
9 console.log("DONE opening database");
11 console.log("Exception");
12 console.log(err.message);
15 chrome.test.fail("failed to open database");
17 console.log("Performing transaction...");
18 db.transaction(function(tx) {
19 tx.executeSql("select body from note", [], function(tx, results) {
20 chrome.test.assertTrue(results.rows.length == 1);
21 chrome.test.assertTrue(results.rows.item(0).body == "hotdog");
22 chrome.test.succeed();
23 }, function(tx, error) {
24 chrome.test.fail(error.message);
27 chrome.test.fail(error.message);