OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="../../../resources/js-test.js"></script> | |
4 <script src="resources/webgl-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <script> | |
8 description("Verify that the custom properties on a WebGL rendering context obje ct are retained across GCs."); | |
9 | |
10 window.jsTestIsAsync = true; | |
11 | |
12 if (window.testRunner) { | |
13 testRunner.dumpAsText(); | |
14 testRunner.waitUntilDone(); | |
15 } | |
16 | |
17 function runTest() { | |
18 canvas = document.createElement("canvas"); | |
19 context = create3DContext(canvas); | |
20 context.customProperty = "value"; | |
21 shouldBeEqualToString("context.customProperty", "value"); | |
22 context = null; | |
23 gc(); | |
Justin Novosad
2015/03/24 16:08:32
Just a suggestion, but you could go a step further
sof
2015/03/24 16:14:23
i.e., not use document.createElement()?
| |
24 context = create3DContext(canvas); | |
25 shouldBeEqualToString("context.customProperty", "value"); | |
26 finishJSTest(); | |
27 } | |
28 | |
29 window.onload = runTest; | |
30 </script> | |
31 </body> | |
32 </html> | |
OLD | NEW |