content/base/test/test_DOMException.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>Test for DOMException constants</title>
michael@0 5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 6 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
michael@0 7 </head>
michael@0 8 <body>
michael@0 9 <p id="display"></p>
michael@0 10 <div id="content" style="display: none">
michael@0 11 </div>
michael@0 12 <pre id="test">
michael@0 13 <script>
michael@0 14 var constants = [
michael@0 15 null,
michael@0 16 "INDEX_SIZE_ERR",
michael@0 17 "DOMSTRING_SIZE_ERR",
michael@0 18 "HIERARCHY_REQUEST_ERR",
michael@0 19 "WRONG_DOCUMENT_ERR",
michael@0 20 "INVALID_CHARACTER_ERR",
michael@0 21 "NO_DATA_ALLOWED_ERR",
michael@0 22 "NO_MODIFICATION_ALLOWED_ERR",
michael@0 23 "NOT_FOUND_ERR",
michael@0 24 "NOT_SUPPORTED_ERR",
michael@0 25 "INUSE_ATTRIBUTE_ERR",
michael@0 26 "INVALID_STATE_ERR",
michael@0 27 "SYNTAX_ERR",
michael@0 28 "INVALID_MODIFICATION_ERR",
michael@0 29 "NAMESPACE_ERR",
michael@0 30 "INVALID_ACCESS_ERR",
michael@0 31 "VALIDATION_ERR",
michael@0 32 "TYPE_MISMATCH_ERR",
michael@0 33 "SECURITY_ERR",
michael@0 34 "NETWORK_ERR",
michael@0 35 "ABORT_ERR",
michael@0 36 "URL_MISMATCH_ERR",
michael@0 37 "QUOTA_EXCEEDED_ERR",
michael@0 38 "TIMEOUT_ERR",
michael@0 39 "INVALID_NODE_TYPE_ERR",
michael@0 40 "DATA_CLONE_ERR"
michael@0 41 ];
michael@0 42 for (var i = 0; i < constants.length; ++i) {
michael@0 43 var constant = constants[i];
michael@0 44 if (constant)
michael@0 45 is(DOMException[constant], i, constant)
michael@0 46 }
michael@0 47 </script>
michael@0 48 </pre>
michael@0 49 </body>
michael@0 50 </html>

mercurial