OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 </head> |
| 5 <body> |
| 6 <script> |
| 7 description("Verify that the custom properties on a Canvas 2D rendering context
object are retained across GCs."); |
| 8 |
| 9 window.jsTestIsAsync = true; |
| 10 |
| 11 if (window.testRunner) { |
| 12 testRunner.dumpAsText(); |
| 13 testRunner.waitUntilDone(); |
| 14 } |
| 15 |
| 16 function runTest() { |
| 17 canvas = document.createElement("canvas"); |
| 18 context = canvas.getContext("2d"); |
| 19 context.customProperty = "value"; |
| 20 shouldBeEqualToString("context.customProperty", "value"); |
| 21 context = null; |
| 22 gc(); |
| 23 context = canvas.getContext("2d"); |
| 24 shouldBeEqualToString("context.customProperty", "value"); |
| 25 finishJSTest(); |
| 26 } |
| 27 |
| 28 window.onload = runTest; |
| 29 </script> |
| 30 </body> |
| 31 </html> |
OLD | NEW |