Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / xbl / test / test_bug400705.xhtml
blob054519537121c407b793a10af23b62ef82ec1fbb
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=400705
4 -->
5 <head>
6 <title>Test for Bug 400705</title>
7 <script type="text/javascript" src="/MochiKit/packed.js"></script>
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="test">
12 <implementation>
13 <field name="a">window.countera++</field>
14 <field name="b">window.counterb++</field>
15 </implementation>
16 </binding>
17 </bindings>
18 </head>
19 <body>
20 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=400705">Mozilla Bug 400705</a>
21 <p id="display" style="-moz-binding: url(#test)"></p>
22 <div id="content" style="display: none">
24 </div>
25 <pre id="test">
26 <script class="testbody" type="text/javascript">
27 <![CDATA[
28 /** Test for Bug 400705 **/
29 SimpleTest.waitForExplicitFinish();
31 addLoadEvent(function() {
32 window.countera = 0;
33 window.counterb = 0;
35 var d = $("display");
36 // Control to make sure fields are lazy and all
37 d.a;
38 is(window.countera, 1, "Should have evaluated field");
40 d.parentNode.removeChild(d);
41 is(window.counterb, 0, "Should not evaluate field on binding teardown");
42 SimpleTest.finish();
43 });
44 ]]>
45 </script>
46 </pre>
47 </body>
48 </html>