|
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 type="application/javascript" 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.mozMatchesSelector("!!"); |
|
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> |