diff options
Diffstat (limited to 'LayoutTests/storage/change-version-no-crash-on-preflight-failure.html')
-rw-r--r-- | LayoutTests/storage/change-version-no-crash-on-preflight-failure.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/LayoutTests/storage/change-version-no-crash-on-preflight-failure.html b/LayoutTests/storage/change-version-no-crash-on-preflight-failure.html new file mode 100644 index 0000000..2a512fb --- /dev/null +++ b/LayoutTests/storage/change-version-no-crash-on-preflight-failure.html @@ -0,0 +1,36 @@ +<html> +<head> +<script> +function finishTest() +{ + if (window.layoutTestController) + layoutTestController.notifyDone(); +} + +function log(message) +{ + document.getElementById("console").innerText += message + "\n"; +} + +function runTest() { + if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + } + + var db = window.openDatabase("ChangeVersionFailureTest", "1", "Test the preflight step", 1024); + db.changeVersion("2", "3", null, function(error) { + log("PASS: db.changeVersion() failed as expected, and no assertions were triggered."); + finishTest(); + }, function() { + log("FAIL: db.changeVersion() was expected to fail."); + finishTest(); + }); +} +</script> +</head> +<body onload="runTest();"> +This test verifies that no assertion is triggered when changeVersion()'s preflight step fails. +<pre id="console"></pre> +</body> +</html> |