OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
4 <body> | 4 <body> |
5 <script> | 5 <script> |
6 var layoutTest = async_test('Finish event should be delivered even if a GC occur
s. This test passes if it does not time out.'); | 6 var layoutTest = async_test('Finish event should be delivered even if a GC occur
s. This test passes if it does not time out.'); |
7 var events = 0; | 7 var events = 0; |
8 | 8 |
9 function finish() { | 9 function finish() { |
10 if (window.GCController) | 10 if (window.GCController) |
11 GCController.collect(); | 11 GCController.collect(); |
12 if (++events == 2) | 12 if (++events == 2) |
13 layoutTest.done(); | 13 layoutTest.done(); |
14 } | 14 } |
15 | 15 |
16 // Use a distinct, unreferenced instance of the handler function. | 16 // Use a distinct, unreferenced instance of the handler function. |
17 document.body.animate([]).onfinish = finish.bind(); | 17 document.body.animate([]).onfinish = finish.bind(); |
18 document.body.animate([]).onfinish = finish.bind(); | 18 document.body.animate([]).onfinish = finish.bind(); |
19 | 19 |
20 if (window.GCController) | 20 if (window.GCController) |
21 GCController.collect(); | 21 GCController.collect(); |
22 </script> | 22 </script> |
OLD | NEW |