Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: LayoutTests/fast/canvas/canvas-context-gc-custom-properties.html

Issue 1033613002: Mark wrappers of canvas rendering context objects as dependent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update test expectation Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/canvas/canvas-context-gc-custom-properties.html
diff --git a/LayoutTests/fast/canvas/canvas-context-gc-custom-properties.html b/LayoutTests/fast/canvas/canvas-context-gc-custom-properties.html
new file mode 100644
index 0000000000000000000000000000000000000000..2ec7253bbbf6ac041c8203b2d5052885302036d1
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-context-gc-custom-properties.html
@@ -0,0 +1,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>

Powered by Google App Engine
This is Rietveld 408576698