1 <html> 2 <head> 3 <script> 4 function finishTest() 5 { 6 if (window.layoutTestController) 7 layoutTestController.notifyDone(); 8 } 9 10 function log(message) 11 { 12 document.getElementById("console").innerText += message + "\n"; 13 } 14 15 function runTest() { 16 if (window.layoutTestController) { 17 layoutTestController.dumpAsText(); 18 layoutTestController.waitUntilDone(); 19 } 20 21 var db = window.openDatabase("ChangeVersionFailureTest", "1", "Test the preflight step", 1024); 22 db.changeVersion("2", "3", null, function(error) { 23 log("PASS: db.changeVersion() failed as expected, and no assertions were triggered."); 24 finishTest(); 25 }, function() { 26 log("FAIL: db.changeVersion() was expected to fail."); 27 finishTest(); 28 }); 29 } 30 </script> 31 </head> 32 <body onload="runTest();"> 33 This test verifies that no assertion is triggered when changeVersion()'s preflight step fails. 34 <pre id="console"></pre> 35 </body> 36 </html> 37