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