diff options
Diffstat (limited to 'LayoutTests/storage/indexeddb/constants.html')
-rw-r--r-- | LayoutTests/storage/indexeddb/constants.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/LayoutTests/storage/indexeddb/constants.html b/LayoutTests/storage/indexeddb/constants.html new file mode 100644 index 0000000..9cdf4c4 --- /dev/null +++ b/LayoutTests/storage/indexeddb/constants.html @@ -0,0 +1,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> |