content/base/test/test_bug444030.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug444030.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=444030
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 444030</title>
    1.11 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.13 +  <bindings xmlns="http://www.mozilla.org/xbl">
    1.14 +    <binding id="e">
    1.15 +      <content>e</content>
    1.16 +    </binding>
    1.17 +  </bindings>
    1.18 +</head>
    1.19 +<body>
    1.20 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=444030">Mozilla Bug 444030</a>
    1.21 +<p id="display"></p>
    1.22 +<div id="content" style="display: none">
    1.23 +  
    1.24 +</div>
    1.25 +<pre id="test">
    1.26 +<script class="testbody" type="text/javascript">
    1.27 +<![CDATA[
    1.28 +
    1.29 +/** Test for Bug 444030 **/
    1.30 +
    1.31 +function doTest() {
    1.32 +  var anonTextNode = SpecialPowers.unwrap(SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById("boundElement")))[0];
    1.33 +  var hadException = false;
    1.34 +  try {
    1.35 +    var wholeText = anonTextNode.wholeText;
    1.36 +  } catch(e) {
    1.37 +    hadException = true;
    1.38 +  }
    1.39 +  ok(hadException,
    1.40 +     "Should have got an exception when using .wholeText with a text node child of the binding parent");
    1.41 +  SimpleTest.finish();
    1.42 +}
    1.43 +
    1.44 +SimpleTest.waitForExplicitFinish();
    1.45 +addLoadEvent(doTest);
    1.46 +
    1.47 +]]>
    1.48 +</script>
    1.49 +</pre>
    1.50 +<div style="-moz-binding: url(#e)" id="boundElement"></div>
    1.51 +</body>
    1.52 +</html>
    1.53 +

mercurial