content/base/test/test_bug444030.xhtml

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:3c1840884e1e
1 <?xml version="1.0"?>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=444030
5 -->
6 <head>
7 <title>Test for Bug 444030</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 <bindings xmlns="http://www.mozilla.org/xbl">
11 <binding id="e">
12 <content>e</content>
13 </binding>
14 </bindings>
15 </head>
16 <body>
17 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=444030">Mozilla Bug 444030</a>
18 <p id="display"></p>
19 <div id="content" style="display: none">
20
21 </div>
22 <pre id="test">
23 <script class="testbody" type="text/javascript">
24 <![CDATA[
25
26 /** Test for Bug 444030 **/
27
28 function doTest() {
29 var anonTextNode = SpecialPowers.unwrap(SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById("boundElement")))[0];
30 var hadException = false;
31 try {
32 var wholeText = anonTextNode.wholeText;
33 } catch(e) {
34 hadException = true;
35 }
36 ok(hadException,
37 "Should have got an exception when using .wholeText with a text node child of the binding parent");
38 SimpleTest.finish();
39 }
40
41 SimpleTest.waitForExplicitFinish();
42 addLoadEvent(doTest);
43
44 ]]>
45 </script>
46 </pre>
47 <div style="-moz-binding: url(#e)" id="boundElement"></div>
48 </body>
49 </html>
50

mercurial