content/base/test/test_DOMException.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial