tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug605982.html (831B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=605982
      5 -->
      6 <head>
      7  <title>Test for Bug 605982</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=605982">Mozilla Bug 605982</a>
     13 <p id="display"></p>
     14 <pre id="test">
     15 <script type="application/javascript">
     16 
     17 /** Test for Bug 605982 */
     18 
     19 var elmt = document.createElement("div");
     20 
     21 var caught = false;
     22 try {
     23  elmt.matches("!!");
     24 } catch(e) {
     25  ok(e.name == "SyntaxError", "Error should be SyntaxError");
     26  ok(e.code == DOMException.SYNTAX_ERR, "Error code should be SYNTAX_ERR");
     27  caught = true;
     28 }
     29 ok(caught, "An exception should have been thrown");
     30 
     31 </script>
     32 </pre>
     33 </body>
     34 </html>