summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/constants.html
blob: 9cdf4c4d01c1521d072324f7cded4368079c6698 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
<script src="../../fast/js/resources/js-test-pre.js"></script>
<script src="../../fast/js/resources/js-test-post-function.js"></script>
<script src="resources/shared.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>

description("Test IndexedDB's constants.");
if (window.layoutTestController) 
    layoutTestController.waitUntilDone();

function test()
{
    shouldBe("webkitIDBKeyRange.SINGLE", "0");
    shouldBe("webkitIDBKeyRange.LEFT_OPEN", "1");
    shouldBe("webkitIDBKeyRange.RIGHT_OPEN", "2");
    shouldBe("webkitIDBKeyRange.LEFT_BOUND", "4");
    shouldBe("webkitIDBKeyRange.RIGHT_BOUND", "8");

    shouldBe("webkitIDBDatabaseException.UNKNOWN_ERR", "1");
    shouldBe("webkitIDBDatabaseException.NON_TRANSIENT_ERR", "1");
    shouldBe("webkitIDBDatabaseException.NOT_FOUND_ERR", "2");
    shouldBe("webkitIDBDatabaseException.CONSTRAINT_ERR", "3");
    shouldBe("webkitIDBDatabaseException.DATA_ERR", "4");
    shouldBe("webkitIDBDatabaseException.NOT_ALLOWED_ERR", "5");
    shouldBe("webkitIDBDatabaseException.SERIAL_ERR", "11");
    shouldBe("webkitIDBDatabaseException.RECOVERABLE_ERR", "21");
    shouldBe("webkitIDBDatabaseException.TRANSIENT_ERR", "31");
    shouldBe("webkitIDBDatabaseException.TIMEOUT_ERR", "32");
    shouldBe("webkitIDBDatabaseException.DEADLOCK_ERR", "33");

    shouldBe("webkitIDBRequest.LOADING", "1");
    shouldBe("webkitIDBRequest.DONE", "2");

    shouldBe("webkitIDBCursor.NEXT", "0");
    shouldBe("webkitIDBCursor.NEXT_NO_DUPLICATE", "1");
    shouldBe("webkitIDBCursor.PREV", "2");
    shouldBe("webkitIDBCursor.PREV_NO_DUPLICATE", "3");

    shouldBe("webkitIDBTransaction.READ_WRITE", "0");
    shouldBe("webkitIDBTransaction.READ_ONLY", "1");
    shouldBe("webkitIDBTransaction.SNAPSHOT_READ", "2");
    shouldBe("webkitIDBTransaction.VERSION_CHANGE", "3");
}

test();

var successfullyParsed = true;
done();

</script>
</body>
</html>