1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_DOMException.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Test for DOMException constants</title> 1.8 + <script src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <link rel="stylesheet" href="/tests/SimpleTest/test.css"/> 1.10 +</head> 1.11 +<body> 1.12 +<p id="display"></p> 1.13 +<div id="content" style="display: none"> 1.14 +</div> 1.15 +<pre id="test"> 1.16 +<script> 1.17 +var constants = [ 1.18 + null, 1.19 + "INDEX_SIZE_ERR", 1.20 + "DOMSTRING_SIZE_ERR", 1.21 + "HIERARCHY_REQUEST_ERR", 1.22 + "WRONG_DOCUMENT_ERR", 1.23 + "INVALID_CHARACTER_ERR", 1.24 + "NO_DATA_ALLOWED_ERR", 1.25 + "NO_MODIFICATION_ALLOWED_ERR", 1.26 + "NOT_FOUND_ERR", 1.27 + "NOT_SUPPORTED_ERR", 1.28 + "INUSE_ATTRIBUTE_ERR", 1.29 + "INVALID_STATE_ERR", 1.30 + "SYNTAX_ERR", 1.31 + "INVALID_MODIFICATION_ERR", 1.32 + "NAMESPACE_ERR", 1.33 + "INVALID_ACCESS_ERR", 1.34 + "VALIDATION_ERR", 1.35 + "TYPE_MISMATCH_ERR", 1.36 + "SECURITY_ERR", 1.37 + "NETWORK_ERR", 1.38 + "ABORT_ERR", 1.39 + "URL_MISMATCH_ERR", 1.40 + "QUOTA_EXCEEDED_ERR", 1.41 + "TIMEOUT_ERR", 1.42 + "INVALID_NODE_TYPE_ERR", 1.43 + "DATA_CLONE_ERR" 1.44 +]; 1.45 +for (var i = 0; i < constants.length; ++i) { 1.46 + var constant = constants[i]; 1.47 + if (constant) 1.48 + is(DOMException[constant], i, constant) 1.49 +} 1.50 +</script> 1.51 +</pre> 1.52 +</body> 1.53 +</html>