4 https://bugzilla.mozilla.org/show_bug.cgi?id=616774-->
6 <title>Test for Bug
616774</title>
7 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
11 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=616774">Mozilla Bug
616774</a>
13 <div id=
"content" style=
"display: none">
17 <script class=
"testbody" type=
"text/javascript">
19 /** Test for Bug
616774 **/
20 is(document.evaluate('-
"8"', document, null, XPathResult.ANY_TYPE, null).numberValue, -
8,
"Negated string literal should evaluate to itself negated");
21 is(document.evaluate('- -
"999"', document, null, XPathResult.ANY_TYPE, null).numberValue,
999,
"String literal should evaluate to itself");
22 is(document.evaluate('- - id(
"content")', document, null, XPathResult.ANY_TYPE, null).numberValue,
42,
"DOM element should evaluate to itself coerced to a number");