3 <script type=
"text/javascript">
4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
11 var p
= document
.getElementById('plg');
12 var iframe
= document
.getElementById('frame-id');
13 p
.remember(iframe
.contentWindow
);
15 var someObject
= {a
: 1, b
: 2};
16 // Load another page in iframe, so plugin keeps reference to old frame's contentWindow.
17 iframe
.onload = function() {
18 // This will trigger Release Object for previously remembered reference.
19 p
.remember(someObject
);
20 document
.getElementById('result').innerHTML
= 'SUCCESS';
21 if (window
.testRunner
)
22 testRunner
.notifyDone();
24 iframe
.src
= 'resources/empty2.html';
29 <embed id=
"plg" type=
"application/x-webkit-test-netscape"></embed><P>
30 <iframe id=
"frame-id" src=
"resources/empty.html" onload='runTest()'
></iframe>
31 <div>This tests that releasing a reference to a contentWindow that has already been navigated away works correctly and does not crash. If this test is successful, the word SUCCESS should be seen below.
</div>
32 <div id=
"result">FAILED
</div>