OLD | NEW |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | 4 <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> |
5 <title>Null frame access tests</title> | 5 <title>Null frame access tests</title> |
6 <script src="../../../resources/gc.js"></script> | |
6 <script> | 7 <script> |
7 window.onload = function() { | 8 window.onload = function() { |
8 if (window.testRunner) { | 9 if (window.testRunner) { |
9 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
10 testRunner.waitUntilDone(); | 11 testRunner.waitUntilDone(); |
11 } | 12 } |
12 | 13 |
13 var tag = document.getElementById('subframe'); | 14 var tag = document.getElementById('subframe'); |
14 var win = tag.contentWindow; | 15 var win = tag.contentWindow; |
15 // remove the element so the window has a null frame | 16 // remove the element so the window has a null frame |
16 tag.parentNode.removeChild(tag); | 17 tag.parentNode.removeChild(tag); |
18 gc(); | |
Mads Ager (chromium)
2014/09/16 12:17:44
If you src js-test.js instead you get asyncGC that
sof
2014/09/17 09:42:57
Refreshed the test to use asyncGC()
| |
17 | 19 |
18 // schedule to run after the frame is null | 20 // schedule to run after the frame is null |
19 setTimeout(function() { | 21 setTimeout(function() { |
20 document.body.appendChild(document.createTextNode(win.test || 'property: PASS ... ')); | 22 document.body.appendChild(document.createTextNode(win.test || 'property: PASS ... ')); |
21 document.body.appendChild(document.createTextNode(win[20] || 'array: PAS S ... ')); | 23 document.body.appendChild(document.createTextNode(win[20] || 'array: PAS S ... ')); |
22 document.body.appendChild(document.createTextNode(win.Comment || 'missin g property: PASS.')); | 24 document.body.appendChild(document.createTextNode(win.Comment || 'missin g property: PASS.')); |
23 if (window.testRunner) | 25 if (window.testRunner) |
24 testRunner.notifyDone(); | 26 testRunner.notifyDone(); |
25 }, 0); | 27 }, 0); |
26 }; | 28 }; |
27 </script> | 29 </script> |
28 </head> | 30 </head> |
29 <body> | 31 <body> |
30 This tests access to a window with a null frame. You should see "PASS" for each of the three tests below.<br /><br /> | 32 This tests access to a window with a null frame. You should see "PASS" for each of the three tests below.<br /><br /> |
31 <iframe id="subframe" src="data:text/html,<script>window.test='FAIL ... '; window[20]='FAIL ... ';</script>" /> | 33 <iframe id="subframe" src="data:text/html,<script>window.test='FAIL ... '; window[20]='FAIL ... ';</script>" /> |
32 </body> | 34 </body> |
33 </html> | 35 </html> |
OLD | NEW |