Remove UTF8 BOM marker from last commit.
[wine-gecko.git] / content / xbl / test / test_bug310107.html
blobbe066963ed0e094db35436d209accc7be491b2cf
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=310107
5 -->
6 <head>
7 <title>Test for Bug 310107</title>
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=310107">Mozilla Bug 310107</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
20 /** Test for Bug 310107 **/
21 SimpleTest.waitForExplicitFinish();
23 var win = window.open("bug310107-resource.xhtml", "", "width=10, height=10");
25 function runTest() {
26 window.el = win.document.getElementById("bar");
27 window.doc = win.document;
28 is(window.el.prop, 2, "Unexpected prop value at load");
30 win.location = "data:text/html,<body onload='window.opener.loadDone()'>";
33 function loadDone() {
34 is(window.el.prop, 2, "Prop still 2 because we're in bfcache");
35 is(window.el, window.doc.getElementById("bar"),
36 "document didn't get bfcached?");
38 // Remove our node from the DOM
39 window.el.parentNode.removeChild(window.el);
41 is(window.el.prop, undefined, "Binding should have been detached");
42 is(typeof(window.el.prop), "undefined", "Really undefined");
44 win.close();
46 SimpleTest.finish();
50 </script>
51 </pre>
52 </body>
53 </html>