author Kyle Machulis <>
Fri, 29 Mar 2013 15:12:58 -0700
changeset 137136 0db3022ca2e6bec95897850f797f078464a7f529
parent 81279 048ee4bf28f215ffd7cf6b180622193e971ca682
permissions -rw-r--r--
Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot

  <title>Test for Bug 616774</title>
  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<a target="_blank" href="">Mozilla Bug 616774</a>
<p id="display"></p>
<div id="content" style="display: none">
<pre id="test">
<script class="testbody" type="text/javascript">

/** Test for Bug 616774 **/
is(document.evaluate('- "8"', document, null, XPathResult.ANY_TYPE, null).numberValue, -8, "Negated string literal should evaluate to itself negated");
is(document.evaluate('- - "999"', document, null, XPathResult.ANY_TYPE, null).numberValue, 999, "String literal should evaluate to itself");
is(document.evaluate('- - id("content")', document, null, XPathResult.ANY_TYPE, null).numberValue, 42, "DOM element should evaluate to itself coerced to a number");