blob: 135eec1dd0d27c8658f85f9d899dc07b8a84af3f [file] [log] [blame]
[email protected]b3c909f2010-03-22 16:45:591<html>
2<body onload="test()">
3<embed name="plg" type="application/x-webkit-test-netscape">
4<script>
[email protected]f94dcec2012-06-15 07:38:375 if (window.testRunner)
6 testRunner.dumpAsText();
[email protected]b3c909f2010-03-22 16:45:597
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>