summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/change-version-no-crash-on-preflight-failure.html
blob: 2a512fb9ac91dfb4da2c8f2e836dbc5087659120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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>