[email protected] | b3c909f | 2010-03-22 16:45:59 | [diff] [blame] | 1 | <html> |
| 2 | <body onload="test()"> |
| 3 | <embed name="plg" type="application/x-webkit-test-netscape"> |
| 4 | <script> |
[email protected] | f94dcec | 2012-06-15 07:38:37 | [diff] [blame] | 5 | if (window.testRunner) |
| 6 | testRunner.dumpAsText(); |
[email protected] | b3c909f | 2010-03-22 16:45:59 | [diff] [blame] | 7 | |
| 8 | function gc() |
| 9 | { |
| 10 | if (window.GCController) |
| 11 | return GCController.collect(); |
| 12 | |
| 13 | for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect) |
| 14 | var s = new String("abc"); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | var recursionsRemaining = 2; |
| 19 | |
| 20 | function pluginCallback() |
| 21 | { |
| 22 | if (--recursionsRemaining) |
| 23 | test(); |
| 24 | else { |
| 25 | document.write("PASS if no crash.<br>"); |
| 26 | gc(); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | function test() |
| 31 | { |
| 32 | try { |
| 33 | plg.testCallback("pluginCallback"); |
| 34 | } catch (ex) { |
| 35 | alert("Exception: " + ex.description + ". Test plugin was not found"); |
| 36 | } |
| 37 | } |
| 38 | </script> |
| 39 | </body> |
| 40 | </html> |