OLD | NEW |
1 description("Test that plug-in doesn't get a new browser object instance each ti
me") | 1 description("Test that plug-in doesn't get a new browser object instance each ti
me") |
2 | 2 |
3 function gc() | 3 function gc() |
4 { | 4 { |
5 if (window.GCController) | 5 if (window.GCController) |
6 return GCController.collect(); | 6 return GCController.collectAll(); |
7 | 7 |
8 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires
about 9K allocations before a collect) | 8 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires
about 9K allocations before a collect) |
9 var s = new String("abc"); | 9 var s = new String("abc"); |
10 } | 10 } |
11 } | 11 } |
12 | 12 |
13 embed = document.createElement("embed"); | 13 embed = document.createElement("embed"); |
14 embed.type = "application/x-webkit-test-netscape"; | 14 embed.type = "application/x-webkit-test-netscape"; |
15 document.body.appendChild(embed); | 15 document.body.appendChild(embed); |
16 | 16 |
(...skipping 12 matching lines...) Expand all Loading... |
29 shouldBe("embed.refCount(obj)", "2"); | 29 shouldBe("embed.refCount(obj)", "2"); |
30 shouldBe("embed.getRememberedObject()", "obj"); | 30 shouldBe("embed.getRememberedObject()", "obj"); |
31 shouldBe("embed.getRememberedObject()", "obj"); | 31 shouldBe("embed.getRememberedObject()", "obj"); |
32 shouldBe("embed.refCount(obj)", "2"); | 32 shouldBe("embed.refCount(obj)", "2"); |
33 shouldBe("embed.getAndForgetRememberedObject()", "obj"); | 33 shouldBe("embed.getAndForgetRememberedObject()", "obj"); |
34 shouldBe("embed.refCount(obj)", "1"); | 34 shouldBe("embed.refCount(obj)", "1"); |
35 obj = null; | 35 obj = null; |
36 gc(); | 36 gc(); |
37 | 37 |
38 var successfullyParsed = true; | 38 var successfullyParsed = true; |
OLD | NEW |