Chromium Code Reviews| Index: LayoutTests/fast/canvas/webgl/context-gc-custom-properties.html |
| diff --git a/LayoutTests/fast/canvas/webgl/context-gc-custom-properties.html b/LayoutTests/fast/canvas/webgl/context-gc-custom-properties.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..590de61d111bdc5dc59e1b2ebcf3907a864cebc6 |
| --- /dev/null |
| +++ b/LayoutTests/fast/canvas/webgl/context-gc-custom-properties.html |
| @@ -0,0 +1,32 @@ |
| +<html> |
| +<head> |
| +<script src="../../../resources/js-test.js"></script> |
| +<script src="resources/webgl-test.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| +description("Verify that the custom properties on a WebGL rendering context object are retained across GCs."); |
| + |
| +window.jsTestIsAsync = true; |
| + |
| +if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
| +} |
| + |
| +function runTest() { |
| + canvas = document.createElement("canvas"); |
| + context = create3DContext(canvas); |
| + context.customProperty = "value"; |
| + shouldBeEqualToString("context.customProperty", "value"); |
| + context = null; |
| + 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()?
|
| + context = create3DContext(canvas); |
| + shouldBeEqualToString("context.customProperty", "value"); |
| + finishJSTest(); |
| +} |
| + |
| +window.onload = runTest; |
| +</script> |
| +</body> |
| +</html> |