diff options
Diffstat (limited to 'LayoutTests/storage/open-database-set-empty-version.html')
-rw-r--r-- | LayoutTests/storage/open-database-set-empty-version.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/LayoutTests/storage/open-database-set-empty-version.html b/LayoutTests/storage/open-database-set-empty-version.html new file mode 100644 index 0000000..f3607fd --- /dev/null +++ b/LayoutTests/storage/open-database-set-empty-version.html @@ -0,0 +1,26 @@ +<html> +<head> +<script> +function runTest() { + if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.clearAllDatabases(); + } + + try { + var db = openDatabase('28417Test', '', 'Test for bug 28417: openDatabase() with empty version sets db version up incorrectly', 0); + // The next openDatabase call should fail because the database version was set to '' by the call above, and now we are expecting a different version. + var db2 = openDatabase('28417Test', 'test', 'Test for bug 28417: openDatabase() with empty version sets db version up incorrectly', 0); + } catch (e) { + document.getElementById('result').innerHTML = 'SUCCESS, an exception was thrown. ' + e; + } +} +</script> +</head> +<body onload="runTest()"> +<div>This tests that calling openDatabase with an empty version string sets the current version of that database to the empty string and subsequent attempts to open the database with a different expected version throw an exception.</div> +<div id="result"> +FAILURE - an exception was expected. +</div> +</body> +</html> |